[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Bug in makebearoff when building db w/o gammons

From: Øystein Johansen
Subject: Re: [Bug-gnubg] Bug in makebearoff when building db w/o gammons
Date: Fri, 20 Feb 2009 19:47:38 +0100
User-agent: Thunderbird (Windows/20081209)

Christian Anthon wrote:
> On Fri, Feb 20, 2009 at 2:09 PM, Øystein Johansen (OJOHANS)
> <address@hidden> 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 ...


* "never used" = these lines are never used in GNU Backgammon, however
they were used in Joseph's training code.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]