Unit Testing a move generator

Discussion of chess software programming and technical issues.

Moderator: Ras

Felpo

Unit Testing a move generator

Post by Felpo »

First of all, I'm new in this group and I wish to greet everybody.
I'm basically new in chess programming too. I'm triyng to create an engine in C#, and I did experimentate some different sort of move generator, to achieve a decent speed. The most frustrating thing was testing every time the generator to be sure it works properly. So I decided to write a little tool and publishing it as an Open Source program. The tool let us compare a trusted engine ( capable of some commands as "divide" ) whit our engine, starting from a given FEN and depth. The tool will automatically discover wich
move fails the "divide" count, and recursively dig in the offending position to investigate what exactly gone wrong.
You can dowload the tool here: http://www.codeplex.com/ChEngine/Wiki/V ... or%20Scope
( it requires Microsoft.NEt Framework to run).
I hope this will be useful to others as it was for me :)
User avatar
Steve Maughan
Posts: 1278
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: Unit Testing a move generator

Post by Steve Maughan »

Felice,

Welcome! Be warned, chess programming is more addictive than crack cocaine - once you start it's impossible to stop. However, it's not as bad your health - so enjoy!

Your tool is a great idea. I like it. Everyone has to thoroughly test the move generation of their engine so I image it'll be helpful. I see it's Winboard based - UCI doesn't have perft protocols, whihc is a pity.

All the best,

Steve
Felpo

Re: Unit Testing a move generator

Post by Felpo »

Steve Maughan wrote:Felice,

Welcome! Be warned, chess programming is more addictive than crack cocaine - once you start it's impossible to stop. However, it's not as bad your health - so enjoy!

Your tool is a great idea. I like it. Everyone has to thoroughly test the move generation of their engine so I image it'll be helpful. I see it's Winboard based - UCI doesn't have perft protocols, whihc is a pity.

All the best,

Steve
Thanks for advising, you are right, its something like a drug :)
Anyway, the tool has a configuration part, if the engine offer some sort of command to "divide" the perft, it is suitable to be used.