Skip to content

Commit

Permalink
support more boardsize
Browse files Browse the repository at this point in the history
  • Loading branch information
zliu1022 committed Apr 1, 2019
1 parent 7d4e076 commit a7b0e6b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions svr/webgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
board_size = 19

port = 32019
komi = 7.5
if os.name == 'posix': # mac os or linux
if (board_size == 19):
komi = 7.5
executable = './dist/leelaz'
weight = '-w./dist/network.gz'
elif (board_size == 13):
komi = 7.5
executable = './dist/leelaz-13'
weight = '-w./dist/network-13.gz'
elif (board_size == 9):
Expand All @@ -34,20 +33,24 @@
weight = '-w./dist/network-9.gz'
else:
print 'invalid board size'
sys.exit()
sys.exit()
else:
if (board_size == 19):
komi = 7.5
executable = "./dist/leelaz.exe"
weight = '-w./dist/network.gz'
elif (board_size == 13):
executable = "./dist/leelaz-13.exe"
weight = '-w./dist/network-13.gz'
elif (board_size == 9):
komi = 6.5
executable = "./dist/leelaz-9.exe"
weight = '-w./dist/network-9.gz'
elif (board_size == 7):
komi = 6.5
executable = "./dist/leelaz-7.exe"
weight = '-w./dist/network-7.gz'
else:
print 'invalid board size'
sys.exit()

seconds_per_search = 10
verbosity = 2
Expand Down Expand Up @@ -136,6 +139,7 @@ def handle_websocket():
cmd = message.split(" ")
else:
continue
print
print "CMD: %s %s" % (get_time_stamp(), cmd)
ret["cmd"] = cmd[0]
ret["sess"] = cmd[1]
Expand Down

0 comments on commit a7b0e6b

Please sign in to comment.