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

AutoGTP should save its work in case a reboot is required mid-game #1535

Open
Nazgand opened this issue Jun 8, 2018 · 19 comments
Open

AutoGTP should save its work in case a reboot is required mid-game #1535

Nazgand opened this issue Jun 8, 2018 · 19 comments

Comments

@Nazgand
Copy link
Contributor

Nazgand commented Jun 8, 2018

I have killed AutoGTP at times, and have not noticed it starting from a mid-game position when running AutoGTP again.

@Nazgand Nazgand changed the title AutoGTP should save its work in case a rebot is required mid-game AutoGTP should save its work in case a reboot is required mid-game Jun 8, 2018
@Friday9i
Copy link

Friday9i commented Jun 8, 2018

To close it and saving games, type "q + Enter", it saves file(s) and makes a clean exit, and reload everything when you launch it again : -)

@gcp
Copy link
Member

gcp commented Jun 8, 2018

This would require dumping out the info every move, rather than every game. Not sure we want to do this.

@gcp gcp added the enhancement label Jun 8, 2018
@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 9, 2018

@Friday9i Thanks. Where did you learn that? I did not notice it in the README or the FAQ. Perhaps the README or FAQ should be updated? Does a manual exist which I am not aware of?

@LRGB
Copy link

LRGB commented Jun 9, 2018

@gcp commented on Jun 8, 2018, 2:04 PM GMT-3:

This would require dumping out the info every move, rather than every game. Not sure we want to do this.

What about an autodump every 100 moves? I dont know how often people experience data loss to determine if this is worth the effort or not...

@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 9, 2018

I am satisfied knowing `q + Enter'. If games are autosaved, it may be better to do in per unit of time (e.g. 5-10 minutes) rather than every n moves to account for differences in computing speed.

@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 10, 2018

Does some other arcane command exist which will finish the current game, then exit? The README should include this info.

@d7urban
Copy link

d7urban commented Jun 10, 2018 via email

@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 14, 2018

A problem with q+Enter:
I needed to reboot, so I pressed q+Enter, then ran

autogtp -s

. A while later I decided I did not want to wait for 500 more moves before rebooting. I attempted q+Enter again and got no response. I pressed Ctrl+C, and data of 156 moves were lost.

@alreadydone
Copy link
Contributor

https://github.com/gcp/leela-zero/blob/91031bfbcb09b6dc379a62e4c5e84006f0560179/autogtp/main.cpp#L155

I think removing this line would solve this problem. Actually all three quitting conditions (timeout, #games limit, q+Enter) could be made mutually compatible, not mutually exclusive, as in alreadydone@d0f054a

@marcocalignano
Copy link
Member

@alreadydone Yes that indeed should work. Have you tested that?

@alreadydone
Copy link
Contributor

alreadydone@d0f054a has been running on Big Red II for many months. I use consoleOn=false to disable q+Enter but the other two indeed can work together: autogtp exits when the time limit or the game limit is reached. Therefore I think all three can work together as well.

@marcocalignano
Copy link
Member

Ok so let me test it (no idea when I get to it) even with the console and then I'll ask you to make a PR.

@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 20, 2018

I think removing this line would solve this problem.

I have tested this, and q+Enter now works with the -s option, so I will submit a patch pull request.

@marcocalignano
Copy link
Member

No that is wrong you want q_Enter even without the other options.

@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 20, 2018

I tested @alreadydone's commit alreadydone@d0f054a , and it worked as desired. I tested it with LeelaWatcher, and LeelaWatcher does not show games which are continued. This (probably) can be fixed by having all the moves from move 1 output before generating new moves.

Another related problem is that closing LeelaWatcher midgame loses the game info; q+Enter seems not to work with LeelaWatcher. As this problem seems to not be an AutoGTP issue, I will file an issue there.

@marcocalignano
Copy link
Member

@Nazgand Can you test it even without LeelaWatcher?

@Nazgand
Copy link
Contributor Author

Nazgand commented Jun 21, 2018

I suppose I was not clear enough. I did test it both with and without LeelaWatcher. Without LeelaWatcher, q+Enter worked as desired both with and without the -s option.

@marcocalignano
Copy link
Member

OK then @alreadydone can you do a PR with that change?

@alreadydone
Copy link
Contributor

#1580 created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants