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 »

Hello Rein,
Poor me, here I am thinking you were just a regular user ;) Welcome to this forum! I am sure your checkers engine would beat the hell out of Nebiyu. If you tell your friends too , may be we can arrange tournaments on winboard some day.
cheers
User avatar
hgm
Posts: 27802
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

Daniel Shawul wrote:Are you saiying I should merge the two FENs for the highlighting when reciveing a hover ?
In the version I just uploaded the only thing that is essential is that the to-square in the hover-highlight remains marked as legal. (Either by T or a capitalized color.) It would not suppress second or later hover events in the new version when you didn't, but the move would be refused.

Note I edited my previous post, to add a remark about variant alien!

WinBoard did not send any comma on lift commands. (The state of Ctrl is only looked at when the user puts down the piece, so he could press the Ctrl between lifting and putting, making the state during lift meaningless.)

If you really need the comma in put, I will keep it. But if you find a way to do without it, I would prefer to remove it from the protocol.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

In the version I just uploaded the only thing that is essential is that the to-square in the hover-highlight remains marked as legal. (Either by T or a capitalized color.) It would not suppress second or later hover events in the new version when you didn't, but the move would be refused.

Note I edited my previous post, to add a remark about variant alien!

WinBoard did not send any comma on lift commands. (The state of Ctrl is only looked at when the user puts down the piece, so he could press the Ctrl between lifting and putting, making the state during lift meaningless.)

If you really need the comma in put, I will keep it. But if you find a way to do without it, I would prefer to remove it from the protocol.
I just tested it and it works as intended. I can move in and move out mutliple times.

About alien branch, I just tested it and it still doesn't work with the new version. It can only play standard chess... Maybe it is a problem with new Nebiyu version, but you can also check for yourself with the new version I uploaded earlier.


I will think of a way to remove avoid the use of the comma, and let you know if I find one. I agree redunduncy will cause confusion.

Winboard debug : I only see 8x8 board even though I selected courier

10500 >second: option variant=12x8+0_courier
Reset(1, 1) from gameMode 0
recognized 'alien' (-1) as variant alien
GameEnds(0, (null), 2)
12156 >first : force
shuffleOpenings = 0
TC string = ':40/300'
mps=40 tc=300000 inc=0
TC string = ':40/300'
mps=40 tc=300000 inc=0
12172 >first : new
random
12172 >first : variant alien
12172 >first : level 40 5 0
12172 >first : post
12172 >first : hard
12172 >first : easy
12187 <first : setup rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w - - 0 1
12187 <first : setup (PNBR.FE..WM..........Kpnbr.fe..wm..........k) 12x8+0 rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w - - 0 1
Reset(1, 1) from gameMode 0
recognized 'alien' (-1) as variant alien
GameEnds(0, (null), 2)
13328 >first : force
shuffleOpenings = 0
TC string = ':40/300'
mps=40 tc=300000 inc=0
TC string = ':40/300'
mps=40 tc=300000 inc=0
13328 >first : new
random
13328 >first : variant alien
13328 >first : level 40 5 0
13328 >first : post
13328 >first : hard
13328 >first : easy
13359 <first : setup rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w - - 0 1
13359 <first : setup (PNBR.FE..WM..........Kpnbr.fe..wm..........k) 12x8+0 rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w - - 0 1
Reset(1, 1) from gameMode 0
recognized 'alien' (-1) as variant alien
GameEnds(0, (null), 2)
14203 >first : force
shuffleOpenings = 0
TC string = ':40/300'
mps=40 tc=300000 inc=0
TC string = ':40/300'
mps=40 tc=300000 inc=0
14203 >first : new
random
14203 >first : variant alien
14203 >first : level 40 5 0
14203 >first : post
14203 >first : hard
14203 >first : easy
14234 <first : setup rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w - - 0 1
14234 <first : setup (PNBR.FE..WM..........Kpnbr.fe..wm..........k) 12x8+0 rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w - - 0 1
GameEnds(28, xboard exit, 2)
15015 >first : result * {xboard exit}
15015 >first : force
15015 >first : quit
15015 >second: quit
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

All the weirdest alien captures are highlighted on hover now.
Namely:
  • Withdrawer
    Advancer
    Coordinator
    Pincor
    Atomic capture
I tested some of the pattern on a fake normal chess. I can't wait to test it
on the real ultima or atomic chess.

