[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: Christian Anthon
Subject: Re: [Bug-gnubg] Bug in makebearoff when building db w/o gammons
Date: Mon, 23 Feb 2009 14:27:45 +0100

To site a danish gruk of Piet Hein,

Den som kun tar spøg for spøg
og alvor kun alvorligt

Han og hun har faktisk fattet
begge dele dårligt.

And yes something would be lost in translation, but Øystein being
Norwegian should be able to understand.

Anyway, it was only partly meant as a joke, since every now and then
something like this pops up, when people are roaming around in the
darker corners of gnubg. I've resolved quite a few problems like this
in the last couple of years, and there are even some that I know of
that aren't solved yet. But when a feature hasn't been used for six
years, it is probably best to remove it all together.


On Fri, Feb 20, 2009 at 7:47 PM, Øystein Johansen <address@hidden> wrote:
> 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 ...
> -Øystein
> * "never used" = these lines are never used in GNU Backgammon, however
> they were used in Joseph's training code.

reply via email to

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