Show HN: A chess game you play with Claude as your wing-bot in the CLI
13 hours ago (github.com)
Hey HN!
Wanted to show off a thing I built in case it interests anyone.
I wanted to build a game you play inside the claude code CLI and back when they launched the channels feature I started investigating ways to use that to do so. I started with a multiplayer comedy battle game where you would collaborate with Claude to write jokes based on a theme in a timeframe and then post them to an audience and compete against other folks (with the audience voting for the funniest joke), it was OK but I didn't have anyone to really test it with so I moved on. My son has been learning chess so instead I tweaked it to let you play chess with Claude suggesting three possible move options for you to choose from and submit as your move (you choose what you actually want to do not Claude). It was much more fun and allowed me to actually learn a thing or two about chess (my chess isn't great, it didn't need to do much to help me learn but I could go back and forth with it on why a certain move was better, etc.).
Over time I beefed it up a bit just so I could get a feel for what it is like actually building something 'agentically' (vibing is probably more apt in this case, I never really let an agent run wild with things). So now you can run the server locally and spin up Claude Code to play a game of chess against a bot or you can join (or host) a remote server and play your friends. I threw an MCP server on GCP and some very rudimentary storage on Notion to allow you to maintain a username (should you choose to). When you join you can play a bot or see if anyone is in the lobby and challenge them to a game.
Github with all the code and instructions is over at: https://github.com/goawaygeek/ground-control
Once you have things installed you'll have to `--dangerously-load-development-channels` which, well, if you're running it locally all good you know what's coming in and out of that channel, to mitigate the potential for prompt injection from the hosted version I've put in qualifiers around any of the free text that gets passed through (messages, jokes, usernames, etc.). Any tips on how to sure that up are more than welcome! Playing with the bot is fun on its own so if you're nervous just do that instead of challenging a random online stranger (although fair warning, models matter, playing Haiku was terrible, Opus and above were pretty decent!).
I put up a simple front end if you want to check whether anyone is online (on my hosted server) here: https://groundcontrol.deepdeep.space
and I put up a video of two people playing (well, me playing myself) on youtube: https://youtu.be/YMgbf-qUVqc
The logical next steps for me would be to: a) improve the chess engine so the bot can be tweaked, or the moves it suggests could be graded (to show the difference between a 'novice move' and a 'grand master' move. b) move everything so it runs local models instead of CC, the day or two I spent getting channels running for the comedy battle test just kind of kept me down that path, long term I'm much more interested in local models I just didn't want to create something that used API credits hence the ability to play on any of the Anthropic plans via Channels. c) create a whole new game that allows people to leverage their own local models and tweak/fine tune them. It probably shows my age but the idea of having an R2 unit in the back of your fighter while you go into battle is, um, nostalgic I guess.
Please leave comments or reach out if anything is of interest to you!
so did you win or did claude win the first game? my AI chess experiences so far reveal AI's start making illegal and quite bad moves near the mid-end game rendering them disappointing chess partners. did that happen with this harnes as well?
Good question. It was originally designed so you could play against other humans each with their own claude instance helping them evaluate possible moves so...I won, but my son is five so take that win for what it is worth :)
The chess engine sits on the server keeps all moves legal but Claude will definitely hallucinate some terrible options for you, especially if you're using Haiku. If I had to guess I would say Opus seems to play around at 1200-level game.
It is setup so you could give Claude access to a much better engine to choose moves from though, I just...haven't added that yet :(