Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move generation test suite

Author: Andreas Guettinger

Date: 13:32:25 03/31/04

Go up one level in this thread


On March 31, 2004 at 14:00:27, Russell Reagan wrote:

>On March 31, 2004 at 13:23:23, Andrew Wagner wrote:
>
>>    1.) No move generator can get through this test without being right.
>
>At first thought, this seems like a bad idea to me (assuming it is correct after
>only 100 test positions). You are testing 100 cases out of some huge number and
>then assuming that part of your program is correct. If there is a bug in your
>move generator later on, you will look at everything except your move generator
>because you assumed that was working correctly.
>
>I think that if you used some test suite like this along with many other tests,
>then you might be able to have confidence in your move generator. This test
>suite idea sounds like a good way to find major bugs in a move generator. But
>passing this test suite doesn't really prove a move generator's correctness, and
>proving correctness is what you are claiming by "no move generator can get
>through this test without being right."
>
>I think you need to do several different tests to be confident that your program
>is right. You could do a test suite like this, run simple test suites of mate in
>ones and see if your program solves them all, run lots of perfts and compare
>with other engines (automate something to run overnight or for a few days), and
>read over your source code slowly, asking yourself questions like, "what does
>this line of code REALLY say?" Lots of times I write something, then I narrow
>down a bug to that line of code, and I realize that what I wrote doesn't do what
>I intended it to do. It takes a lot of different approaches to be confident
>about your program's correctness, and even then, it's hard to be 100% sure.

I think what he does is not the right way, but his test positions are a bit to
simple.
But calculating perft and comparing it to other engines is a pretty sensitive
test. I would guess if an engine gets the perft 5 of the Kiwipete postition
right, it's almost 99% sure bugfree. ;)

How will you draw conlcusions from solving mate in one positions? The movegen
has only to find the mating move, if it forgets about all the rest of the move
it's still mate in one.

Actually he did "automate something", and calculates perft values of lots of
positions and compares them to other engines. Although the positions should be
more complex.

regards
Andy

PS: Reading the code carefully does help, but you will allways miss one or the
other bug, in my experience. :)



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.