Arimaa in WinBoard?

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Arimaa in WinBoard?

Postby iqp » 14 Oct 2014, 11:32

Hi everyone,

I've recently become interested in Arimaa and since there are no decent Arimaa clients around [1], and WinBoard (alien-edition in particular) already supports so many different chess-like games, shouldn't it be possible to support Arimaa in WinBoard?

I suppose Fairy-Max would need to be modified to play Arimaa, or an existing Arimaa engine modified to talk CECP, or a new dedicated Arimaa engine written for WB. From a client perspective, what would need to be change in WB, and how much work would you estimate is involved?

Cheers,
Ralph

[1] there's Rabbit's Arimaa Client but it's written in Python, has a complicated install procedure, and is aimed primarily at bot (Arimaa speak for engine) developers.
iqp
 
Posts: 11
Joined: 06 Oct 2014, 00:18
Location: South Africa

Re: Arimaa in WinBoard?

Postby H.G.Muller » 14 Oct 2014, 19:56

I don't know Arimaa too well, but the WinBoard Alien Edition should be able to do almost anything, under directions of an engine. In 'variant alien' the engine can send a board update after every move, to correct for side effects of a move that the GUI would not expect. And 'variant multi' allows you to move multiple pieces, or the same piece multiple times.

As I understand it, Arimaa is basically a game where you can move upto 4 pieces. What might need a little work is that some of the pieces can be opponent pieces, and that they really have to be moved explicitly. (I.e. their move is not a fixed side effect of a move of your own piece, as it would be in, say, Magnetic Chess or Chess with Catapult pieces. It really needs additional specification through user clicks or in the move notation.)

I don't know if there is a standard or obvious way for how to indicate Arimaa moves to a GUI. I suppose that when I step the same piece 4 squares (say e2-e6), there wouldn't be any need to click more than the from- and to-square. But clicking e5 after e2 would consume only 3 steps, and another piece could be moved one step. (A free move for an own piece, or dragging an enemy piece next to the from square to it, or pushing an enemy piece out of the to-square.) I guess moving to an occupied square could be solved with one more click, on the desitination of the enemy piece. And likewise for pulling an enemy into the from-square you would only have to click the enemy piece you want to drag there. Only if you click an own piece it should be interpreted as selecting a new piece to move, and it should wait for a fourth click to find its destination.

Another way to do it would be to displace every piece explicitly. E.g. when pushing a piece out of e5, you could start with e5-d5 (requiring to grab and drag an enemy piece), and then drag your own piece from e2 to e5. I don't know if this is always possible. (I.e. can it ever happen in Arimaa that two pieces of opposite side exchange position?)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Arimaa in WinBoard?

Postby iqp » 15 Oct 2014, 05:54

H.G.Muller wrote:I don't know Arimaa too well, but the WinBoard Alien Edition should be able to do almost anything, under directions of an engine. In 'variant alien' the engine can send a board update after every move, to correct for side effects of a move that the GUI would not expect. And 'variant multi' allows you to move multiple pieces, or the same piece multiple times.


Wonderful!

H.G.Muller wrote:As I understand it, Arimaa is basically a game where you can move upto 4 pieces.


You can move up to four pieces once each, or one piece up to four times, or two pieces twice, etc. You don't have to use all four steps available to you though, as long as you change the position. That is, at the end of your turn the board position must be different to what it was at the beginning of your turn.

H.G.Muller wrote:What might need a little work is that some of the pieces can be opponent pieces, and that they really have to be moved explicitly. (I.e. their move is not a fixed side effect of a move of your own piece, as it would be in, say, Magnetic Chess or Chess with Catapult pieces. It really needs additional specification through user clicks or in the move notation.)


That's correct since a piece can, e.g. pull an enemy piece north and move west or push an enemy piece east and move south.

H.G.Muller wrote:I don't know if there is a standard or obvious way for how to indicate Arimaa moves to a GUI. I suppose that when I step the same piece 4 squares (say e2-e6), there wouldn't be any need to click more than the from- and to-square. But clicking e5 after e2 would consume only 3 steps, and another piece could be moved one step. (A free move for an own piece, or dragging an enemy piece next to the from square to it, or pushing an enemy piece out of the to-square.)


Pushes and pulls take two moves each. One move for the piece being pushed/pulled and one for the piece doing the pushing/pulling.

H.G.Muller wrote:Another way to do it would be to displace every piece explicitly. E.g. when pushing a piece out of e5, you could start with e5-d5 (requiring to grab and drag an enemy piece), and then drag your own piece from e2 to e5. I don't know if this is always possible. (I.e. can it ever happen in Arimaa that two pieces of opposite side exchange position?)


