-
Notifications
You must be signed in to change notification settings - Fork 29
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
Simultaneous games question #59
Comments
Hi there! Yes OGS's model is basically that a bot plays all the games at once that people want. (I think the KGS model might be bots play one game at a time only, I'm not sure.) If you want to stick to only slower time settings you could see about changing --corrqueue in some way to try and only work on one game at a time for cpu/gpu purposes (like turn it on but use it for all games not just correspondence games). If you turn off --persist, it'll restart your bot fresh for each move. I added --persist since I wanted the prior tree search in Leela to stick around from move to move. There's no easy way atm to "reject matches if a match is under way" although it has been requested before. I'm not sure if Tokumoto ever added that in his own bots. It has been requested before but I never wrote it up myself. |
Thanks, this makes sense. Yes, i'm a bit new to the ogs model. Managed to get simultaneous games working ! I'd rather avoid running without --persist, starting a new instance for each move is quite slow. But then if it solves all the timeout / concurrency issues maybe it's worth looking into... I'm thinking maybe best is to signal gtp2ogs to start/stop accepting new games. I could check system load from time to time and restart it with --rejectnew when it gets too much (--rejectnew isn't going to affect active games, is it ?) |
--rejectnew won't affect ongoing games, it just rejects new challenges. But you can go to the accept challenge part of the code and maybe add a check for your system load so you reject if load is too high. With my bots I just accept all of the games and hope for the best as the GPU gets stretched really thin. :) I turn off pondering for unranked games, and I turn off using the GPU for correspondence games. |
That would be cleaner than the rejectnew hack =) |
Yeah that's a feature request to OGS, but not something I can provide. It is a server level feature. |
Limiting the number of ongoing live/blitz games is a feature I've been asking roy7 for years :P |
Ok, i'll check with server team. @TokumotoK no need for private messages, we just need a way to tell the server which msg to use in the popup instead of "Game offer was rejected", right ? |
Correct, if there was a way in the API to optionally send a message back to server when we reject a game challenge, it could display on the "game rejected" popup message box was my thought. Would need some love from @anoek though. |
Hey all, I'll try and give the bot system some attention this and next week, this should be pretty feasible to get in place. |
@anoek Thanks! :) If you like, the /devel branch of gtp2ogs could go ahead and do a fresh release and merge into /master. I have permissions on that but I don't want to mess up the tagging/etc. If you don't mind giving the /devel changes a sanity glance. This way people out of the blue pulling down master will be in sync with most of the bot operators. |
Oh wow, thanks for all the attention ! |
Relevant to #59, though it's likely some more meaningful messaging work should be done.
Ok that turned out to be way less trouble than I thought it would be. Sorry it took so long @TokumotoK, I know you've been wanting that for awhile. You'll see I updated gtp2ogs to utilize a newly created Everything should be live and ready to use. Enjoy! @roy7 How about I'll do a release in a day or two after you guys have had a chance to make whatever custom messaging changes you want to make? |
Awesome! I've got some plans tonight but hopefully tomorrow I'll see about working with that. My intent will be to add custom messages into every accept/reject decision in gtp2ogs. Maybe even store them all up in the string so the reject notice will mention every reason why at the same time. |
Thank you, thank you, thank you |
@anoek I added a PR with tons of messaging. I didn't merge it immediate since I didn't have time to test it but I think it's very straight forward. I also merged an error catching branch and my corrqueue feature too. |
Thanks ! |
@lemonsqueeze and @TokumotoK I have added support to limit the max # of games the bot will play at a single time. I'm not 100% confident in my approach until it gets a good amount of testing and never deadlocks, my fear is there might be some way a game ends but disconnect() isn't called so it will think we're at the max forever? Maybe this fear is groundless. Regardless, I have a branch here: https://github.com/roy7/gtp2ogs/tree/maxtotalgames that lets you do --maxtotalgames 1 to only play 1 game at a time. Motivated by @wonderingabout's frequent requests. ;) |
And enhancement I could make is to automatically apply --hidden any time you are at the cap, so you don't appear in the list if you won't accept their game. Just to make a better user experience. |
nice !!! as i said, people with limited GPU power cant play many games at the same time or thinking time is too long big thanks to everyone !!! |
actually @roy7 as @lemonsqueeze just highlighted to me by mail today, theres the issue of correspondence games let's imagine there are 10 correspondence games , and then if what i suggest is to make 4 new arguments
if we do that @roy7 , then we could fix the example i mentionned like that : to improve it even further, we may improve the
then the fix would be even better, for example
a dream command to run lol |
Good catch. I was sort of picturing only live play bots would use this. I'll make improvements. |
Thanks a LOT! To me, Persist and Limiting the number of simultaneous games is needed only for Live/Blitz. Limiting them for corres does not make sense somewhat going against the nature of corres, except for another problem. Problem is, people pause games and forgets about them, thereby increasing the number of simultaneous/persist games for bots, and this is a separate issue that applies to live/blitz as well. This should be handled with "--maxpausetime" or "--maxpausedays" as I requested separately. @anoek Isn't it about time the devel branch got merged ? I mean after roy7 makes the improvements. |
roy7 asked that me and aquabot run some tests of it first before merging it by that time, hopefull @roy7 will add the improvements we mentionned earlier and you can already test it, no need to wait for merging, see : https://github.com/wonderingabout/gtp2ogs-tutorial/blob/master/docs/3A3-linux-optional-upgrade-to-devel.md |
@roy7 |
i dont think its a good idea, because as @TokumotoK said, the number of corr games should be unlimited, or at least very high the issue is rather with |
I don't intend to wait for the merge at all if it works. |
the expiring time is another issue indeed, but wouldnt that be a problem for ranked games ? if you set an expire time of say one week, then your bot's rank will be abused (for unranked games its fine though) edit : maybe i dont understand well what would be the purpose of you using maxpausetime edit 2 : theres an easier way : just use -> you want more time ? dont play live game but play corr instead adding |
No. Imagine --maxtotalgames is set to 4. Four players pausing a game and forgetting about it will fill it, prohibiting the bot from playing other games. Being able to pause against a bot is a major advantage of playing a bot as opposed to a human. So using --nopause negates one of the attractiveness of playing against a bot. We don't want to prohibit players from pausing. We just want to limit the pause period, so that forgotten games will expire in a reasonable period. |
ok i understand now, but then why not just play a corr game if the player wants a long time ? (instead of pausing a live game) that would fix the fillling game slots issue, if |
Yeah, tell that to the many players who 'forgets' that they've paused a game. |
if you disable pause, they cant forget that they have paused :) also, i want to mention that its the number of connected games edit : see : https://github.com/roy7/gtp2ogs/blob/maxtotalgames/gtp2ogs.js#L1535 (the next 10 code lines starting from here) maybe i should ask @roy7 to rename it |
Let me say this again. "Being able to pause at will, for bathroom, lunch, dinner, etc." is a MAJOR advantage of playing against a bot, as opposed to creating nuisance to the human opponent. We just need to limit it. |
ok, i leave that choice to you if you ask me though , i would just play a corr game with very large time settings but you raised the point that maybe we should rename it and again this shows how this issue is related to the need of |
Pausing didn't even occur to me since I've used --nopause for ages on all of my own bots. Persist shouldn't have anything to do with the size of the connected_games list. Persist just means the bot engine isn't killed/restarted for each move (ie: the engine remains in memory waiting for the next move, so things like prior search results can remain cached/etc). It won't use extra GPU time if your bot doesn't do pondering. Pondering on or off is a bot specific decision by the operator outside of gtp2ogs. My initial thought on corr games is just not to count them at all with --maxtotalgames. Or maybe I'll rename it to --maxlivegames. Then we just need to count all of the connected_games that aren't using corr time controls. For people who support corr on their bots and want to reduce GPU impact, that's what --corrqueue is for. (I added that since I one had someone playing like 10+ corr games and they'd make all the moves at one time, causing me to run 10 copies of Leela at the same time, doh.) I should probably add a way for persist to not affect corr games as an option though, so need to keep the process in memory for possibly days. The GPU can only keep so much data in memory before it runs out. (I think on my own bots I started using a 24 hour persist timeout just to prevent too many piling up.) |
yes i of course use
yes, that works (it would not address all cases though like the one where one bot operator wants to limit the number of max corr games) --maxlivegames doesnt include blitz, how about also as you said earlier i use pondering for my bot i'm interested in you
yes !!!! i think the same, and it's what i want :) it seems like the natural behaviour of how |
any news @roy7 ? |
No, it's Christmas and I have a sore throat, I'm just relaxing. :) |
oh ok, have fun and please tell us when you have any news @roy7 :) |
- add custom-branches.md : has been asked many times, we can link to that if bot admin doesnt know about it - fix : increase default maxmaintime from 1800 to 7200 seconds - fix : "if you use --persist" was not true, added link to issue online-go#59 for details
- add custom-branches.md : has been asked many times, we can link to that if bot admin doesnt know about it - fix : increase default maxmaintime from 1800 to 7200 seconds - fix : "if you use --persist" was not true, added link to issue online-go#59 for details
@wonderingabout Should this issue be closed? I believe we/you did add support for max # of games in the past? |
@roy7 sorry for the delay, i didnt notice your message! yes, the main issue is solved now that we have other issues should be adressed separately in their own PRs so yes we should close this issue 💯 |
Hi, i'm trying hook up Pachi to gtp2ogs, see how it does on ogs.
So far it's working fine for single games, but looks like i'm having an issue with simultaneous games.
How is it supposed to work at the moment ? gtp2ogs spawns one engine instance per simultaneous game ?
(trying live games atm, running with --persist)
Looks like this is what's happening, my engine script gets spawned again when the 2nd game starts and it's not happy about it. Maybe i need PR #44 to use a single instance instead ? But this only works for correspondence games i guess...
Otherwise i can fix my side to handle multiple instances, but i need a way to set max number of simultaneous games (if it spawns 30 instances it's going to be an issue ...)
The text was updated successfully, but these errors were encountered: