I have just started the long journey of programming a Chess engine in c++. I'm not a programmer although I have enough knowledge to wite ugly but working code!
After several days of frustration I think I have a working move generator plus makemove and unmake move,so I can check against the 6 positions on https://www.chessprogramming.org/Perft_Results. So far I have checked up to depths 7,6, 8,6, 5 and 6 respectively with no errors. Can I reasonably assume that most if not all edge cases will have been covered by these depths?
The next is on the topic of speed and whether what I have written so far will be reasonably quick enough to not be the limiting factor later on for thhe rest of the engine. I have done some reading on the subject and my perft function is the most basic flavour with no bulk_counting, hashing or any other tweaks. Perft function below:
Code: Select all
uint64 Board::Perft(int depth)
{
MoveList moves;
int nMoves, i;
uint64 nodes = 0;
if (depth == 0) return 1;
nMoves = genMoves(moves);
for (i = 0; i < nMoves; i++)
{
if (makeMove(moves.move[i]))
{
nodes += Perft(depth - 1);
undoMove(moves.move[i]);
}
else
{
if (depth==1) nodes += 1;
}
}
return nodes;
}
I can't recall where, but I think I read that the top engines are generating in the region of 200 million nodes per second.
It's a very subjective question but is 14 million a reasonable starting point to continue developing the rest of the engine?
Thanks for any pointers in the right directions