How to test an alpha beta implementation?
Posted: Fri Sep 14, 2007 8:15 pm
Hello All You Smart People!
I have recently started re-writing my chess engine, and this time, i have decided to develope a lot of test methods for it, before adding any complexity.
So right now i have a simple move generator.
A very simple piece square table and material evaluation.
And a straight alpha-beta search with a simple quiescent search also.
Nothing else.
The move generator is tested using a lot of known perft values for various positions.
The evaluation is verified to be at least symmetrical by a simple test reading epd files and reversing the positions, comparing the evaluations.
But what about the search??
Is it possible to verify the correctness of the alpha-beta implementation?
As it is now, it is simple, but when null move, pvs, extensions, lmr, etc. is added, it becomes incresingly complex to verify it.
My thoughts so far is to dump the search to a file, and then writing a "tree-viewer" for it and basically go it over by hand.
Is there an alternative/better/easier way to test/verify a search implementation?
Kind regards,
Jesper
I have recently started re-writing my chess engine, and this time, i have decided to develope a lot of test methods for it, before adding any complexity.
So right now i have a simple move generator.
A very simple piece square table and material evaluation.
And a straight alpha-beta search with a simple quiescent search also.
Nothing else.
The move generator is tested using a lot of known perft values for various positions.
The evaluation is verified to be at least symmetrical by a simple test reading epd files and reversing the positions, comparing the evaluations.
But what about the search??
Is it possible to verify the correctness of the alpha-beta implementation?
As it is now, it is simple, but when null move, pvs, extensions, lmr, etc. is added, it becomes incresingly complex to verify it.
My thoughts so far is to dump the search to a file, and then writing a "tree-viewer" for it and basically go it over by hand.
Is there an alternative/better/easier way to test/verify a search implementation?
Kind regards,
Jesper