Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Site Discussion >> Pausing games?
(Message started by: megajester on Aug 3rd, 2011, 5:09am)

Title: Pausing games?
Post by megajester on Aug 3rd, 2011, 5:09am
Right now I've got 20 minutes before the end of my lunchbreak and I feel like playing some Arimaa. But I know that if I start a game with a bot its likely to take a lot longer than that.

I'd really really like a feature whereby I can pause a game and then get the server to "resurrect" it for me later. I don't mind if it has to be unrated...

Is there really no way of doing this?

Title: Re: Pausing games?
Post by rbarreira on Aug 3rd, 2011, 5:16am
Technically I'm sure it's possible, as long as the bot has the ability to leave and rejoin a game. You wouldn't want bots staying in memory as long as games are paused, that would quickly cause trouble.

I have no idea how much work it would be for Omar though...

Title: Re: Pausing games?
Post by megajester on Aug 3rd, 2011, 5:38am

on 08/03/11 at 05:16:22, rbarreira wrote:
You wouldn't want bots staying in memory as long as games are paused, that would quickly cause trouble.

Couldn't you save the game stats and then reboot the bot later instead of keeping the bot in memory?

Title: Re: Pausing games?
Post by rbarreira on Aug 3rd, 2011, 5:59am

on 08/03/11 at 05:38:34, megajester wrote:
Couldn't you save the game stats and then reboot the bot later instead of keeping the bot in memory?


Yes, that's what I meant by the bot leaving and rejoining the game. Then it wouldn't be in memory while it's paused.

Title: Re: Pausing games?
Post by megajester on Aug 3rd, 2011, 7:48am
Oh OK I get it, sorry...

Title: Re: Pausing games?
Post by Fritzlein on Aug 3rd, 2011, 8:14am

on 08/03/11 at 05:59:02, rbarreira wrote:
Yes, that's what I meant by the bot leaving and rejoining the game. Then it wouldn't be in memory while it's paused.

In fact, if I understand correctly, bots are shut down between every move and restarted at need, even in live games, even in blitz games.  I think the issue would just be the bookkeeping headache: How are the clocks handled?  Would people use pausing to avoid losing on time whenever they got confused about a position?  How do you restart?  Is there an interface for seeing paused games of yourself and/or other players?  What if you don't come back later to restart?  Is there a timeout or are paused games saved forever?  What if you pause every game you are losing and then start new ones instead of finishing the other?  How does the eventlist of the game get stored?

I'm guessing that pausing games wouldn't be technically difficult in the main, it's just that a host of niggling little side issues would arise, and probably years later Omar would still be trying to tamp them down and wondering whether it was worth the trouble.

Title: Re: Pausing games?
Post by rbarreira on Aug 3rd, 2011, 8:23am

on 08/03/11 at 08:14:39, Fritzlein wrote:
In fact, if I understand correctly, bots are shut down between every move and restarted at need, even in live games, even in blitz games. How are the clocks handled?  Would people use pausing to avoid losing on time whenever they got confused about a position?  How do you restart?  Is there an interface for seeing paused games of yourself and/or other players?  What if you don't come back later to restart?  Is there a timeout or are paused games saved forever?  What if you pause every game you are losing and then start new ones instead of finishing the other?  How does the eventlist of the game get stored?

I'm guessing that pausing games wouldn't be technically difficult in the main, it's just that a host of niggling little side issues would arise, and probably years later Omar would still be trying to tamp them down and wondering whether it was worth the trouble.


Some bots are restarted for every move, some are not (the ones which use the new interface, AEI). However, a compliant AEI bot is able to rejoin games too, if it isn't it might get into trouble on the event games in case there's a crash, power failure, etc.

I agree that it would be a lot of little changes which might add up to too much, but who knows...

