(Correspondence) What algorithm does OGS follow when choosing which game to play next?

At this point, I assume it is Random and keep going back to the Home page as the only way to play the most urgent games first.

1 Like

If you’re not using a smartphone, you can open your games in tabs simply by clicking with the mouse wheel. You could just open a bunch of them in order, and close the tabs after your moves. If your browser is set up correctly, you should have the games in order as you close tabs. Anyway, it is not ideal, and it would probably be better to be able to specify an order, directly from the website, but in the meantime I have found it to work decently.

1 Like

I guess that’s a better alternative then going back to the homepage every time… Thanks for the suggestion!

Though I still find it weird that the games don’t go according to a certain order… DGS does, I wonder why here doesn’t.

4 Likes

I realised I’m in desperate need of this function as I have so many games… It will flood my tabs if I open all those urgent games in new tabs… Can the admin please consider adding this function?

3 Likes

Yes, the “next open game” button in the top right seems​ to choose the next game randomly.

Out of my 20 correspondence games, I would like to do 2-3 moves in the most urgent games. Maybe even respecting weekend breaks.

@anoek what’s the current logic for choosing the next game?

We look at the current game you’re on, then pick the next game it’s your move on based on game ID. I always kinda liked that solution because it gives a way to hop on and do one move for every game you’re in, then log off… that way if there’s one or two other people on making moves right away on your shorter correspondence games, those games don’t keep popping up while you’re cycling through your games. Though I certainly wouldn’t object to someone making an option to progress a different way, it’d be a good setting. The code is here if anyone wants to take a crack at it: https://github.com/online-go/online-go.com/blob/devel/src/components/Notifications/Notifications.tsx#L215-L250

2 Likes

I think this method is good for people who have few games, and want to play all the games at one go. For people who have many games, and prefer to play those more urgent games, this may not be a good method.

Since correspondence means can play many games at once, I think it’s natural that people want to clear the urgent games first, rather then go through all the games according to game ID.

Game ID… I see… No wonder I keep coming back to the same game after making the move.

2 Likes

Yes I agree, I can certainly see the desire for sorting by time which is why I’d be happy to accept a pull request to add that in as an option. Currently the average number of games that correspondence players have going on at any one time is about 10, which makes me think the current sorting system is a good default. But yeah once you get 50, 100, 200 games going at once, sort by time seems like it’d make the most sense.

2 Likes

Thanks for considering :slight_smile:

Average is about 10… Hmm… Looks like I’m the crazy one with over 100 games…

1 Like

Haha, well it looks like there’s about 6 of you that can maintain > 100 games, so you’re not alone… but it is pretty impressive! :slight_smile:

3 Likes

This is an old thread, but I’m new here and this seems the most relevant place to post. I am not a programmer either or I would try to implement a pull request myself, but this would be a great QOL improvement for us that like to have multiple correspondence games active.

I would be curious to know if the low averages Anoek mentioned above for correspondence players still holds true, or if there might now be any more incentive to get this feature implemented for us plebs that are unable to make the addition ourself?

IMHO this would greatly benifit correspondence players, and has potential with further implementation to be valuable to live players as well.

As an added note, I play almost exclusively on mobile, so browser workarounds are almost useless. I know that this example is a single case, but I would assume that mobile players have gone up steadily considering the mobile technology advances that have taken place in the years since the last posting.

Pic worth a thousand words

2 Likes

With this solution you be in trouble with absolute time games I guess?

Maybe that’s ok, or anyway no worse than now?

This is on a list of things I want to improve. Didn’t know about the thread.

The current behaviour is a bit inconsistent. Sometimes it seems to go through all games, and sometimes you get stuck hitting the same games over and over (depending on which opponents move when).

Note that it does try to go through games in urgency order first (per the OP’s request; looks like this was implemented in April 2022). But:

  • if an opponent makes a move after you start going through the list, all bets are off
  • the sort field used for your-clock urgency isn’t very reliable (I’ve been improving the sorting of the main game list, but I never updated this… and it might be harder here, for “reasons”)
    • paused games can show up just about anywhere
    • absolute time isn’t prioritized appropriately
  • if you navigate to other parts of the site and then start advancing through games again, it picks up from where it left off (even if this was days ago) (EDIT: I think I was wrong about this)

