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: [email protected]
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: [email protected] [mailto:computer-go-
[email protected]] On Behalf Of ds
Sent: Saturday, January 21, 2012 2:26 AM
To: [email protected]
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
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

Reply via email to