Back to blog

2026-02-19 · 5 min read

Chess Engine Day 3 Recap

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

  • Progress
  • Chess
Chess Engine Day 3 Recap

Recap:


Find the code for my Day 3 commit here

Progress:


Today I finished pawn move validation in my ChessGame class!

validate_pawn_move(self, move: ChessMove) -> bool – A function that takes in a ChessMove object and analyzes the validity of a pawn move.

  • The goal is to have a move validation function for each piece type so I can just use simple case branching logic to validate moves
  • After validating that the move can actually happen on the board, I plan to create a deep copy of the board with the movement to ensure we don't move into check
  • Following a successful validation, I'll replace self.board with the updated board based on the move

This is a great step in the right direction towards validating moves. Once I can successfully validate that moves work, I can actually have 2-player functionality.

Next Steps:


  • I need to finish a validate_xxxxx_move() function for each piece
  • There also has to be a function that takes in the new board and validates that the player doesn't move into check
  • Down the line, I think I can simplify user input to not require super strict chess notation. A natural language chess game could be really neat.

Photos & Video