Skip to content

SuveenE/codenames-ai

Repository files navigation

GitHub stars License Twitter Follow

Codenames AI

I got OpenAI o1 to play Codenames and it's super good.

You can get AI to play your own games at codenames.suveenellawela.com

Here's a short blog post I published with my findings (7000+ views). And the blog post got featured on Hacker News ranking #7 at its peak. There were a lot of interesting comments, have a look here.

New to Codenames? Here's a 3-minute video explaining how it works.

Screenshot 2025-01-01 at 20 40 27

Features

  • See AI play a game with random words
  • See AI play a game with a custom set of words and a custom board (If you just finished playing a game, see how AI would have played it)
  • Replay previous games ( Currently this is suppored only for a test game )
  • Add your own API key to use OpenAI models

Custom Game input: Screenshot 2025-01-01 at 20 40 27

The story behind

During our lunch breaks, my colleagues and I have been enjoying games of Codenames. In one round, the clue giver faced the challenge of connecting "carrot" and "ray." At the end of the game, I asked ChatGPT for a suggestion, and it came up with "Orange", a pretty clever clue! My own idea was "Laser."

That got me thinking: how good could AI be at playing Codenames? So, I built this.

Getting Started

First, run the development server:

npm install
npm run dev

Open http://localhost:3000 with your browser to see the result.

Links

About

🎲 codenames, but AI plays against AI. (OpenAI o1)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages