Engines!
Loose history of my mediocre advancements into the world of chess engines.
Kairuku
Kairuku is an extinct genus of penguin. It contains three species, K. grebneffi, K. waitaki and K. waewaeroa. This taxon is known from bones from 27 MYA (late Oligocene), from the Kokoamu Greensand Formation of New Zealand. - Wikipedia
In 2018, I was working on a uni project for a Reversi (also known as Othello) AI. A basic Reversi framework was given, with the goal to write an AI that would play as well as possible. The framework was horribly inefficient and horrible from a clean code perspective, so naturally it tickled my fancy. After rewriting it from scratch with a custom Reversi Bitboard implementation, I was looking for another challange.
In early 2019, I spend around four weeks writing my first chess engine, Kairuku, in Java. My first implementation was very basic, using arrays of enums to represent the board state. The performance was terrible, I didn’t know about Perft, so naturally the move generation was very buggy, and it’s strength was bad, as expected. I improved it gradually, adding Bitboards, Magic Bitboards, MVV-LVA, a Transposition Tables and more, while still using a very primitive time control and simple heuristic made up from Piece-Square Tables and Point Values.
The project also includes a mediocre implementation of UCI and a Lichess client.
Kairuku has been playing on Lichess since mid-2019 under the pseudonym QueensGamBOT (No relation to the TV series), accepting more than 11000 challanges. It’s rated at around 1800 for bullet and 1700 for blitz.
Links:
- Kairuku on Github
- Kairuku on Lichess (for now)
Inkayaku
Inkayacu is a genus of extinct penguins. It lived in what is now Peru during the Late Eocene, around 36 million years ago. A nearly complete skeleton was discovered in 2008 and includes fossilized feathers, the first known in penguins. -Wikipedia
At some point during the Dark Times, I got the idea to learn Rust to improve my chess engine. Turns out learning Rust is kinda tedious, so I only came back to the idea in late 2022, starting with reading The Book™ and doing the Rustlings course on Jetbrais Edu. In November of 2022, I started working on reimplementing Kairuku in Rust, under the new name of Inkayaku.
I made good progress building core constants, move generator and UCI interface. Out of the gate, I achieved a decent performance improvement on Perft, improving it to around 80% with a small optimization. I stopped working on the project after banging my head against the wall for several days on a bug in the search, instead spending my december doing Advent of Code in Rust.
I came back to the project in August of 2023, finally fixing the bug in the search after a few more days of debugging. I used the newfound motivation to jump straight back into the project, adding many fixes and improvements and starting work on the Lichess API. Ah yeah, and I also started this Page.