Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engines often lose on time #218

Open
thomasahle opened this issue Jan 6, 2023 · 2 comments
Open

Engines often lose on time #218

thomasahle opened this issue Jan 6, 2023 · 2 comments
Labels
bug Something isn't working Priority: Medium

Comments

@thomasahle
Copy link

  • Chess Tuning Tools version: 0.9.3
  • Python version: 3.9
  • Operating System: Linux

Description

I'm sorry this is not a very good issue report; but I've noticed that I get a lot of "Engine lost on time" warnings (5-10% of games) when using tune. This happens even though I use long time controls, like "60+1", and my engines never lose on time when I run them through cutechess-cli myself.

I'm wondering if communication with tune adds some extra move overhead somehow?
Is there something I can do to reduce this?
I could also add a "move overhead" parameter to my engine to let it know how much time it should expect to lose per move. But I can't as easily do that to the engines I'm testing against...

(I'm tuning sunfish, and I'm currently using pygone and sunfish as opponents.)

@ChrisWhittington
Copy link

ChrisWhittington commented Jan 6, 2023 via email

@kiudee
Copy link
Owner

kiudee commented Jan 17, 2023

Thanks for reporting this. This is an interesting issue, since the code basically just opens a process to run cutechess-cli:

with subprocess.Popen(
string_array, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True
) as popen:
if popen.stdout is not None:
for line in iter(popen.stdout.readline, ""):
yield line
else:
raise ValueError("No stdout found.")

I wonder whether there is some substantial overhead incurred due to parsing the log output here:

for output_line in run_match(**match_settings):
line = output_line.rstrip()
is_debug = is_debug_log(line)
if is_debug and verbose > 2:
root_logger.debug(line)
if not is_debug:
out_exp.append(line)
out_all.append(line)

@kiudee kiudee added bug Something isn't working Priority: Medium labels Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Medium
Projects
None yet
Development

No branches or pull requests

3 participants