Auto-advance to the game with least time remaining

A picture is worth a thousand words:


It’s came up few times in the past too and anoek is happy to accept pull request for it. If i knew how to, i would code it myself, but since i don’t know i can only pop up this request thats been half-forgotten. (Correspondence) What algorithm does OGS follow when choosing which game to play next?


If this feature is implemented, would it also be possible to have a special “simul” mode where it automatically jumps to the next live game with the least time remaining? So you could play a number of live games at the same time, and if you play a move in each game before the opponents, it will stay on the last game temporarily, but as soon as one of the opponents moves you jump to that game (and then stay there until you’ve made a move, wouldn’t want to auto-jump while you are considering your move).

I thought about a feature like this the other day when watching this video from Yoonyoung Kim:

I think she just had the games open in separate tabs, which works ok for just two games, but with shorter time controls and more games some sort of auto-jumping between games would be quite helpful!


I wonder if this could be implemented purely on the browser side so that there would be no more delay in loading the next game than in switching tabs, which is what would actually be happening.

So not actually a change to OGS, but to one’s browser.

So on submit move, it should look for the the lowest number amongst the simul games where each game’s number was equal to seconds remaining * is the player to move, a bool.

My understanding is that multiplication is faster than branching, hence this.

This shouldn’t require any change to OGS at all, not even on the frontend, no?

I don’t think the slowness of branching is really relevant in this case, but if you want to use that expression you’ll have to find the lowest non-zero one, since n * false is 0.

Also, one important part of this feature which is quite different from the current auto-advance, is the part where it would auto-advance when any one of your opponents makes a move (in the case where you’re just stuck on one game waiting, with no move to make).

1 Like

I guess you’d want to be polling the games in an arbitrarily ordered cycle when the minimum number by the prior method is 0, fast enough that for a human it may as well be infinitely fast due to inherent limits of human perception, until one is polled and it is to play == 1, at which point you switch to that game and cease polling, and instead wait for a submitted move to trigger the above or herein logic.

Maybe the logic to decide which game to jump to or to begin realtime polling could be coolified by storing the games’ numbers as an array of bytes, which is then ANDed with an array of bytes set all 1 if the player is to move, and all 0 otherwise?

Honestly, I’m just testing my understanding of these interesting techniques by attempting to apply them, as such an attempt usually reveals misunderstandings in much the same way production does in language acquisition.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.