I have many assertions, but no unit tests. When I use incremental data structures I have code to in the debug build to calculate the same results non-incrementally, and assert if they dont compare.
David > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:computer-go- > [EMAIL PROTECTED] On Behalf Of Denis fidaali > Sent: Wednesday, October 22, 2008 2:43 AM > To: [email protected] > Subject: [computer-go] survey : Debuging a board implementation. > > > > Hi. > > ----------------------------------------------------------------------- > ----------------------------------------------------------------------- > ----------- > WHAT TOOLS DO YOU USE FOR DEBUGGING BOARD IMPLEMENTATIONS ? > ----------------------------------------------------------------------- > ----------------------------------------------------------------------- > ----------- > > > > > ----------------------------------------------------------------------- > ----------------------------------------------------------------------- > ----------- > Here is how i do it : > ----------------------------------------------------------------------- > ----------------------------------------------------------------------- > ----------- > > I have made quite a few board implementation in the past years. > Initially i used a custom made dirty Java-swing-visualizer. It was very > usefull to get started, as we had the goal to reach the 20k > simulation/s marks. > We used not very user-readable structures, and so it was very helpfull > for testing purposes. The java-swing-visualizer enabled me to visualize > easily different views on the board-state. > > Later on, when switching to C and Assembly, i felt back on ASCII > output. I would then scroll to find something worth finding. > When working with those ASCII output, i had the most success by doing > it with two phases. > First phase i used a simple fixed sequence to verify that the > structures where still coherent at the end of it. > > +*+*+ > +*+*+ > +*.*+ > ++++ > > This shape was made up, move after moves, and positioned on an edge. > Then black plays to capture the two white stones inside the shape, > Then white play inside the eye, to capture black > then black captures the white stone again. > > + represent white > * represent black > > Then i would simply make random moves, and verify that all was going > well (especially capture detection). > usually i deactivated eye-filling-interdiction for this phase. It > enable the board to loop a few times. I would > then make 1000 moves, and check that everything was fine, even after > the board had been wiped out a > few time. > > > ----------------------------------------------------------------------- > ----------------------------------------------------------------------- > ----------- > WHAT TOOLS DO YOU USE FOR DEBUGGING BOARD IMPLEMENTATIONS ? > ----------------------------------------------------------------------- > ----------------------------------------------------------------------- > ----------- > _________________________________________________________________ > Inédit ! Des Emoticônes Déjantées! Installez les dans votre Messenger ! > http://www.ilovemessenger.fr/Emoticones/EmoticonesDejantees.aspx_______ > ________________________________________ > computer-go mailing list > [email protected] > http://www.computer-go.org/mailman/listinfo/computer-go/ _______________________________________________ computer-go mailing list [email protected] http://www.computer-go.org/mailman/listinfo/computer-go/