I thought about the comma issue again, but there doesn't seem to be a way to identify if a move has ended. Even though a lift is sent right after a put, I have to track if a usermove has been sent or not. It could also be a redo/undo or anything else. I think we should keep it in there.
User avatar
hgm
Posts: 27802
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

I think the problem is that Nebiyu sends two setup commands. The version I have did not do that. And only the second has the pieceToCharTable, so that the first cannot be properly parsed. The second setup is probably ignored, because the first was already received.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

Ok. I am sending the two setups one for the 'new' command and the other 'variant'. With only the second one it works now. I tested the highlighting in alien mode and it works but I am not getting hover commands. I get that only in orthodox chess..
User avatar
hgm
Posts: 27802
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

You should not send a setup in response to new. Formally, after new the engine should be in variant normal, only able to understand orthodox pieces and on an 8x8 board. Sending an unorthodox FEN without pieceToChar for a non-8x8 board will not be understood. I guess that in this case the reception of the first setup makes the second setup, that has this info, being ignored, because WB thinks at that point it is playing from a setup position. (And when the user has set up a position,you don't want the engine to replace it by the default opening position.)

I guess it is a bit illogical to consider the position setup if the setup actually failed because of a faulty FEN. Strictly speaking it should popup an error box on getting the bad FEN. But it is not entirely clear how exactly to handle errors here. E.g. if the FEN is bad, should it also ignore pieceToChar and board-size info? And engines are not supposed to send bad FENs. It would be very difficult to protect yourself against malfunctioning engines in variant alien, because so much power is delegated to the engine. So I did not even try.

The hover command will only be sent when you enter a square marked R after lift (i.e. red and legal). Is this the case in variants where it does not work now? There is no direct testing of the variant in any of the lift / put / hover code. Only if legality checking, and Highlight Dragging is on.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

I got it now. I got the hovers for atomic chess when the destination square is had a piece. That square will be redened so I got hovers and it works perfectly. All the surrounding squares with opponent pieces got marked.

But for pincer caps and others the square was not reddened because the destination square is yellow. I will change that to Red and everything should be fine.
Edit Yes it works now for pincers to. I made sure that when the move is a capture the destination square is reddened despite being empty. Let me do some more tests with other games and I will upload a working version.

Clicking also works. But it seems that you can accidentally click a piece and it will get moved. I tried it with shogi. Is there a way to see only the highligthing say by right clicking just to check where it moves ?
User avatar
hgm
Posts: 27802
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

The idea was that on lifting all legal to-squares would be marked, red for captures, yellow for non-captures. The user can then see where he has to move to capture something (even if that square is empty), and hover the piece there to see what he will capture. If pincer / coordinator / withdrawer moves would always be yellow, they would have no idea where to hover,and would have to try everything. So I assumed capture to-squares would always be distinguishable, and only send the hover command when you get above one, to not needlessly disturb the engine when you hover over squares that will not capture anything.

I think the point you raise is an intrinsic disadvantage of one-click moving. It is really only for advanced users; for beginners that still have to learn how pieces move, it is really more of hindrance than a help. The idea is that the latter simply switch one-click moving off, and all click commands would be ignored by WinBoard, so pieces will not suddenly jump to their destination when they pick them up merely to learn what they could do with them. (This should still be implemented; currently the only restriction for accepting click commands is that legality testing should be off.)

There are not many signals left, unless you would accept to use the middle mouse button. Right-clicks cause walking of the last-received PV, or popup of a drop menu. Shift+left-click starts a new variation, Ctrl+left-click is for partial moves.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

Ok I have made all captures to be distinguishable by R. It is very very helpful in ultima and looks very cool. I need to color Immobilizer, even though not a capture. Also with yellow & red I can have two consecuative yellow and reds in some leaping caputures. So we are in a state where we need more colors now. I know that takes time so I have uploaded an exe of only NebiyuAlien edition now.

I think I got the checkers coloring wrong compared to the current agreed method. I have to mark the destination squares for multi-leg captures with red (R for the first leg destination and r for the rest). Currently I put y for the captures on a lift. I can do that on a hover I think but maybe it is better as it is?

Edit: Winboard doesn't automatically open up holding space for shogi even though i send a setup with the board size and holding 9x9+8. I have to open it up manually