Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gtp.py
diff options
context:
space:
mode:
authorAndrés Ambrois <andresambrois@gmail.com>2008-08-29 03:07:11 (GMT)
committer Andrés Ambrois <andresambrois@gmail.com>2008-08-29 03:07:11 (GMT)
commita3cc3acb713e16a644c5bd60d8491f99c4b2a7c1 (patch)
tree3bbc66befa8e95815ca8197f663b8970cc81b42e /gtp.py
parentd0b9290d7905f5b4e5acde8433fd8a393157270f (diff)
Fixed passing with AI
Diffstat (limited to 'gtp.py')
-rw-r--r--gtp.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtp.py b/gtp.py
index 7484658..a394cda 100644
--- a/gtp.py
+++ b/gtp.py
@@ -77,7 +77,7 @@ class gnugo:
def get_move(self, color):
color = self.short_to_long_colors(color)
- self.stdin.write('genmove %s\n' % color)
+ self.stdin.write('kgs-genmove_cleanup %s\n' % color)
self.stdin.flush()
output = self.stdout.readline()
self.stdout.readline()
@@ -89,6 +89,13 @@ class gnugo:
logger.debug('Generated move %s', output[2:])
return self._coords_to_xy(output[2:])
+ def pass_move(self, color):
+ color = self.short_to_long_colors(color)
+ self.stdin.write('%s pass\n' % color)
+ self.stdin.flush()
+ self.stdout.readline()
+ self.stdout.readline()
+
def undo(self):
self.stdin.write('undo\n')
self.stdin.flush()