I'm making a chess program in Unity and I've made a perft function to find the bugs in my move generator. I've downloaded Stockfish to compare the results.
From the starting chess position, with a depth of 3, my results match with Stockfish's for the most part. The only difference is after black's knight moves.
Here's Stockfish's result:
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
Nodes searched: 8902
And here are my results:
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: 420
b1c3: 460
g1f3: 460
g1h3: 420
Nodes searched: 8982
My algorithm is generating a total of exactly 20 more moves than Stockfish after each of black's knight move.
My question is, how can I use these results to find what illegal moves my program is considering legal? What's the fastest way to debug my algorithm given these or any future test results?
I couldn't find anything else online, that's why I'm asking here.