Hello,
I make an AI I made a lot of game on lichess.com ( about 150 ) I have never encountered any problem ( illegal move ) I have 2000 elo on lichess but when I run a PerfT I obtain theses results :
1 : 20
2 : 400
3 : 8,902
4 : 197,281
5 : 4,865,867 <- problem should be 4,865,609 ( 4,865,609 + 258 en passant = 4,865,867 ?? )
6 : 119,072,421 <- problem should be 119,060,324
To determine legal move I make the move and if the king is check then I remove the move from list move
I implemented en passant, castling ( with rules ), promotions ...
I would like to know if there are several test which can isolate some probably problem
Thank you
Debug with PerfT
-
- Posts: 616
- Joined: Thu May 19, 2011 1:35 am
Re: Debug with PerfT
There are perft tests with things like 'divide' built into them that allow you to itemize.
Here is a thread about perft + divide. Stockfish will do this for you, so if you implement it for your engine, you can track down the branches that fail more easily.
http://www.talkchess.com/forum/viewtopi ... vide+perft
Here is a thread on debugging perft:
http://www.talkchess.com/forum/viewtopi ... vide+perft
Here is a place to get divide perft lists for huge trees:
http://talkchess.com/forum/viewtopic.ph ... ght=divide
Here is a thread about perft + divide. Stockfish will do this for you, so if you implement it for your engine, you can track down the branches that fail more easily.
http://www.talkchess.com/forum/viewtopi ... vide+perft
Here is a thread on debugging perft:
http://www.talkchess.com/forum/viewtopi ... vide+perft
Here is a place to get divide perft lists for huge trees:
http://talkchess.com/forum/viewtopic.ph ... ght=divide
Re: Debug with PerfT
Thank you for your link , I used JetChess on your first link and I have been able to divide and determine my problem. I generate 2x each move En passant because of an "if" instead of "else if" so now I obtain the right result now
Thank you
Thank you