NAME
Games::Go::GTP - Interact with a server or Go playing program using GTP
SYNOPSIS
use Games::Go::GTP;
use Games::Go::Player;
my $referee = new Games::Go::Referee;
my $player = new Games::Go::Player;
...
my ($res, $status) = Games::Go::GTP::gtpcommand(@args, $referee, $player);
DESCRIPTION
I would like to make this module more abstract, but I'm not sure how. For example, it assumes that Player, which is the code that generates a move (supply your own!), supports the following methods:
$player->size($somesize); # eg, $player->size(19), issued following the GTP command boardsize
$player->initboard($referee); # following the GTP command clear_board
$player->update($colour, $referee); # following GTP play
$player->chooselegalmove($colour, $referee); # following GTP genmove
$player->{_KGScleanup} = 1; # following the KGS specific kgs_genmove_cleanup
General use
An example of a script to run a bot on KGS is given in the example folder.
METHODS
engineName, engineVersion, protocolVersion
use Games::Go::GTP;
Games::Go::GTP::engineName('MYNAME'); # set MYNAME to anything you like
Games::Go::GTP::engineVersion('0.01'); # set '0.01' to anything you like
Games::Go::GTP::protocolVersion('2'); # leave this one alone ?
AUTHOR (version 0.01)
Daniel Gilder