Skip to content

Commit 7947012

Browse files
committed
Add --accept-bounds option
If enabled, removes upper/lowerbound so lichess won't hide it.
1 parent 25a893f commit 7947012

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

example-provider.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ def stream():
248248
break
249249
elif command == "info":
250250
if "score" in params:
251+
if args.accept_bounds:
252+
params = params.replace('lowerbound ', '')
253+
params = params.replace('upperbound ', '')
251254
yield (command + " " + params + "\n").encode("utf-8")
252255
else:
253256
logging.warning("Unexpected engine command: %s", command)
@@ -283,6 +286,7 @@ def stop(self):
283286
parser.add_argument("--max-threads", type=int, default=multiprocessing.cpu_count(), help="Maximum number of available threads")
284287
parser.add_argument("--max-hash", type=int, default=512, help="Maximum hash table size in MiB")
285288
parser.add_argument("--keep-alive", type=int, default=300, help="Number of seconds to keep an idle/unused engine process around")
289+
parser.add_argument("--accept-bounds", action='store_true', help="Show lowerbound/upperbound info")
286290

287291
try:
288292
import argcomplete

0 commit comments

Comments
 (0)