agausmann / perftree

Perft debugger. Compare your chess engine's move generation to Stockfish
MIT License
62 stars 4 forks source link

cannot compute diff: unexpected end of line #5

Closed diegopaiva1 closed 3 years ago

diegopaiva1 commented 3 years ago

Hello, thank you for developing this tool. However, I am struggling to make it work.

My perft program, e.g, my_perft.out, receives two args (depth and FEN) and outputs the nodes in the expected format according to the README.md file.

./my_perft.out 3 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
a2a3 380
b2b3 420
c2c3 420
d2d3 539
e2e3 599
f2f3 380
g2g3 420
h2h3 380
a2a4 420
b2b4 421
c2c4 441
d2d4 560
e2e4 600
f2f4 401
g2g4 421
h2h4 420
b1a3 400
b1c3 440
g1f3 440
g1h3 400

8902

When running perftree my_perft.out:

> fen
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
> depth 3
> diff
cannot compute diff: unexpected end of line
>

I tried removing the \n character after the total node count but the error persists. What can I do? Thank you in advance.

agausmann commented 3 years ago

Hi, this doesn't appear to be a problem with your script, this is an issue with Stockfish.

agausmann commented 3 years ago

Do you have it installed and runnable as the command stockfish? What does it output when you run it and provide this as input?

position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
go perft 3
diegopaiva1 commented 3 years ago

You are right. The problem was with Stockfish. I did have Stockfish installed and available from the command line. However, it probably had some very minor changes in its code base while I was testing its perft procedure.

By cloning Stockfish repo and recompiling it from scratch solved the issue. Now perftree is working just fine. Thanks!