gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] cosmic patch


From: Stéphane Nicolet
Subject: Re: [gnugo-devel] cosmic patch
Date: Wed, 6 Aug 2003 18:53:43 +0200

I had the impression that the patch cosmic_5_1.2 should have NO
effect on the regressions if you omit the command line option.
Is this correct?

However it DOES affect the regressions, for example it causes
four unexpected fails in owl.tst.
132 FAILED: Correct '(1|2) R4', got '1 R1'
133 FAILED: Correct '1 M3', got '0'
150 FAILED: Correct '0', got '1 G12'
151 FAILED: Correct '1 G13', got '1 G12'
Dan

Incredible as it sounds, this is actually a problem with the
'patch' Unix command, which silently disgard some lines marked
with +  in the patch file cosmic_5_1.2 !

The hunk starting at line 247 and ending at line 320 of the
patch is not applied correctly, for some reason. Specificaly,
the end of the hunk (lines 311-318) is forgotten, which has
the net effect of removing I patterns from the
influence_callback() function...


Lines 834-869 in influence.c should read like that
(maybe you could restore lines 859-868 directly in CVS) :




  /* For I patterns, add a low intensity, both colored, influence
   * source at *.
   */
  if (pattern->class & CLASS_I) {
    int this_color = EMPTY;
    float strength;
    float attenuation;

    if (q->color_to_move == EMPTY || (pattern->class & CLASS_s))
      this_color = BLACK | WHITE;
    else if (q->color_to_move != color)
      this_color = q->color_to_move;

    if (cosmic_gnugo) {
      float t = 0.15 + (1.0 - cosmic_importance);
      t = gg_min(1.0, t);
      t = gg_max(0.0, t);
      strength = t * pattern->value;
      attenuation = 1.6;
    }
    else {
      strength = pattern->value;
      attenuation = 1.5;
    }

    /* Increase strength if we're computing escape influence. */
    if (q == &escape_influence && (pattern->class & CLASS_e))
add_influence_source(pos, this_color, 20 * strength, attenuation, q);
    else
      add_influence_source(pos, this_color, strength, attenuation, q);

    DEBUG(DEBUG_INFLUENCE,
          "  low intensity influence source at %1m, strength %f, color %C\n",
          pos, strength, this_color);
    return;
  }


**********************************************


Stephane, disgusted








... /// ... \\\ ...





reply via email to

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