Dog Plays Chess On ESP32

The ESP32 is s remarkably powerful microcontroller, where its dual-core processor and relatively high clock speed can do some impressive work. But getting this microcontroller designed for embedded systems to do tasks that would generally be given to a much more powerful PC-type computer takes a little bit more willpower. Inspired by his dog, [Folkert] decided to program an ESP32 to play chess, a famously challenging task for computer scientists in the past. He calls this ESP32 chess system Dog.

One of the other major limitations of this platform for a task like this is memory. The ESP32 [Folkert] is using only has 320 kB of RAM, so things like the transposition table have to fit in even less space than that. With modern desktop computers often having 32 or 64 GB, this is a fairly significant challenge, especially for a memory-intensive task like a chess engine. But with the engine running on the microcontroller it’s ready to play, either in text mode or with something that can use the Universal Chess Interface (UCI). A set of LEDs on the board lets the user know what’s going on while gameplay is taking place.

Continue reading “Dog Plays Chess On ESP32”

Microchess Remembered

Playing chess has always been a bellwether for computers. The game isn’t trivial, but the rules are managably simple. However, the game is too complex to be easily solved entirely, so you have to use tricky software to play a credible game. Big computers do have an advantage, of course. But Microchess — arguably the first commercial game for home computers — was able to play on tiny machines like the Kim-1. [Joachim Froholt] interviewed [Peter Jennings] — the man behind Microchess to learn the whole story of its creation.

In 1960, [Jennings] was ten years old and had to persuade the local librarian to let him read adult books on electronics and computers. Five years later, a ham radio teletype and some circuitry helped him practice chess openings and was the first of many chess-playing machines he’d build or program.

Microchess itself took six months of painstaking programming, entering hex codes into the computer. Word leaked out from a user’s group meeting (where Microchess beat a human player), and [Jennings] was swamped with requests for the program. In late 1976, the program was offered for sale as a teletype listing or, for an extra $3, a cassette tape.

The program went on to be very successful and moved to other platforms. Commodore even made a special dedicated device based on the Kim-1 to play Microchess, a piece of hardware unique enough that [Michael Gardi] honored it with one of his phenomenal replicas.

PI Board chess board on a table in a room

Chess What: One More Pi-Powered Board

Chess is timeless, but automating it? That’s where the real magic begins. Enter [Tamerlan Goglichidze]’s Pi Board, an automated chess system that blends modern tech with age-old strategy. Inspired by Harry Potter’s moving chessboard and the commercial Square Off board, [Tamerlan] re-imagines the concept using a Raspberry Pi, stepper motors, and some clever engineering. It’s not just about moving pieces — it’s about doing so with precision and flair.

At its core, the Pi Board employs an XY stepper motor grid coupled with magnets to glide chess pieces across the board. While electromagnets seemed like a promising start, [Tamerlan] found them impractical due to overheating and polarity-switching issues. Enter servo linear actuators: efficient, precise, and perfect for the job.

But the innovation doesn’t stop there. A custom algorithm maps the 8×8 chess grid, allowing motors to track positions dynamically—no tedious resets required. Knight movements and castling? Handled with creative coding that keeps gameplay seamless. [Tamerlan] explains it all in his sleekly designed build log.

Though it hasn’t been long since we featured a Pi-powered LED chess board, we feel that [Tamerlan]’s build stands out for its ingenuity and optimization. For those still curious, we have a treasure trove of over fifty chess-themed articles from the last decade. So snuggle up during these cold winter months and read up on these evergreens!

Continue reading “Chess What: One More Pi-Powered Board”

Building A Pi-Powered LED Chess Board

If you live near Central Park or some other local chess hub, you’re likely never short of opponents for a good game. If you find yourself looking for a computer opponent, or you just prefer playing online, you might like this LED chessboard from [DIY Machines] instead.

At heart, it’s basically a regular chessboard with addressable LEDs of the WS2812B variety under each square. The lights are under the command of an Arduino Nano, which is also tasked with reading button inputs from the board’s side panel. The Nano is interfaced with a Raspberry Pi, which is the true brains of the operation. The Pi handles chess tasks—checking the validity of moves, acting as a computer opponent, and connecting online for games against other humans if so desired. Everything is wrapped up with 3D printed parts, making this an easy project to build for the average DIY maker.

