Page 3 of 3

Re: Best way to debug perft?

Posted: Fri Feb 26, 2016 4:50 pm
by stegemma
qperft is fast and almost... perfect!

Any modern engine can be used too, even my satana is good enough but not faster as others.

Re: Best way to debug perft?

Posted: Fri Feb 26, 2016 5:17 pm
by Luis Babboni
stegemma wrote:qperft is fast and almost... perfect!

Any modern engine can be used too, even my satana is good enough but not faster as others.
I just end of tried it.

The command seems to be perft depth as in Sharper.

And gives me 20 as Sharper!
What I understood wrong?
I count 21 possible moves in that position! :?:
a5,b3,b4,c3,c4,d3,d4,e3,e4,f3,f4,g3,g4,h3,h4
Ra2,Ra3,Na3,Nc3,Nf3 and Nh3.

Re: Best way to debug perft?

Posted: Fri Feb 26, 2016 5:33 pm
by stegemma
Luis Babboni wrote:
stegemma wrote:qperft is fast and almost... perfect!

Any modern engine can be used too, even my satana is good enough but not faster as others.
I just end of tried it.

The command seems to be perft depth as in Sharper.

And gives me 20 as Sharper!
What I understood wrong?
I count 21 possible moves in that position! :?:
a5,b3,b4,c3,c4,d3,d4,e3,e4,f3,f4,g3,g4,h3,h4
Ra2,Ra3,Na3,Nc3,Nf3 and Nh3.
you must setup the position first, giving this command:

Code: Select all

setboard rnbqkbnr/1ppppppp/p7/8/P7/8/1PPPPPPP/RNBQKBNR w KQkq - 0 2
perft 1

Re: Best way to debug perft?

Posted: Fri Feb 26, 2016 5:56 pm
by Luis Babboni
Thanks! Now yes.
I thought it was enough given the position in the GUI chessboard. :oops:

Re: Best way to debug perft?

Posted: Fri Feb 26, 2016 6:03 pm
by stegemma
Luis Babboni wrote:Thanks! Now yes.
I thought it was enough given the position in the GUI chessboard. :oops:
If you want to develop a chess engine, maybe it is better if you get comfortable with the command line, not just the GUI.

Re: Best way to debug perft?

Posted: Fri Feb 26, 2016 6:14 pm
by elcabesa
I suggest to not rely on sharper for perft.
I think to remember that sometimes it return wrong perft values. I hope to not have make a mistake and given bad word against sharper, but those are my memories.

I think there are stronger engines you can rely on, for example stockfish. it implement perft.
some engines implement the divide command too. it's used to debug perft.

bye :)

Re: Best way to debug perft?

Posted: Sat Feb 27, 2016 8:32 am
by Mincho Georgiev
You can take a look at my code at http://pawny.netii.net/. The entire perft.c is dedicated to movegen's debugging.
It's very simple to understand and you can switch off/on hashing for example. The cmd line interface of the engine is again - entirely developed for debugging purposes.
Then you have the 'epdtest' command that works with files with pre-calculated node counts for positions up to certain depth. Like this one:
http://pawny.netii.net/my_perftsuite.epd
So basically 'epdtest my_perftsuite.epd' will run the entire test and compare the node counts for each depth (like the 'divide' command).