Welcome, Guest. Please Login or Register.
Nov 22nd, 2024, 12:14pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Bug: timed out though 1sec is left »


   Arimaa Forum
   Arimaa
   Site Discussion
(Moderator: supersamu)
   Bug: timed out though 1sec is left
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Bug: timed out though 1sec is left  (Read 762 times)
Boo
Forum Guru
*****



Arimaa player #6466

   


Gender: male
Posts: 118
Bug: timed out though 1sec is left
« on: Mar 10th, 2012, 3:56am »
Quote Quote Modify Modify

http://www.image-share.com/ijpg-1341-270.html
IP Logged

tharkun
Forum Senior Member
****



Arimaa player #7288

   


Gender: male
Posts: 29
Re: Bug: timed out though 1sec is left
« Reply #1 on: Mar 13th, 2012, 3:04pm »
Quote Quote Modify Modify

On a related note, I am also interested in how the clock times work. In the last few days I've lost on time no fewer than 8 times against bot_Lucy (incidentally the same bot against which Boo noticed the bug he reported above). Obviously some of them were caused by my inability to find a decent move in the position, but still it was a bit much and in some cases I was mystified how I managed to run out of time (e.g. here).
 
I started paying more attention to the clock and noticed that sometimes there is a huge lag. Occassionally I the time between the moment I press "Send" and the moment my clock stops moving is no less than eight seconds. Obviously this makes it quite difficult to play at blitz (15 seconds per move). Is this a problem on my end? My internet connection is pretty fast and it does not feel slower than normal.
IP Logged
Swynndla
Forum Guru
*****



Arimaa player #1821

   


Posts: 235
Re: Bug: timed out though 1sec is left
« Reply #2 on: Mar 13th, 2012, 8:58pm »
Quote Quote Modify Modify

I'm having problems where an opponent of Lucy genuinely runs out of time and should lose, but when the server checks to see if Lucy is present, the server doesn't see Lucy and marks the game as "abandoned".  Lucy is currently running on my home pc in New Zealand, and so I'm putting it down to my internet connection (and being a long way away from the server).  Once Lucy is on the gameroom server that issue with likely disappear (although I still don't know why the human-losing-on-time-even-though-there-is-one-second-left issue is happening, but that issue may disappear also, especially if you're not seeing it happen on other bots in the gameroom?).
 
When I play Lucy in through the gameroom (but is actually running on my local pc), I submit a move, but often I'll see the clocks still ticking down for 6 seconds or so, only for the time to be back-tracked (or most of it?).
IP Logged
Jugular
Forum Newbie
*



Arimaa player #6237

   


Gender: male
Posts: 1
Re: Bug: timed out though 1sec is left
« Reply #3 on: Apr 5th, 2012, 11:27pm »
Quote Quote Modify Modify

The way the client deals with time is pretty annoying in my experience. I've played on KGS and it took them a while to sort out the time issues but it is now excellent. If anyone is still putting time into client development it may be worth getting in contact with William from KGS about how to solve these issues.
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Bug: timed out though 1sec is left
« Reply #4 on: Apr 7th, 2012, 1:17pm »
Quote Quote Modify Modify

It is very easy to lose on time when you have only 1 sec left, or sometimes even a few seconds. To give you an idea of what needs to happen between click the 'Send' button and the move registering on the server.
 
1. Client checks to see if the move is valid, if not it warns you. The time for this is usually constant and quite negligible.
2. Client attempts to create a HTTP connection to the server. The time for this to happen could vary quite a bit depending on Internet traffic between you and the server. If you're using wifi, a weak connection could also increase this time.
3. Once the TCP socket connection is established the client sends the move. The time for this also varies similar to #2.
4. Once the server receives the move a bunch of perl code needs to be compiled and run to verify and process the move. Depending on the server load, the time for this could also vary.
 
Ideally you would to use a dedicated socket connection so the #2 could be skipped. Also the server code to process the move should be in a pre-compiled language like Java, C, Golang, or Cobra so that the compilation step in #4 can be skipped. Finally you would want the client to include the time when the 'Send' button was clicked along with the move so that even the delay caused by #1, #3 and #4 can be subtracted out.
 
I never really set out to build a gameroom for Arimaa. Initially it was only going to be a site with static web pages to present the rules of the game and the challenge. But shortly before releasing the site I thought it would be good to have a place where people could try out the game.
 
I've often thought about doing a complete rewrite of the game server and game client, but it's a big project and needs a big stretch of time. I've even thought of doing it as an open source project, but leading such a project would also take significant time. So, we've just been kicking along with the initial code I wrote back in 2002 and kept adding to. Computers and networks have managed to get faster and faster so that we are able to get by with it. But it is definitely far from being ideal.
 
I do worry though that as we try to get more players introduced to Arimaa, the bad experience they have using this old code will be associated with the game itself and our efforts will be wasted.
 
If there is someone interested in leading an open source project to build a new game server and client, I would definitely support you with coding effort and promotion of the project on the Arimaa site. If it is done in a modular way it could be used for other games as well.
IP Logged
hyperpape
Forum Guru
*****



Arimaa player #7113

   


Gender: male
Posts: 80
Re: Bug: timed out though 1sec is left
« Reply #5 on: Apr 7th, 2012, 9:55pm »
Quote Quote Modify Modify

Isn't trusting the time that the client sends a bad idea for the same reason that most client-side validation is a bad idea? Can't the perl script have access to the time that the server received the communication, and use that, plus a small ( < 1 sec) fudge factor, based on how the data typically spends in transit?
« Last Edit: Apr 7th, 2012, 9:56pm by hyperpape » IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

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