MorningDove16
User
 Junior Member
| Posts: 16 |   | Karma: 0
|
re:validation for a new chess engine - 2006/08/29 00:28
I ran into exactly the same stalemate problem three weeks ago, and encountered it in a game as well. Obviously, this is not really satisfying. The feature had worked before, but a redesign of the search broke it. Normally, I write a unit test case for each such piece of functionality, and frequently run the entire suite. For the stalemate detection (sooo trivial I skipped this and it promptly backfired.
My suggestion to approach the problem in general is only valid if you use real objects (with real information hiding and so on): use something like CPPunit (Google will help if required) to make each of your objects well-behaved. Have a test case ready for each piece of functionality, and implement the test even before the feature. Run the test, be sure it fails, implement the feature, be sure it passes. Use suites of positions for everything that is not local to a few objects, and pick these positions carefully. The real challenge is not to come up with a set of test cases that supply good coverage, but to also make them maintainable.. ---------
Forty is the old age of youth; fifty the youth of old age.
Popular posts by MorningDove16 Newbie question bitboards and evaluation functio... Is it necessary to include emty ...
|