Title: Re: Pausing games?
Post by Hippo on Aug 3rd, 2011, 2:46pm
1) I agree that pondering is not much important in arimaa (especially in fast speed) so restarting the bot is not that big issue.
2) Restart interrupted game against generally available bot  could be easy, but interruption of a game between other opponnets would be much more difficult.
So allowing interruption is reasonable only for site bots.
3) If we limit the number of interrupted games of a player to one, the "lose prevention" method wouldn't be effective.
4) Switch to the "postal" mode would be an issue affecting rating so allowing interruption only for unrated games looks reasonable.

I am not sure this feature is worth programming effort.

Title: Re: Pausing games?
Post by megajester on Nov 11th, 2011, 9:37am
OK here's an idea.

I have no idea exactly how the whole thing works, but based on my rudimentary understanding of IT I would guess that whenever you start a bot game, what your machine does is send a request to the server, coded in a certain way, that basically says "Start bot X for me and I want to play it as gold with x/x/x time controls." Is there any way to monkey with that code so that it says "Start bot X for me and I want to play it as gold with x/x/x time controls starting from this position"?

I know it would probably register as a resign every time I close a game to resurrect it later. But I could use an alternate account for it. I could get my 15-minute Arimaa fix, note the position, and then use it later on to continue with the game.

Title: Re: Pausing games?
Post by omar on Nov 12th, 2011, 10:37pm

on 08/03/11 at 05:09:40, megajester wrote:
Right now I've got 20 minutes before the end of my lunchbreak and I feel like playing some Arimaa. But I know that if I start a game with a bot its likely to take a lot longer than that.

I'd really really like a feature whereby I can pause a game and then get the server to "resurrect" it for me later. I don't mind if it has to be unrated...

Is there really no way of doing this?


Joel, this is very much doable. But to do it right requires having two sets of time controls. One is the time control which determines how much time you have to think about your move (for example 1 minute per move), the other is the time control which determines how long you can be away before you have to come back to the game and make your next move (for example 2 days). In such a game you would not immediately see your opponents move, but would rather be told that your opponent has made the move and you would have to click a button to go ahead and show you the move. When you click the button your 1 minute timer would start ticking, but prior to that the 2 day timer would be ticking. You would lose the game on time if either timer ran out. So in such a game you can walk away from your computer while it was your opponents turn to make the move and not worry about losing on time if you don't get back quickly. This would allow live time control type games to be played between humans even if they can't both be at the computer at the same time. Bots of course will not need the extra time from the second time control and will make their move right away.

I've had the idea to add this feature to the site for many years now, but it's one of those things that get pushed back by other pressing things. I was going to do this in the summer of 2010, and was looking on other gaming sites to see how they did it, but it seems that no one else has implemented this. I didn't get around to working on this, because I started working on the tournament management system that summer. But I did end up writing up a patent for this.

http://www.google.com/patents/about/?id=82zmAQAAEBAJ

Still hope to add it to the site someday. Your request for the feature has helped to raise the priority.

Title: Re: Pausing games?
Post by clyring on Nov 13th, 2011, 12:16am
Hmmm, that gives way to writing down the position and analyzing more extensively than I ever could in a live game...  :-/

Even hampered by the fact that you wouldn't see your opponent's move before you start the faster timer ticking, I don't like that this would be possible...

Title: Re: Pausing games?
Post by megajester on Nov 13th, 2011, 2:09am
Thanks Omar, that sounds great.

You could make use of an idea from professional chess. Whenever they pause a game, the player to move writes down his move and seals it in an envelope, and when the players come together again the move in the envelope is played to restart the game.

In practice this would mean that, against a bot, you could only pause a game when it's the bot's turn to move. In a HvH game you might have to come up with a "sealed move" option that I suspect would be hard to code...

In any case I would be perfectly happy with a scenario that makes such games unrated, makes the bot move once every 2 minutes, but gives me unlimited time to respond. Maybe you could give me a time control of 1 week per move of something to prevent the server getting clogged with unfinished games. Maybe that's more complicated than I imagine it.



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.