Welcome, Guest. Please Login or Register.
Nov 24th, 2024, 6:12am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « AEI problem, questions »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   AEI problem, questions
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: AEI problem, questions  (Read 2876 times)
petermck
Forum Junior Member
**



Arimaa player #9440

   
Email

Gender: male
Posts: 6
AEI problem, questions
« on: Jan 28th, 2015, 10:27pm »
Quote Quote Modify Modify

Here's a snippet from my bot's AEI log:
 

2015-01-28 08:38:11 INFO:gameroom:Received move 25b rd7w ed6n ed7n ed8e
2015-01-28 08:38:11 INFO:gameroom.position:
26w
 +-----------------+
8|         e r     |
7| r   r   E R r r |
6| r c X   h D c   |
5| R         r     |
4|               R |
3|   h X m   X R   |
2| R R R C         |
1|               R |
 +-----------------+
   a b c d e f g h
 
2015-01-28 08:39:09 INFO:gameroom:Sending move Ee7w Ra2n Cd2e Rh1n
2015-01-28 08:39:29 INFO:gameroom.net:bad response from server trying again in 10 seconds
2015-01-28 08:40:00 INFO:gameroom.net:bad response from server trying again in 20 seconds
2015-01-28 08:40:24 ERROR:gameroom:Error in response to Table.move: Gameserver: Bad Move: bad step Ee7w Ra2n Cd2e Rh1n
2015-01-28 08:40:44 INFO:gameroom.net:bad response from server trying again in 10 seconds
2015-01-28 08:41:15 INFO:gameroom.net:bad response from server trying again in 20 seconds
2015-01-28 08:41:36 INFO:gameroom.position:
27w
 +-----------------+
8|         e r     |
7| r   r E R   r r |
6| r c X   h X c   |
5| R         r     |
4|               R |
3| R h X   m X R   |
2|   R R   C     R |
1|                 |
 +-----------------+
   a b c d e f g h
 
2015-01-28 08:41:36 INFO:gameroom:Game over, I lost result: 'bi'
 

 
Looks like there was a network problem and the move was sent then re-sent, but was received both times, with the 2nd one being interpreted as an illegal move.  Is this a known issue, either in the AEI implementation or the underlying protocol?
 
I'm using AEI 1.1 from here: http://arimaa.janzert.com/aei/
Except I hacked the code to reduce the timeout from 300sec to 20 sec so that my bot wouldn't lose on time at the first network glitch (which worked well until now).
 
There's also the latest dev version in the github repository: https://github.com/Janzert/AEI
Is anyone using that version?  Any problems?
 
cheers,
Peter
« Last Edit: Jan 28th, 2015, 10:28pm by petermck » IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: AEI problem, questions
« Reply #1 on: Jan 29th, 2015, 2:05am »
Quote Quote Modify Modify

It's a known issue with the underlying server protocol.
 
Basically when the network connection is broken while trying to send a move the bot interface doesn't know if the server actually received it or not*. Most of the time the answer is that the server hasn't so it tries to resend it. But if the server actually did receive the move *and* the opponent responded in the meantime, the server then tries to apply the move to the next turn. Of course it's almost always illegal at that point.
 
A simple fix for this would be for the server to accept the move number along with the actual steps of the move and discard the move/return an error if it was not for the current turn.
 
Janzert
 
* The interface could try querying the server for the current game state after the first failure. From what I've seen though this would lead to a timeout even more frequently than the illegal move result.
IP Logged
petermck
Forum Junior Member
**



Arimaa player #9440

   
Email

Gender: male
Posts: 6
Re: AEI problem, questions
« Reply #2 on: Jan 29th, 2015, 10:04am »
Quote Quote Modify Modify

Right, I thought it might be something like that.  It's a pretty bad flaw in the protocol.
 
I agree your proposed fix would work.  But simpler might be just sending the board state instead of the move number.  A single line FEN style string is fairly concise.  From memory that's the way the ICC/FICS protocol works (or did work when I wrote an interface for my chess program many years ago).
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.