diff --git a/polyglot.ini b/polyglot.ini new file mode 100644 index 0000000..25c1757 --- /dev/null +++ b/polyglot.ini @@ -0,0 +1,8 @@ +[Polyglot] +EngineName=Sunfish +EngineCommand=python3 sunfish.py +EngineDirectory=. +Log=true +LogFile=polyglot.log +XBoard=true + diff --git a/tools/uci.py b/tools/uci.py index ff6d0c4..ed2efab 100644 --- a/tools/uci.py +++ b/tools/uci.py @@ -224,7 +224,10 @@ def run(sunfish_module, startpos): think = int(movetime) / 1000 elif args[1] == "wtime": - wtime, btime, winc, binc = [int(a) / 1000 for a in args[2::2]] + times = [int(a) / 1000 for a in args[2::2]] + while len(times) < 4: + times.append(0) + wtime, btime, winc, binc = times # we always consider ourselves white, but uci doesn't if len(hist) % 2 == 0: wtime, winc = btime, binc