Skip to content

Commit ded9f6d

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

example-provider.py

100755100644
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ def stream():
256256
break
257257
elif command == "info":
258258
if "score" in params:
259+
if args.accept_bounds:
260+
params = params.replace('lowerbound ', '')
261+
params = params.replace('upperbound ', '')
259262
yield (command + " " + params + "\n").encode("utf-8")
260263
else:
261264
logging.warning("Unexpected engine command: %s", command)
@@ -290,6 +293,7 @@ def stop(self):
290293
parser.add_argument("--max-hash", type=int, default=512, help="Maximum hash table size in MiB")
291294
parser.add_argument("--keep-alive", type=int, default=300, help="Number of seconds to keep an idle/unused engine process around")
292295
parser.add_argument("--log-level", default="info", choices=_LOG_LEVEL_MAP.keys(), help="Logging verbosity")
296+
parser.add_argument("--accept-bounds", action='store_true', help="Show lowerbound/upperbound info")
293297

294298
try:
295299
import argcomplete

0 commit comments

Comments
 (0)