We're building 31 GPTs in 31 days.

Day #6: Hangman – America’s Most Wanted Edition


Play the game here (requires GPT+ subscription)

The FBI makes the America’s Most Wanted list publicly available (and offers a free API), in the hope that people will take notice and help them catch the perps. But it’s a scary thing that nobody wants to read or think about. So we decided to make a fun experience to keep people informed about a very not-fun thing.

So, hangman it was! It’s such a light-hearted, yet incredibly dark game that it felt right for this experiment.

As it turns out, making a hangman game with ChatGPT is no small order. Go ahead, try it. It will start off well, but the game will quickly lose track of where it’s at and fail miserably. It’s the same reason why ChatGPT struggles to play chess. Too many tokens, and a limited ability to “remember”.

Making this game almost broke us. It was an exercise in walking the tight rope between functionality and quality. Fall off one side and the game doesn’t work. Fall off the other side and the game is boring. We’re not game developers, but we can certainly relate with them in a tiny way!

Decisions we had to make to pull this thing off:
Force GPT to use code interpreter. While it slows down the game, it was the only way we could get it to successfully keep track of the game.
Drop the API. The game currently draws from a .txt knowledge document that contains all of the fugitives and their profiles. If you really want you can hack this GPT and access that file, go ahead, but just know that you are a big ol’ cheater. Maybe we’ll pick up the API again for v2.0.
Limit ASCII drawings until the very end as an easter egg if you lose the game. This drastically reduced token count and stopped GPT having a mental breakdown after a couple of guesses.

Here’s the easter egg ASCII drawing at the end of the game for those who aren’t able to play themselves:

To give you an idea of how much we battled GPT to try and get this game running how we wanted it to, here is an excerpt of an early set of instructions that were written in an attempt to avoid using code interpreter. Written on a flight, without wifi, and without GPT support…

Spoiler: it didn’t work.

Happy hunting!

Leave a comment