I think we can improve this to better match the intention. Here’s the behaviour I have in mind (not going to do it immediately, but…):

  1. Create a concept of an “advance-through-games” session. (No new/special user interface for this… just a concept.)
    • When you are on any of your games, you can advance through games by clicking the “active count” in the top bar, or, if and only if you have auto-advance on, by making a move. This keeps within the “same” session.
    • If you do something other than advance through games (say, visit a tournament), and then start visiting your games again (say, by clicking the indicator), you’re starting a “new” session.
  2. Inside an advance-through-games session, you advance through games in this order:
    • live before correspondence.
    • your-move only, unless all games are opponent-move.
    • not-visited-yet before already-visited.
      • If not-visited-yet, then in order of your-clock urgency (most urgent first).
      • If already-visited, then in order of last visit (least recent first).

Differences vs. current behaviour:

  • Fix behaviour around when an opponent makes a move
  • Improve clock-urgency sorting to match game list sorting (if possible…)
  • Start again from “most urgent” if someone comes back from doing other things (EDIT: I think that’s already how it works)

Another idea I had, although not sure if this is just something I want or generally useful:

  1. If you visit your game list (on your profile or “Home”) and sort by something other than “Clock”, then click on a game, then the new advance-through-games session is seeded by the active games list.
    • E.g., if you sorted by “clock” (the default), but clicked on the 7th game in the list, the ones you skipped over are treated as-if already-visited. (Allow you to skip over some games, if you want to…)
    • E.g., if you sorted by “opponent”, then the first games you visit are all the ones with the same opponent as the game you clicked on. Once they’ve been visited, revert to your-clock urgency for the remaining of not-yet-visited.
    • E.g., if you sorted by “board size”, then the first games you visit are the ones with the same board size as the game you clicked on. Once they’ve been visited, revert to your-clock urgency for the remaining of not-yet-visited.
6 Likes

Thanks for the response, I’m glad to hear it is being considered! This session idea covers just about every contingency I can think of for correspondence, and goes some way toward adressing live games as well. This is not only what I am looking for personally, but also names functionality that improves the idea quite a lot.

The way it works won’t exactly be intuitive to understand, but then it is not intuitive now, and not particularly useful beyond just powering through all active games. This new implementation would allow for much more “natural” progression through games without much thought on the user’s part. For those willing to dig a little deeper the second part of your idea seems superb and I would love to have it, though how you would introduce that functionality to new users seems like a bit of a hurdle…

I would think that absolute time games could take immediate priority over other clocks despite current time as a solution to this problem? Though the game time may be long, these can be considered more urgent since time lost can not be recovered, which is not the case for other clocks.

Edit: after reading through the linked thread this appears to be exactly what is being considered… so, seperate issue I guess? A non factor for this issue at least, like you said - no worse than what we have now.

2 Likes

Actually, that’s one of the game list sorting improvements that already landed (but as mentioned, just the game list, not the advance-game function). Went with @jlt’s suggestion in that thread.

3 Likes

Wow I forgot that I posted about this lol.

Now I’m used to going back to the main page next time, but I guess it would really help if the next game can be selected based on the amount of time left.

2 Likes

This may be too deep in the weeds, but I might also suggest for consideration: prefer correspondence games where the opponent has just made a move (or where the opponent is online?), if there are no other urgent games.

It’s nice to sometimes temporarily switch to an almost “live mode” on a correspondence game. So unless my clock is really low somewhere, I would rather respond to a recent move (and maybe get another response!) rather than contemplate a game where the opponent isn’t around and there is plenty of clock time.

As for a note technical question - what happens to the “session” if something changes? Eg, if an opponent makes a move in a live game while I’m 7 correspondence games into my session. Presumably we’d have to forget about the position and show the live game? Would it help to have separate “urgent” and “whenever” queues inside the session?

2 Likes

You shouldn’t be leaving live games, I can’t remember the ins and outs but the expectation is that you will play live games live. If you leave you should get notified not to do that and ultimately will trigger disconnection loss and all that.

1 Like

Can’t we treat live games and correspondence games differently? Is that difficult?