I think this is the way to do it and the way other Arimaa GUIs work. No two Arimaa pieces can exchange position exactly but there are some interesting combinations of pushes and pulls: (defintions fro m the excellent Arimaa wikibook: https://en.wikibooks.org/wiki/Arimaa)

  • Flip: The combination of pulling and pushing an opponent's weaker pieces such that the weaker piece appears to be flipped to the other side of the stronger piece. Weaker pieces are
    vulnerable to being flipped to the opponent's side and eventually being trapped.
  • Swing: The combination of pulling and pushing an opponent's weaker pieces such that the weaker piece is moved 90 degrees clock wise around the stronger piece
  • Throw: The combination of pulling and pushing an opponent's weaker pieces such that the weaker piece is moved 90 degrees counter clock wise around the stronger piece
iqp
 
Posts: 11
Joined: 06 Oct 2014, 00:18
Location: South Africa

Re: Arimaa in WinBoard?

Postby H.G.Muller » 16 Oct 2014, 09:54

iqp wrote:Pushes and pulls take two moves each. One move for the piece being pushed/pulled and one for the piece doing the pushing/pulling.

So for my understanding: it would be possible to move your own piece on e2 to e5, and if there was a weaker enemy in e5, push that to e6?

No two Arimaa pieces can exchange position exactly ...

With pieces on d2 and e2 I could move e2e3, d2e3, e3d3, d3d2, right? Even if d2 was an enemy, I could have done the d2e3 as a pull?

But I was worrying if there would be cases where you had just two steps available; I suppose own pieces on d2 and e2 could not be swapped in two steps. But can't I move e2d2 into the enemy square, and then push that enemy to e2? Or is it forbidden to push where you came from?

The problem I feared was that you could not enter a swap as two separate steps e2e3, e3e2. But I guess this is not a problem if pushes and pulls are to be entered by single clicks: when you entered a square occupied by an opponent (i.e. after e2d2) your next click can always be interpreted as a destination for that opponent, as you must move it out of the square. So there should be no prolem to enter a swap, as your from-square would already be empty by the time you have to pick the destination for the pushed piece, so that you can select it. WinBoard does not have to know that it is actually the 'captured' piece that should move there, and not the piece you were moving originally. It will get to know that when the engine sends it the board update. And if you click an enemy piece after your moved your own it must mean you want to pull that piece to the from-square of the previous step.

Is it possible to push and pull with the same step (consuming 3 steps). E.g. with enemies on d2 and f2 move e2f2, push the enemy there to f3, and pull d2e3? I guess even that would not be a problem, because it would always know by whether you clicked an empty square or an enemy piece whether it means a push or a pull.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Arimaa in WinBoard?

Postby iqp » 16 Oct 2014, 13:43

H.G.Muller wrote:
iqp wrote:Pushes and pulls take two moves each. One move for the piece being pushed/pulled and one for the piece doing the pushing/pulling.

So for my understanding: it would be possible to move your own piece on e2 to e5, and if there was a weaker enemy in e5, push that to e6?


Yes, that would work. Your piece would move e2e3 e3e4 (2 steps), push the enemy piece e5e6 (1 step) and then move e4e5 (1 step).

H.G.Muller wrote:
iqp wrote:No two Arimaa pieces can exchange position exactly ...

With pieces on d2 and e2 I could move e2e3, d2e3, e3d3, d3d2, right? Even if d2 was an enemy, I could have done the d2e3 as a pull?


Sorry, I completely misinterpreted your question - I thought you were asking whether a piece can swap places with an enemy piece only by being pulled and/or pushed, and in that case the answer is no. But a piece can swap places with an enemy piece by pulling the enemy piece (2 steps) and then using its remaining 2 steps to occupy the square the enemy piece originally stood on. e.g. if all the pieces are on their starting squares except for a gold elephant on e4 and a silver camel on e5 and it is gold's turn, then the gold elephant could move e4d4 e5e4, pulling the camel and then d4d5 d5e5. Btw, in your example you had d2e3 which is a diagonal move but diagonal moves are not allowed in Arimaa (all pieces move one square like a rook, except for rabbits which can't move backwards)

H.G.Muller wrote:But I was worrying if there would be cases where you had just two steps available; I suppose own pieces on d2 and e2 could not be swapped in two steps. But can't I move e2d2 into the enemy square, and then push that enemy to e2? Or is it forbidden to push where you came from?


I'm afraid I don't quite follow.

H.G.Muller wrote:Is it possible to push and pull with the same step (consuming 3 steps). E.g. with enemies on d2 and f2 move e2f2, push the enemy there to f3, and pull d2e3? I guess even that would not be a problem, because it would always know by whether you clicked an empty square or an enemy piece whether it means a push or a pull.


No, this is not possible - pushes and pulls cannot be combined into a single step.

Here is a good summary of the rules: http://arimaa.com/arimaa/learn/rulesIntro.html (Also available as a PDF: http://arimaa.com/arimaa/learn/rules.pdf)
iqp
 
Posts: 11
Joined: 06 Oct 2014, 00:18
Location: South Africa


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 23 guests