Christian Anthon wrote: > On Fri, Feb 20, 2009 at 2:09 PM, Øystein Johansen (OJOHANS) > <ojoh...@statoilhydro.com> wrote: >>> ERROR:makebearoff.c:483:BearOff: assertion failed: (iGammonBest >= 0) >> Hehe, browsing through the cvs, I see that this bug was introduced in rev >> 1.11 of makebearoff.c more than 6 years ago! :-) >> > > Perhaps we should have asserts like this one on all the rarely, if > ever, used features....
At first I tought your message was kind of a joke, however I guess there are some features that could have such asserts(), for sure. I'll try to think of some.... Taking this this gammon/bearoff thing further: If a (OS) bearoff database is "always" evaluated with fGammon, this means that the code in eval.c (BearoffEvalOneSided) condition at line 440 " if ( pdb->fGammon ) { ... " is always true. The corresponding 'else' branch is the only caller of setGammonProb(), and this else-branch can be removed. setGammonProb() can also be removed. Then further: The function setGammonProb() which I hypotetically deleted in my above paragraph is the only caller to getBearoffGammonProbs() in bearoffgammon.c. I can therefore also get rid of getBearoffGammonProbs(). This function alone is responsible for about 7200 lines of code/data in bearoffgammon.c .... Those codelines are never used* and it can probably be removed ... -Øystein * "never used" = these lines are never used in GNU Backgammon, however they were used in Joseph's training code.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bug-gnubg mailing list Bug-gnubg@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnubg