Skip to content

Conversation

@Hardcode3
Copy link
Owner

@Hardcode3 Hardcode3 commented Jan 22, 2026

📌 Perft implementation

📄 Description

  • Implemented perft and perft_divide to debug move generation until depth 6
  • Added tests to run perft on a regular basis
  • Added custom tests flags to separate perft tests with depth <= 3, depth = 4 & 5 and depth >= 6
  • Added new ctest presets:
    • quick validation: within seconds
    • intermediate validation: within the minute
    • deep validation: within the hour
    • full suite: all the available tests
  • Updated workflows to use the quick validation test preset
  • Updated cmake documentation in doc/
  • Fixed a bug where a pawn that generated en passant while giving check to the opponent would not allow the en passant move capturing the checker pawn.
  • Added clang tidy compiler flags in debug mode to disable all the optimisations. It now allows the use of some functions directly inside the debugger (like Bitboard.print()).
  • Changed signature void generate_legal_moves(std::vector<Move>& moves, const Board& board, Color us) to inline void generate_legal_moves(std::vector<Move>& moves, const Board& board). This allows to pass the side to move as a board state member and avoids duplication and potential conflicts.

🧩 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📝 Documentation update
  • ✅ Test addition or update
  • 🔧 Build or CI/CD configuration

…s. one position still fails at depth 5 and must be fixed. depth 6 runs for too long to be in the tests.
…flicting with the new compiler flags that removes implicit inlined functions
…er pawn that generated en passant did not generate the legal en passant capture that would have removed the checker
@Hardcode3 Hardcode3 self-assigned this Jan 26, 2026
@Hardcode3 Hardcode3 added bug Something isn't working docs Improvements or additions to documentation testing Adding, updating or removing any kind of tests. feat Implementation of a new feature ci Anything linked to continuous integration workflows. enhancement Improving the code base in any way. move-generation Chess moves generation (legal, pseudo-legal). labels Jan 26, 2026
@Hardcode3 Hardcode3 marked this pull request as ready for review January 26, 2026 10:55
@Hardcode3 Hardcode3 merged commit d65fe26 into main Jan 26, 2026
3 checks passed
@Hardcode3 Hardcode3 deleted the perft branch January 26, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Anything linked to continuous integration workflows. docs Improvements or additions to documentation enhancement Improving the code base in any way. feat Implementation of a new feature move-generation Chess moves generation (legal, pseudo-legal). testing Adding, updating or removing any kind of tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants