Launchess

Somehow, the concept to program music equipment to beat me at chess hasn't happened just once.

Launchess was actually a rewrite of an earlier experiment I'd done a few years ago to less success. The concept was to get a Launchpad - a MIDI controller by Novation for the DAW Ableton (music making software) - to accept and reply with custom MIDI signals in order to play a game of chess. Why? Because a Launchpad is an 8x8 grid of squares with LEDs under each one - the same as a chess board (maybe minus the LEDs).

When a stupid idea like this comes up, I find it hard to not at least try. Launchess went through a few iterations of trial and error until I stumbled upon the super-helpful developer guide published by Novation themselves. It gave details of all the MIDI signals the Launchpad used to communicate, what to send to it to put it into different lighting modes and more. It was definitely the make-or-break piece of information I needed to get it working.

Loading...
An image of the Launchpad equipment, lit up in a chess board pattern.
An image of the Launchpad equipment, lit up in a chess board pattern.

After trying to write my own chess engine to interface with the board, I realised I lacked the chess expertise (chesspertise if you will) to do that, and just went with the great chess npm library. It was then just a case of syncing the chess instance's game with what was happening on the screen - complete with some fun animations when pieces were in check, captured etc.

The project was then hooked up to Lichess, a chess website where 'bot' accounts are allowed to read the real-time positions of a game and make moves on a player's behalf - however, I turned it on its head a bit and let a Lichess bot account play against me instead, as you can 'challenge' variations of the Stockfish chess engine to matches to practice your skills.

Loading...
A close-up of the LEDs lit up on the board.
A close-up of the LEDs lit up on the board.

A robot playing chess against a man