ABC — a chess programming book for beginners

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
maksimKorzh
Posts: 777
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

ABC — a chess programming book for beginners

Post by maksimKorzh »

Hello everyone!

I’ve just finished a small project I’ve been working on: ABC (Array Based Chess).

The important part is that this is a book about building a chess engine, not simply a chess engine repository.

The book walks through the complete implementation of ABC, from the basics of board representation and 0x88 all the way to move generation, legality, perft, hashing, evaluation, quiescence search, negamax, iterative deepening, time management, and UCI communication.

The engine itself is intentionally simple and didactic. I’m not trying to compete with modern engines — the goal is to make the code understandable enough that someone can actually read it, experiment with it, break it, fix it, and eventually build their own engine.

The repository contains:

📖 the complete static HTML book
♟️ the ABC C source code covered throughout the book
🎮 example games, including games where ABC defeats TSCP

One of the main reasons I made this is that I wish I had something like it when I started chess programming nearly ten years ago. There is a lot of information about individual chess-programming techniques, but understanding how all those pieces fit together into one complete engine is a different challenge.

So this is my attempt to document that journey in one place.

The book is free, the code is free, and hopefully it will be useful to someone starting their own chess-programming journey.

Read book online: https://maksimkorzh.github.io/abc/
ABC source: https://github.com/maksimKorzh/abc

For CCRL testers:
Don't waste time testing it - it has a search very similar to TSCP and eval is a pure PeSTO approach, so it's like TSCP with PeSTO eval.