bug-gnubg
[Top][All Lists]
Advanced

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

[Bug-gnubg] An few small fixes


From: Philippe Michel
Subject: [Bug-gnubg] An few small fixes
Date: Sun, 13 Feb 2005 20:23:11 +0100 (CET)

The changes in format.c and rollout.c fix the problems in the reporting of rollouts stopped on the jsd criteria that in mentioned yesterday.

The change in gnubg.c fixes bug #10099.

The change in makebearoff1.c corrects what looks like a typo. It doesn't change the output of makebearoff1.


*** format.c.orig       Tue Oct 26 21:11:35 2004
--- format.c    Sun Feb 13 16:41:21 2005
***************
*** 392,404 ****
                gettext( aszRNG[ prc->rngRollout ] ),
                prc->nSeed );

    /* stop on std.err */

!   if ( prc->fStopOnSTD )
      sprintf( strchr( sz, 0 ),
               _("Stop when std.errs. are small enough: ratio "
                 "%.4g (min. %d games)\n"),
               prc->rStdLimit, prc->nMinimumGames );

    /* first play */

--- 392,416 ----
                gettext( aszRNG[ prc->rngRollout ] ),
                prc->nSeed );

+   if ( ( prc->fStopOnJsd || prc->fStopMoveOnJsd || prc->fStopOnSTD )
+        && szIndent && *szIndent )
+     strcat ( sz, szIndent );
+
    /* stop on std.err */

!   if ( prc->fStopOnSTD && !prc->fStopMoveOnJsd )
      sprintf( strchr( sz, 0 ),
               _("Stop when std.errs. are small enough: ratio "
                 "%.4g (min. %d games)\n"),
               prc->rStdLimit, prc->nMinimumGames );
+ + /* stop on JSD */ + + if ( prc->fStopOnJsd || prc->fStopMoveOnJsd )
+     sprintf( strchr( sz, 0 ),
+              _("Stop when best play is enough JSDs ahead: limit "
+                "%.4g (min. %d games)\n"),
+              prc->rJsdLimit, prc->nMinimumJsdGames );

    /* first play */

*** rollout.c.orig      Tue Oct 26 21:11:35 2004
--- rollout.c   Sun Feb 13 15:29:59 2005
***************
*** 1462,1468 ****
      log_name = 0;
    }

!   cGames = i;

    memcpy (&rcRollout, &rcRolloutSave, sizeof (rcRollout));
    fOutputMWC = fOutputMWCSave;
--- 1462,1470 ----
      log_name = 0;
    }

!   for (alt = 0, cGames = 0; alt < alternatives; ++alt)
!     if ( nGamesDone[alt] > cGames )
!       cGames = nGamesDone[alt];

    memcpy (&rcRollout, &rcRolloutSave, sizeof (rcRollout));
    fOutputMWC = fOutputMWCSave;
***************
*** 2128,2131 ****
    }

  }
- --- 2130,2132 ----
*** gnubg.c.orig        Thu Feb 10 20:48:16 2005
--- gnubg.c     Sun Feb 13 13:29:24 2005
***************
*** 3800,3806 ****
      /* number */

      if ( i && ! fRankKnown )
!       strcat( sz, "   ?? " );
      else
        sprintf ( pc = strchr ( sz, 0 ),
                  " %4i. ", i + 1 );
--- 3800,3806 ----
      /* number */

      if ( i && ! fRankKnown )
!       strcat( sz, "   ??  " );
      else
        sprintf ( pc = strchr ( sz, 0 ),
                  " %4i. ", i + 1 );
*** makebearoff1.c.orig Mon Mar 29 09:48:24 2004
--- makebearoff1.c      Sun Feb 13 15:57:14 2005
***************
*** 207,213 ****

      for ( i = 0; i < n; ++i ) {

!       fprintf ( pfOut, "0x%02hhX, ", (ac[ i ] & 0xff) );

        if ( ! ( ( i + 1 ) % 8 ) )
fprintf ( pfOut, --- 207,213 ----

      for ( i = 0; i < n; ++i ) {

!       fprintf ( pfOut, "0x%02hX, ", (ac[ i ] & 0xff) );

        if ( ! ( ( i + 1 ) % 8 ) )
          fprintf ( pfOut,





reply via email to

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