The video tutorial does a great job of covering the design. It’s a relatively simple project at heart, but the presentation is great and it looks awfully fun to play with. We’ve featured some other great builds from [DIY Machines] before, too. Video after the break. Continue reading “Building A Pi-Powered LED Chess Board”

Playing Chess Against LLMs And The Mystery Of Instruct Models

At first glance, trying to play chess against a large language model (LLM) seems like a daft idea, as its weighted nodes have, at most, been trained on some chess-adjacent texts. It has no concept of board state, stratagems, or even whatever a ‘rook’ or ‘knight’ piece is. This daftness is indeed demonstrated by [Dynomight] in a recent blog post (Substack version), where the Stockfish chess AI is pitted against a range of LLMs, from a small Llama model to GPT-3.5. Although the outcomes (see featured image) are largely as you’d expect, there is one surprise: the gpt-3.5-turbo-instruct model, which seems quite capable of giving Stockfish a run for its money, albeit on Stockfish’s lower settings.

Each model was given the same query, telling it to be a chess grandmaster, to use standard notation, and to choose its next move. The stark difference between the instruct model and the others calls investigation. OpenAI describes the instruct model as an ‘InstructGPT 3.5 class model’, which leads us to this page on OpenAI’s site and an associated 2022 paper that describes how InstructGPT is effectively the standard GPT LLM model heavily fine-tuned using human feedback.

Continue reading “Playing Chess Against LLMs And The Mystery Of Instruct Models”

White pieces on a teal and white chess board. The line of pawns shows three segmented queens in the foreground, one piece being pressed by a man's hand from above in a state between queen and pawn, and the remainder of the pawns in the background in the pawn state.

Transforming Pawn Changes The Game

3D printing has allowed the hobbyist to turn out all sorts of interesting chess sets with either intricate details or things that are too specialized to warrant a full scale injection molded production run. Now, the magic of 3D printing has allowed [Works By Design] to change the game by making pawns that can automatically transform themselves into queens.

Inspired by a CGI transforming chess piece designed by [Polyfjord], [Works By Design] wanted to make a pawn that could transform itself exist in the real world. What started as a chonky setup with multiple springs and a manually-actuated mechanism eventually was whittled down to a single spring, some pins, and four magnets as vitamins for the 3D printed piece.

We always love getting a peek into the trial-and-error process of a project, especially for something with such a slick-looking final product. Paired with a special chess board with steel in the ends, the magnets in the base activate the transformation sequence when they reach the opposite end.

After you print your own, how about playing chess against the printer? We’d love to see a version machined from metal too.

Thanks to [DjBiohazard] on Discord for the tip!

Continue reading “Transforming Pawn Changes The Game”

Playing Chess Against Your Printer, With PostScript

Can you play chess against your printer? The answer will soon be yes, and it’s thanks to [Nicolas Seriot]’s PSChess. It’s a chess engine implemented in PostScript, of all things. It’s entirely working except for one last hurdle, but more on that in a moment.

What’s it like to play PSChess? Currently, one uses a PostScript interpreter (such as GhostScript) to run it, much like one would use the Python interpreter to run Python code. The user inputs moves by typing in commands like d2d4 (representing a piece’s source coordinate and a destination coordinate on the 2D board). Then the program makes a move, and outputs an updated board state to both the console and a PDF document. Then it’s the user’s turn again, and so on until somebody loses.

The chess parts are all working, but there’s one last feature in progress. The final step of the project is to enable PSChess to be run directly on a printer instead of using GhostScript as the interpreter. Intrigued? You can find the code at the project’s GitHub repository.

So why PostScript? While it is a Turing-complete stack-based interpreted language, it was never intended to be used directly by humans. There are no meaningful development tools to speak of. Nevertheless, [Nicolas] finds PostScript an appealing tool for programming projects and provides tips and techniques for like-minded folks. One of the appeals is working within constraints to solve a problem, just like implementing a chess engine in only 4k, or draw poker in 10 lines of BASIC.