WinBoard, exotic version

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

In international checkers, if a checker reaches the far rank and captures backwards, it will not be promoted. So Neibyu accepts the move only if you drop the promotion letters.
a4c2,c2e0,e0g2,g2i4
The rules are different for Russian checkers though. So if I make it work by allowing it to accept the move now, we would have a problem with the Russian version later. I think the marking with magenta would solve this problem too.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

So the up-click finishes the move by giving you an option to promote or not promote. This will work for shogi I think. I will mark the promotion zone with magenta and upload a version later.

Btw trying to make life easier for the human has forced us to include lift,put,highlight & now promotion. They are not needed for engine-engine play. What else did we miss ?

Why is +B and B~ preferred instead of using a single character for shogi and crazy house?
Rein Halbersma
Posts: 741
Joined: Tue May 22, 2007 11:13 am

Re: WinBoard, exotic version

Post by Rein Halbersma »

[quote="Daniel Shawul"]In international checkers, if a checker reaches the far rank and captures backwards, it will not be promoted. So Neibyu accepts the move only if you drop the promotion letters.
a4c2,c2e0,e0g2,g2i4
The rules are different for Russian checkers though. So if I make it work by allowing it to accept the move now, we would have a problem with the Russian version later. I think the marking with magenta would solve this problem too.[/quote]

Yes, so 3 variants:

Checkers 8x8: capture reaches promotion line and stops as a king
Russian: capture reaches promotion line and continues capturing like a king
Draughts 10x10: capture reaches promotion line and continues capturing like a man.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

I think if we send the moves with promotion letters , it would make life easier for Winboard.

For International checkers: with promotion letter 'p' otherwise winboard would queen it.
For Russian checkers: with promotion letter 'q'

And winboard should not send any promotion letter to the engine
It should understand it by default at least for checkers.

Will that work ?
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

I can easily change the conventions such that partial moves of Pawns to the last rank will not automatically be considered promotions. Any Pawn move (partial or not) out of the promotion zone could similarly be not considered a promotion, without interfering with Chess variants, as true Pawns never move backward. This would then automatically mean WB would not send promoChars on them, and would not auto-promote in case of receiving a move without promoChar.

That might not be entirely satisfactory in Russian checkers, though, because the piece moved in a multi-capture that visited last rank would eventually have to end up promoted (on the display). It would be most logical to perform that promotion on the leg that reached last rank, which can be a partial one.

One way to make WinBoard do what you want is by selecting the piece types. If you want pieces that reach last rank never to auto-promote, you can just choose a non-Pawn type to represent them. With legality testing off, WB always obeys a promoChar unconditionally. (This is not satisfactory for any Checkers variant, however, because the user has no way to enter promotions then.)

I could equip WB with two different Pawn types, where one Pawn type auto-promotes even on partial moves, but the other doesn't. In fact WB already has two Pawn types, that both auto-promote on reaching last rank (normal Pawns, and Spartan Hoplites). So I could make the normal Pawns auto-defer in partial moves, while Hoplites auto-promote. Then Russian Checkers could be implemented by the engine sending a piecetoCharTable that encodes Hoplites (piece #19, the Lance symbol) as P.

I think it would be good if the engine can always handle promoChars that indicate the same piece as that moved (by ignoring them). Perhaps you should simply ignore promoChars when they are not valid, rather than refusing the move.

The +B and B~ were existing standards for Shogi and Bughouse, so it seems desirable to adopt them. (So that people can paste FENs from external sources into WB.)
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

I have uploaded the checkers and alien version, which do magenta coloring of promotion squares. So winboard should not try to promote the piece unless it has magenta on it during highlight. For 8x8 and international checkers this is always one of the furthest ranks.

Also I have changed the move parsing to accept any letter after the move. Actually it was like that before, the problem was that I check for presence of comma to see if it was a multi-leg move and that would break down with additional promotion letter.

Edit The alien version has some problems. For a capture/promotion should I set it to Red or Magenta ?
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

Set magenta. I will make WinBoard send hover commands for both red and magenta squares. Apart for sending the hover command is not important for WB to know if a move is a capture. But it is always important to know if it is a promotion, to give the user opportunity to choose the piece. Actually there is only need to use magenta if there is a promotion choice.

I have a version now that suppresses auto-queening of Pawns on partial moves, and on legs that leave the promo zone. It still does send a p suffix on (partial) moves to the last rank, though, so it is good that Nebiyu can naow handle this. I haven't uploaded it yet; I still have to do the magenta stuff.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

Set magenta. I will make WinBoard send hover commands for both red and magenta squares. Apart for sending the hover command is not important for WB to know if a move is a capture. But it is always important to know if it is a promotion, to give the user opportunity to choose the piece. Actually there is only need to use magenta if there is a promotion choice.
Yes now the checkers problem should be resolved. Previously the move in the position you provided before was rejected. But now I get a back queen after the capture. So if you see any magenta square along the capture path, set it to queen (other pieces depending on the game). For that position I do not set magenta at any square so, winboard should leave the pawn as it is.

I have made magenta to supercede red on captures and tested it on shogi. It seems to work and is uploaded.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

OK, I uploaded a new WinBoard-Alien.zip. This implements the sweepPromotions on click-click moves, which is also made to work in Shogi (translating the selected piece not through the pieceToChar table, but as a + or = suffix). So it does away with the Shogi promotion popup.

It should also implement the activation of a sweep promotions by a magenta marker when you use a click-click move. This is so far untested. As WinBoard has a pretty good idea when to promote and to what it will not often be necessary for the user to actually use it.
Roger Brown
Posts: 782
Joined: Wed Mar 08, 2006 9:22 pm

Re: WinBoard, exotic version

Post by Roger Brown »

hgm wrote:OK, I uploaded a new WinBoard-Alien.zip. This implements the sweepPromotions on click-click moves, which is also made to work in Shogi (translating the selected piece not through the pieceToChar table, but as a + or = suffix). So it does away with the Shogi promotion popup.

It should also implement the activation of a sweep promotions by a magenta marker when you use a click-click move. This is so far untested. As WinBoard has a pretty good idea when to promote and to what it will not often be necessary for the user to actually use it.


Hello H.G.,

I know, I could book-mark the link, and I have, but would it be evil to ask if you could place the links to the TM and alien versions on web page?

Just asking.

Later.