[Computer-go] KGS, gogui and handicap stones

Aja Huang ajahuang at gmail.com
Sat Jan 21 11:54:06 PST 2012


A simple solution would be to keep a variable HandicapStone.

In the function of GTP command "play":

If (WhiteNeverPlayed == true)   // WhiteNeverPlayed is initialized to "true"
{
    if (Color == BLACK &&
        Move != PASS)
        HandicapStone += 1.0f;  // HandicapStone  is initialized to 0
    else
        WhiteNeverPlayed = false;
}

Then in the scoring function:

    if (HandicapStone >= 2)
        BlackScore -= (HandicapStone / 2);

Aja

-----原始郵件----- 
From: David Fotland
Sent: Saturday, January 21, 2012 11:36 AM
To: computer-go at dvandva.org
Subject: Re: [Computer-go] KGS, gogui and handicap stones

I have code that detects several black moves in a  row at the start of the
game, and sets the proper handicap property for the engine.

David

> -----Original Message-----
> From: computer-go-bounces at dvandva.org [mailto:computer-go-
> bounces at dvandva.org] On Behalf Of ds
> Sent: Saturday, January 21, 2012 2:26 AM
> To: computer-go at dvandva.org
> Subject: [Computer-go] KGS, gogui and handicap stones
>
> Hi,
>
> sounds simple, but I could not figure out:
>
> If I load a game from kgs with gogui, my engine is not informed about
> the handicap stones. Therefore it counts wrong? Is there a workaround?
>
> Thanks
> Detlef
>
> _______________________________________________
> Computer-go mailing list
> Computer-go at dvandva.org
> http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

_______________________________________________
Computer-go mailing list
Computer-go at dvandva.org
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go 




More information about the Computer-go mailing list