gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] question about twogtp.pl


From: Evan Berggren Daniel
Subject: Re: [gnugo-devel] question about twogtp.pl
Date: Tue, 22 Oct 2002 13:07:38 -0400 (EDT)

On Tue, 22 Oct 2002, Arend Bayer wrote:

>
>
> On Tue, 22 Oct 2002 address@hidden wrote:
>
> >
> > > My program would love to know that the other player passed so it can also
> > > pass if it thinks it has won the game (even if it's earlier than it would
> > > have otherwise done so).  The easiest way to do that is to let the pass 
> > > move
> > > go to the GTP program, but I'm wondering if the GTP spec implies that 
> > > 'pass'
> > > doesn't need to be sent ?
> >
> > The pass doesn't need to be passed on. The reason is that if your engine
> > receives two genmove commands with no intervening play, then clearly the
> > opponent has passed.
>
> It could as well be a non-conforming way by the controller to set up a game
> with free handicap (or higher handicap than 9,...). I don't think we
> should burden an engine with interpreting two consecutive genmove's.
> (Should the engine add a PASS into it's private game tree? That would
> clearly contradict the explicit wordings about move history in Gunnar's
> GTP v2 draft.)
>
> I think the point is one shouldn't stretch a protocol or one will run into
> ambiguities at some point.

Also, it could be an attempt by a human to give > 9 stones using a client
that doesn't support that, or if they don't know how to do that with their
client.

The attached patch fixes twogtp.  I have not tested it, but it looks like
there are no related bugs.

Also, twogtp-a (and its cousin matcher_check) do not have this bug.

Thanks

Evan Daniel

Index: interface/gtp_examples/twogtp
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/gtp_examples/twogtp,v
retrieving revision 1.6
diff -u -r1.6 twogtp
--- interface/gtp_examples/twogtp       15 Apr 2002 23:22:11 -0000      1.6
+++ interface/gtp_examples/twogtp       22 Oct 2002 17:03:33 -0000
@@ -336,7 +336,7 @@
            push @{$self->moves}, $move;
            print "Black plays $move\n" if $verbose;
            $pass = ($move =~ /PASS/i) ? $pass + 1 : 0;
-           $self->white->black($move) unless ($move =~ /PASS/);
+           $self->white->black($move);
            if ($verbose == 3) {
                my $black_seed = $self->black->get_random_seed;
                printf "Black seed $black_seed\n";
@@ -357,7 +357,7 @@
            push @{$self->moves}, $move;
            print "White plays $move\n" if $verbose;
            $pass = ($move =~ /PASS/i) ? $pass + 1 : 0;
-           $self->black->white($move) unless ($move =~ /PASS/);
+           $self->black->white($move);
            if ($verbose == 3) {
                my $white_seed = $self->white->get_random_seed;
                printf "White seed $white_seed\n";





reply via email to

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