Skip to main content

Posts

Showing posts from June, 2022

Perft to find bugs in move generation

22 Jun 2022 after 2 am almost completed legal move generation function issue : sometimes switches black and white during random play issue : handling castling rights and enpassant squares while undoing a move 23 Jun 2022 after 12 am bugfix :  san  notation doesn't show promotion added  perft  and  divide  function now we can find corner cases easily! 2 am wasted 1 hour on why I'm getting 1 move less than expected reason: code generates kingside  else  queenside castling moves 🥲 3 am bugfix : now engine checks threatened squares during castling improved  perft  function still a lot of things to do (getting wrong  perft  results)

Legal move generation

17 Jun 2022 after 2 am added  fen  output, generates direct url to lichess analysis! afternoon repaired enpassant and castling moves refactored move generation function minor  san  notation improvements started legal move generation function

After a long break...

16 Jun 2022 after a long break (made a snake clone in c++ during this time, check it out!) still coding move generation moved hard-coded numbers to Enums ( Direction  and  Player ) refactored sliding moves (Q, B, R) added  pgn  output (ugly but atleast lichess can parse) now engine generates moves from both sides, yay! separated  main.cpp  into several header and cpp files

Move generation

1 Jun 2022 after 12 am ditching color output for now reading evening, night more reading modularizing, exceptions 2 Jun 2022 after 12 am started writing this blog lol ### started writing move generation function