gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] twogtp patch


From: Evan Berggren Daniel
Subject: Re: [gnugo-devel] twogtp patch
Date: Sat, 26 Oct 2002 14:04:43 -0400 (EDT)

On Sat, 26 Oct 2002 address@hidden wrote:

>
> > I don't think there's any reason for twogtp to disallow komi in a handicap
> > game.  This patch fixes that.
> >
> > Thanks
> >
> > Evan Daniel
>
> After this patch the DEFAULT komi in handicap games is 5.5 which is
> clearly not what we want.
>
> Handicap games with komi are the exception, not the rule. The
> custom is that W wins a tie, which amounts to 0.5 komi.
> If a twogtp series is started with handicap, we do not
> want to have to specify a komi in order to get the usual
> desired behavior.

The new version of the patch should fix that.

Thanks

Evan Daniel

Index: interface/gtp_examples/twogtp
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/gtp_examples/twogtp,v
retrieving revision 1.7
diff -u -r1.7 twogtp
--- interface/gtp_examples/twogtp       26 Oct 2002 16:24:57 -0000      1.7
+++ interface/gtp_examples/twogtp       26 Oct 2002 18:01:48 -0000
@@ -434,7 +434,7 @@
 my $black;
 my $size = 19;
 my $games = 1;
-my $komi = 5.5;
+my $komi;
 my $handicap = 0;
 my $sgffile = "twogtp.sgf";

@@ -470,8 +470,12 @@
 ";

 die $helpstring unless defined $white and defined $black;
-if ($handicap > 1) {
-    $komi = 0.5;
+if (!defined $komi) {
+    if ($handicap > 1) {
+        $komi = 0.5;
+    } else {
+        $komi = 5.5;
+    }
 }

 # create GTP players





reply via email to

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