/toyfish

Didactic chess engine in Python for absolute beginners

Primary LanguagePython

Toyfish: YOUR FIRST CHESS PROGRAM

Didactic chess engine for absolute beginners in only 100 lines of python code!

Toyfish | Toyfish mini | Toyfish mini specs

Features

  • simple CLI to play
  • Only 100 lines of code
  • Material & PST evaluation
  • 3 nested loops move generation
  • Brute force negamax search algorithm
  • 10x12 array based board representation
  • Source code & chess rules data are separated

Limitations

  • no castling
  • no enpassant captures
  • queen only promotions
  • no stalemate detection
  • no move legality checking
  • no 3 fold repetition detections

Step by step YouTube tutorials

IMAGE ALT TEXT HERE