Devlog 0x12 - zduel match manager
Devlog 0x12 - Over the past week, I created on a simple chess match manager that runs in the terminal. Here is a brief overview of it and some of the features it has.
Long form thoughts on programming, development, system design, and more.
Devlog 0x12 - Over the past week, I created on a simple chess match manager that runs in the terminal. Here is a brief overview of it and some of the features it has.
Devlog 0x11 - Today, I was forced to use a Jupyter Notebook to do some row reduction problems. Juptyer Notebooks are not my style, so I wrote a terminal based Gaussian Elimination program in Zig.
Devlog 0x10 - Today, I will be talking about the current state of Kirin, existing issues, as well as officially releasing a working, chess playing binary.
Devlog 0xF - Today I will talk about the change in frequency of devlogs and the future of Kirin development.
Devlog 0xE - Today, I took a deeper look into move generation to attempt to find the missing moves for kiwiPete depth 2 and found one of the errors mentioned in Devlog 0xC, a missing castling move.
Devlog 0xD - Today, I modified my approach to move generation to be more inline with engines like Stockfish and Crafty. This new approach is called Pseudo Legal Move Generation with Immediate Legality Testing. This approach first generates pseudo-legal moves and then tests them for legality by checking to see if the king is left in check.
Today, I worked on debugging movegen further. Significant progress was made, correctly removing moves that put the king in check before we add them to the move list and therefore reducing the number of invalid nodes being created by ~300.
Devlog 0xB. Today, I made significant progress in enhancing the testing framework for my chess engine. I added a new file, tests.zig, which contains all the necessary tests to validate engine functionality. Additionally, I updated the build.zig file to support running these tests seamlessly. This ensures that any new changes can be automatically tested, streamlining the development process and reducing the likelihood of regressions.
Devlog 0xA. Implementing perft testing and trying to debug the results.
Devlog 0x9. Over the last 24 hours, I have done a lot of learning and a lot of refactoring to Kirin. Here are the changes that were made.
Devlog 0x8. Today, we will talk about encoding and decoding chess moves. We need this so that we can store possible moves as 32 bit integers.
Devlog 0x7. Today, I started the initial implementation of my generateMoves() function, which will eventually enumerate all possible moves in a chess position. My focus for this session was on the “quiet” (i.e., non-capturing) pawn moves for both White and Black pawns.
Devlog 0x6. Today, I implemented and tested the isSquareAttacked function, which determines whether a given square on the board is attacked by a specific side (white or black). This function is central to many chess-engine calculations—for instance, evaluating checks, pins, and tactical possibilities.
Devlog 0x5. There were discrepancies between the expect output when generating rook attack tables and the value generated. Here is the journey through debugging this issue.
Devlog 0x4. Today, I implemented a parseFEN function into Kirin. FEN, which stands for Forsyth-Edwards Notation, is the standard notation to describe positions of a chess game. Also, some debugging that I have yet to solve.
Devlog 0x3. Today, I implemented a printBoard function that iterates through the list of piece bitboards and prints a representation of the current game state, along with general improvements to the popBit() and setBit() functions.
Devlog 0x2. Today, I implemented magic bitboards for sliding pieces in Zig.
Devlog 0x1. This edition covers my implementation of a pseudo random number generator using the XORSHIFT32 algorithm.
Initial Devlog. This edition goes over creating relevant bit masks for the rook and bishop.
A brief writing of my New Years Goals, Plans, and Resolutions. I am writing them and making them publicly available in hopes that I actually follow my plans for once, and to hold myself accountable to my goals and resolutions.
In my first semester at Mines, I wrote a chess engine in C named Kirin. During Winter Break, I took it upon myself to learn Zig by rewriting Kirin in this new, fun systems level language.