Welcome, Guest. Please Login or Register.
Nov 23rd, 2024, 4:51pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Regression testing »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Regression testing
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Regression testing  (Read 885 times)
doublep
Forum Guru
*****



Badger author

   


Gender: male
Posts: 82
Regression testing
« on: Oct 1st, 2009, 1:32pm »
Quote Quote Modify Modify

I'm curious if any of the developers uses regression testing.  It seems not that useful for strategic things, i.e. evaluating whole board positions, but I find it invaluable for tactical searches, like capturing or finding win in one move.  Strategical tests could be possible in cases of only one or few "correct" moves (i.e. if you don't make this move, you are inevitably losing a major piece, like that), but I'm not a good enough player to spot this.
 
Badger uses a slightly modified version of GTP, so I'm able to formulate regression problems like this:
 
Code:
# Pull opponent ahead.
clear_board
setup_squares Ra7 Cb8 ra8 ec7 cb6
50010 find_one_move_win white
#? [true Cb8s-ra8e-Ra7n]

The last line (that starting with #?) is just a comment from engine point of view, but for regression script it is a marker that provides expected answer to the last command.  I.e. the script considers test passed if Badger's answer to 'find_one_move_win white' in that position is 'true Cb8s-ra8e-Ra7n'.
 
Eventually I even wrote automated tools to find mistakes in various tactical searches, both false positives (i.e. invalid moves or moves that don't yield results the engine claims they would) and missed problem solutions (missed one move wins, missed captures).  The tool also interfaces with Badger through GTP.  For its use, Badger provides two solvers for all tactical problems it handles: the production solver --- very fast, the one that is tested, --- and "robust" solver --- slow, simple, mostly brute-force and complete (unless there are unspotted bugs, of course ;).  Minor custom editing is required, but most work is automatic. Tests generated with such a tool look this way:
 
Code:
setup_board -----r----r--cr--m-h--rr-H-h--r-r---Ed-----DC-eM-----CDdR-R----R
40 capture_anything black
#? [!true hd5s-Dd3w-Dc3x-hd4s]

Do any other bots use anything similar?
IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Regression testing
« Reply #1 on: Oct 2nd, 2009, 1:56pm »
Quote Quote Modify Modify

For general testing I have a set of ~100 board positions mostly just drawn from games where the bot made an obviously bad move in the game.  I just look to see that the differences with the new version at least seem reasonable.
 
For the static goal and capture search I used fuzz testing1 to find the errors and missed cases.
 
Janzert
 
1 Check random positions and make sure the static search finds the same results as the full move generation does
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.