Back to blog

2026-02-17 · 5 min read

Chess Engine Day 1 Recap

Day 1 of my handcrafted chess engine. No AI help or copying.

  • Progress
  • Chess
Chess Engine Day 1 Recap

Recap:


Each day I work on this project I want to provide a little snapshot of my progress. Eventually I'll maybe start recording videos but it's hard at school with a roommate.

Find the code for my Day 1 commit here

Brief Documentation:


Today I got started with two classes, ChessGame and ChessMove.

ChessMove – A pydantic BaseModel I use to parse algebraic notation for chess moves into information I can use/store.

  • I'm not entirely sure how useful this will be, but I know I will need it to some degree.
  • Searches chess notation moves for the move number, the piece, square, check/mate, ...
  • Init function just accepts the move notation and the color that moved
  • Allows my board abstraction in ChessGame to interface with the notation

ChessGame – Stores all of the data for an individual game

  • A board is initialized as a 2d numpy array with different int for the pieces. Black is negative.
  • Store a history of the moves as an array of ChessMove objects
  • Keeps status of checking rights on both sides
  • I created function declarations for move validation but they aren't done at all yet

main – used for testing pretty much today

Thoughts:


I'm happy with my progress so far. As I develop, I'm keeping the idea of scaling this to an actual api in the back of my mind. It's important that everything is modular and clean; logic needs to be separated wherever possible. I think the logic for parsing chess notation into data I can use will prove super useful.

The core functionality for the game that I really need seems to be:

  • Move validation
  • Board storage
  • Notation parsing

Once those are complete, I will have an intereface for chess games that the computer should be able to understand. That's my first goal, and we can go for there.

Photos & Video