I've started to code my own little engine recently and am now working on a perft function which simply sees how many moves there are. Trying to get correct results I searched online for the correct amount of possible positions after e.g. 4 moves. Now according to these sources:


It should be 197281 possible positions after 4 moves, and I can reach that in my code!

But switching a bit around in my code to get some optimization which seemingly shouldn't change anything, I get a different number: 197742 Now I would think that is wrong but I have found different sources again, claiming that is in fact correct:


So, which one is it? 197742 or 197281 possible positions after 4 moves? I was a bit uncertain whether this belongs here or on StackOverflow. I went with this one, I hope that's alright.

EDIT: apparently I can't post more than two links due to my low reputation I'll post the links in comments

Thanks in advance Folling


1 Answer 1


The chess programming wiki is correct:


197281 is the number. I remember I used Stockfish to generate the same number while debugging my code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.