11/30/2024
Share this post:
Export:

After building the 2048 game and taking it to very well polished in about 18 hours, I wanted to get chess up and rolling again.
Forever I have had a variation of chess in my mind where there are trees, ponds, and boulders in the way to make room for new piece types that have knight-like ability to get through these barriers. My good friend Nimai Malle has always wanted to polish a chess variation where each piece had its own move-timer and could move as soon as its move timer was ready. (Makes me think that it would be cool to have every piece start at a random energy value in their timer for an additional way to shake up the opening theory of a game!) There are countless other variations of chess and so I want to build my own client/server chess site that is very well featured - why? Mostly for fun, and chess is a material hobby of mine, but also maybe I can have fun and find a couple of minor commercial variations that I could release.
But there are other meta-missions I am pursuing as well - one big theme of this site is what can a solo creator create in the age of these great AI tools!? Or perhaps if not solo very small teams?
Second, chess is the great foundational platform for AI research going back 5 decades. I am not going to stop and do a history on the AI chess engines - that is what google used to be for, but now your favorite LLM can do a tailored summary just perfect. Instead my direct interest is leveraging not only the great LLM / diffusion model technology, but also the incredible advances in zero-knowledge reinforcement learning where an AI can learn to "win" at any "game" where the board state can be measured and a reward function defined.
So I want my own test bed to try out my notions of blending natural language, diffusion models, reinforcement learning into elaborately orchestrated agents.
Notice from the time stamps last night that at 9:26pm I merged 2048 into main as it was in a good enough place for now, and then 9 minutes and 33 seconds later where I have my first commit on the chess branch with the comment that I have a working chess board:
Here was my prompt:
Okay my dear friend, we just spent the day doing polish and bug hunting on the 2048 part of this project.
I am hungry for something new!
I want to play chess!
Are there any open source chess engines I could use to drive a chess board here in react / next / sstv3?
Probably use these icons for the chess pieces?
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faChessKing, faChessQueen, faChessRook, faChessBishop, faChessKnight, faChessPawn } from "@fortawesome/free-solid-svg-icons";
How much of a chess game can you pull together in one-shot?
TIP: I have found that when working with LLMs both from ChatGPT and more so from Anthropic that I seem to get better responses - meaning deeper, more robust and more "adventurous" if I am as enthusiastic as my good friend Mike Fincke is 24/7.
This was already amazing right here, I knew stockfish was available but I did not know about the chess.js library before and the last time I tried to pull together this project I got bogged down trying to reinvent those wheels.
The features came fast and furious. Here's what the initial board looked like after just 20 minutes:
By the time I had finished the basic implementation, we had a fully featured chess interface :
I wanted to get Chess into a v.1 state so I can push it on to my site and start playing with it. But I was mid-way through the stockfish integration and thought I should probably wait. So make me a software switch to AI or not to AI? - One shot and here is a screen shot from Cursor.AI where I play Picard and "Make it so..." is my hard work!
I'm particularly proud of the code quality. Despite the rapid development, we maintained clean code standards:
After a quick cleanup session:
I've mapped out an ambitious roadmap for where I want to take this project... in comments generated by AI in an earlier session! To then get these displayed, why not have AI generate the markdown for the roadmap?
The next big step was getting Stockfish running. Here's a peek at the initial integration:
And some promising progress:
Getting stockfish up and running will be another post!
Trolley Problems All the Way Down!
Exploring the idea that every complex ethical dilemma can be reframed as a network of trolley problems
Everything is Search
A conversation with Leylines about searching the Hyperdimensional Universe
QuestMaster, PGGI, and the Future of AI Collaboration
Envisioning a new class of AI: structured goals, dynamic memory, and a gradient-based consciousness.
Get notified when I publish new blog posts about game development, AI, entrepreneurship, and technology. No spam, unsubscribe anytime.