Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> General Discussion >> Bug in Arimaa Game Client?
(Message started by: dpalmer on Jul 18th, 2017, 4:17pm)

Title: Bug in Arimaa Game Client?
Post by dpalmer on Jul 18th, 2017, 4:17pm
First of all, there have been enough games played that I doubt there is a bug, but I could not explain what I observed.

I was in Expert mode, playing out speculative branches of a game I am playing with hanuman. I got to a situation in which I wanted to have an elephant commit suicide. It went into the c6 trap on the third step of its move, but the client would not let me complete a pull of a silver rabbit into d6 as the fourth step.

As part of the move, a gold rabbit had been lost as the second step of the turn was moving the gold elephant away from the f6 trap where a gold rabbit resided. The elephant was the only friendly adjacent to the trap.

Am I not understanding something? I understand that pulls can be completed by captured pieces. I also verified this experimentally with other pieces in less unusual circumstances.

The exact scenario was:
gold Cat: g5
gold Dog: g7
gold Rabbit: f6
gold Elephant: e6

silver elephant: c5
silver rabbit: d6
silver dog: d7
silver horse: g6
silver rabbit: f7

The attempted move for gold was:

rd6s Ee6w rf6x Ed6w Ec6x rd5n

The client would not allow the final (4th) step: rd5n

Seemed very strange....

Title: Re: Bug in Arimaa Game Client?
Post by dpalmer on Jul 18th, 2017, 4:29pm
I tried to post a screenshot and a link to the speculative state of the game - neither attempts were successful.

Title: Re: Bug in Arimaa Game Client?
Post by clyring on Jul 21st, 2017, 4:28pm
There are a few known bugs in similar situations, where the client can become confused by a capture mid-turn, though I don't think I've seen this exact one before. Since this is a postal and anyway the attempted move is an explicit admission of loss, it's not too big of a deal- in desperation you can try using another of the clients (Settings > Game  Client, in the gameroom), or sending the move artificially with the blindfold play script.

I was able to confirm that in this particular position, the move can be sent with the flash v1 client, but not with the flash v2 or javascript clients, and the server accepts the move as legal. (Indeed, I don't know of any positions where the server incorrectly assesses the legality of a move, but I also haven't tested these edge cases much at all due to the inconvenience of so doing.)

EDIT: Link to the position, for anyone who wants to verify this bug. (http://arimaa.com/arimaa/games/planGame.cgi?movelist=1w%20Cg7%20Dg7%20Rf6%20Ee6%0A1b%20ec5%20rd6%20dd7%20hg7%20rf7)

Title: Re: Bug in Arimaa Game Client?
Post by dpalmer on Jul 21st, 2017, 4:53pm
Point is well taken about the likelihood of this being a big deal.

The platform has been rock solid for me for so long, it caught me off guard.  I am glad to know from this reply how to set up a URL for a specific game state.

Thanks for the information.

Title: Re: Bug in Arimaa Game Client?
Post by omar on Jan 6th, 2019, 12:50am
Yes, looks like it is bug. I just looked at the code and I see what is causing it. But this is a good opportunity to see if we have any other programmers here who can find it. Just open the link that clyring gave above. Hit Ctrl-u to view the source. Click the link to open arimaa.js. All the client code is in this file and source is readable. See if you can find what might me causing the silver rabbit to not be "pullable" :-)

Title: Re: Bug in Arimaa Game Client?
Post by Max2 on Feb 22nd, 2019, 2:44pm
More moves which do not work in this position:

1. rd6s Ee6w Rf6x Ed6w         Ec6x rd5n  (from first post)
2. rd6s Ee6w Rf6x Ed6w         Ec6x dd7s  
3.          Ee6s Rf6x Ee5n Ee6e Ef6x rd6e
4.          Ee6n Rf6x Ee5s Ee6e Ef6x rd6e

All this moves have in common:
- the gold rabbit is captured passiv with first step
- the gold elephant captures itself with third step
- the 4th step pull by captured elephant is not allowed
(- all 4 steps are used
not neccessary; reproduced bug with 3 steps in other position)


Title: Re: Bug in Arimaa Game Client?
Post by omar on Jan 17th, 2021, 11:27pm
Looks like we didn't have anyone taking up my challenge to find the bug in the code. I went ahead and fixed it. If your client version (shown in the top left) is 0.7.25b then it should now be fixed. If you need to load the newest version type Ctrl-Shift-R in the game client window.

To see the code changes for the fix, open the game client, type Ctrl-U to view the source. Click on the link for arimaa.js and search for 20210117. It was basically adding one letter 'g' :-)

I also fixed the sounds not working. Just needed to update the soundManager version.



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