[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] Fix for bad isCloseCube
From: |
Christian Anthon |
Subject: |
[Bug-gnubg] Fix for bad isCloseCube |
Date: |
Mon, 27 Mar 2006 12:38:45 +0200 |
User-agent: |
Mutt/1.5.10i |
Hi all,
the function checking for close cube decisions was totally wrong.
Amongst other things it included all too good positions and the
threshold of 0.25 was far too large to produce a sensible output for
exporting (a money beaver could be considered close to a double).
I have fixed the function and lowered the threshold to 0.16 (very bad).
Notice that this may have a large impact on the cube skill rate, but it
is the only thing that really makes sense.
Commit, or comment ;)
Christian.
--
"I can't promise that I'll try. But, I'll try to try." -- Bart
Index: analysis.c
===================================================================
RCS file: /cvsroot/gnubg/gnubg/analysis.c,v
retrieving revision 1.158
diff -r1.158 analysis.c
369,373c369,371
< if ( isCloseCubedecision ( arDouble ) ||
< isMissedDouble ( arDouble, GCCCONSTAHACK
pmr->CubeDecPtr->aarOutput,
< FALSE, &ci ) )
< psc->anCloseCube[ pmr->fPlayer ]++;
<
---
> /* Close or missed doubles */
> if ( isCloseCubedecision ( arDouble ) ) psc->anCloseCube[ pmr->fPlayer
> ]++;
>
Index: eval.c
===================================================================
RCS file: /cvsroot/gnubg/gnubg/eval.c,v
retrieving revision 1.286
diff -r1.286 eval.c
7331a7332,7335
> #ifndef min
> #define min(x,y) (((x) > (y)) ? (y) : (x))
> #endif
>
7334,7346c7338,7340
<
< const float rThr = 0.25;
<
< /* too good positions */
<
< if ( arDouble[ OUTPUT_NODOUBLE ] > 1.0 ) return 1;
<
< /* almost a double */
<
< if ( fabs ( arDouble[ OUTPUT_NODOUBLE ] - arDouble[ OUTPUT_TAKE ] ) < rThr )
< return 1;
<
< /* almost a pass */
---
> const float rThr = 0.16;
> float rDouble;
> rDouble = min (arDouble[ OUTPUT_TAKE ] , 1.0f);
7348,7349c7342,7343
< if ( fabs ( arDouble[ OUTPUT_NODOUBLE ] - arDouble[ OUTPUT_DROP ] ) < rThr )
< return 1;
---
> /* Report if doubling is less than very bad (0.16) */
> if ( arDouble[ OUTPUT_OPTIMAL ] - rDouble < rThr ) return 1;
Index: format.c
===================================================================
RCS file: /cvsroot/gnubg/gnubg/format.c,v
retrieving revision 1.15
diff -r1.15 format.c
777c777
< int fClose, fMissed;
---
> int fMissed;
796d795
< fClose = isCloseCubedecision ( arDouble );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnubg] Fix for bad isCloseCube,
Christian Anthon <=