Hello everybody,
I've just ending my move generator.
And in order to test it deeply, i'd like to know if exists a sample set of (position vs Legal Moves) somewhere in the web.
After a quick search on the forum, i found a link to this
https://bitbucket.org/rhalbersma/dctl/s ... at=gcc-dev
but what's i'm looking for is a set of hundreds or thousands of positions.
anyone?
thanks.
Testing Legal Moves generator.
Re: Testing Legal Moves generator.
Phil, you could use the Perft utility program approach.
See all the posts in this forum.
If (in the end) the node count for you MoveGenerator is the same as previous node count values, you might expect that your implementation is okish..
Bert
See all the posts in this forum.
If (in the end) the node count for you MoveGenerator is the same as previous node count values, you might expect that your implementation is okish..
Bert
-
- Posts: 1722
- Joined: Wed Apr 14, 2004 16:04
- Contact:
Re: Testing Legal Moves generator.
Hi Phil,phil wrote:Hello everybody,
I've just ending my move generator.
And in order to test it deeply, i'd like to know if exists a sample set of (position vs Legal Moves) somewhere in the web.
After a quick search on the forum, i found a link to this
https://bitbucket.org/rhalbersma/dctl/s ... at=gcc-dev
but what's i'm looking for is a set of hundreds or thousands of positions.
anyone?
thanks.
The link you gave contains some positions from the Italian translation of the offical FMJD rules for 10x10 draughts. I tested this in my library, but it's indeed far from exhaustive. As Bert indicated, you could also use perft() on a few positions. On this forum, we mainly use 3 positions that Ed Gilbert started out with back in 2008. The perft() routine searches for about a dozen ply deep, and gets up to a few billion positions internally. It's a good check on your move generator's correctness, however, it's not a guarantee that it will test every nuance of the game rules. E.g. in Italian draughts, there is a very complicated majority capture precedence rule that is triggered only in very specific circumstances. To test that, just make your own unit tests (like the ones in the link you gave in your post) and test them separately.
Rein