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 »

What else other than static variables ? :) Well the thing is I had a static lift_new boolean which copies the root board to prepare for a new lift. lift_new will be true only when we recieve a "put" without a comma. In the previous case I recieved a put with a comma _and_ I finished it with click. Since we will never recieve a put without a comma that variable remained false... Will fix it soon.
Edit: It works now. But let me make sure I got other problems solved before I upload.
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 »

The new alien.ini file has the problem that is specified Ultima as variant ultima. But that is not a predefined WinBoard variant; WinBoard can only play it as variant alien. Which WB then says the engine does not support.

I could fix the problem by changing ultima to alien in the Ultima game description in alien.ini.

Some remarks about the way WB implements Shogi:

NebiyuAlien now does this:

Code: Select all

#PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
 PNBRGSL..UOITDH......Kpnbrgsl..uoitdh......k
But WinBoard does

Code: Select all

#PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
 PNBRLS...G.++++++....Kpnbrls...g.++++++....k
This indicates the promoted pieces have no letter of their own, but should be indicated (in FEN or SAN) like +B, +R etc. It is advisable to keep this piece assignment, because then it can be played with legality checking on, so that all adjudiations will work, and you will get nice SAN. WinBoard also uses specially adapted piece symbols in variant shogi for OHGD, which all look like W, because Pawn, Knight, Silver and Lance all promote to Gold.
Last edited by hgm on Sat Jul 02, 2011 2:51 pm, edited 1 time in total.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

Here is another problem. I can make the circular captures twice in different directions and winboard makes it flawlessly. But on the third one winboard made only two of the clicks and asked me to enter the next leg. In the log file nebiyu sent 4 clicks not two. I have uploaded it again so that you can try to reproduce the problem.
<000000179172> put g8,
<000000179188> lift g8
highlight 10/10/5g4/4R3c1/5g1g2/6c3/10/10/10/10
click e6,
click g4,
click i6
<000000179235> usermove i6g8,g8e6,e6g4,g4i6
<000000180875> undo
<000000182078> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000182453> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000183375> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000184125> hover g8
highlight 10/6R3/10/10/10/10/10/10/10/10
<000000184657> put g8,
<000000184672> lift g8
highlight 10/10/5g4/4R3c1/5g1g2/6c3/10/10/10/10
click e6,
click g4,
click i6
<000000184735> usermove i6g8,g8e6,e6g4,g4i6
<000000338610> undo
<000000339469> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000339828> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000340094> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000343657> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000344797> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000345657> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000346282> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000346500> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000346688> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000346891> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000347110> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000347313> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000349391> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000350203> hover g8
highlight 10/6R3/10/10/10/10/10/10/10/10
<000000351688> put g8,
<000000351703> lift g8
highlight 10/10/5g4/4R3c1/5g1g2/6c3/10/10/10/10
click e6,
click g4,
click i6
<000000351766> usermove i6g8,g8e6,e6g4,g4i6
<000000355235> undo
<000000356907> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000357922> hover g4
highlight 10/10/10/10/10/6R3/10/10/10/10
<000000358407> put g4,
<000000358422> lift g4
highlight 10/6c3/5g1g2/4R3c1/5g4/10/10/10/10/10
click e6,
click g8,
click i6
<000000358485> usermove i6g4,g4e6,e6g8,g8i6
<000000361219> undo
<000000362125> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000363282> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000364469> hover g8
highlight 10/6R3/10/10/10/10/10/10/10/10
<000000365110> put g8,
<000000365125> lift g8
highlight 10/10/5g4/4R3c1/5g1g2/6c3/10/10/10/10
click e6,
click g4,
click i6
<000000588172> lift e6
<000000589172> lift e6
<000000590110> put g4,
<000000590110> lift g4
<000000590875> lift g4
<000000591703> put i6
<000000591703> usermove i6g8,g8e6,e6g4,g4i6
<000000593625> undo
<000000595328> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000595703> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000596032> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000596250> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000597047> lift i6
highlight 10/6R3/5g1g2/4c3c1/5g1g2/6R3/10/10/10/10
<000000597578> hover g8
highlight 10/6R3/10/10/10/10/10/10/10/10
<000000598125> put g8,
<000000598141> lift g8
highlight 10/10/5g4/4R3c1/5g1g2/6c3/10/10/10/10
click e6,
click g4,
click i6
<000000598203> usermove i6g8,g8e6,e6g4,g4i6
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 »

Hmm, I seem to be able to do it as often as I like, now. After undo as wel as new. Perhaps it was some timing problem.

Btw, the Ultima Chameleon probem capturing Long Leapers also still exists.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

Try harder :) I couldn't catch the pattern yet but if you click twice on the pawn before ctrl-move, it seems to reproduce the problem on the third move. I got it 6 times already.

-------------------
Yes, I didn't work on the Ultima problem yet.
Shogi is going to be a pain too.

Edit Can you provide a FEN for the Chameleon problem ?
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 will have a look at it later. Got to go out for groceries now, because shops close early here on Saturdays.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

I have fixed the chameleon capture problem now. It works for the position you posted before but you can never be sure with chameleons.

Is there a chance you could impose the FEN from hover on top of the fen from the lift? I think this is handled better by the Winboard than the GUI. The engine sends only additional squares to be marked by green. This should be possible since you already restore the old highlight when the hovering gets out of the target square.

I don't even have to mark even target squares by red since it will already be marked red anyway. Which reminds me of whether I should mark target squares by magenta or red in case of promotion? Red worked for me so i didn't bother.

Recalculating of highlight (unless I save it somewhere) is difficult for me.

I think that if something can be done by both winboard and the engine, winboard should do it to ease the effort for future implementers.

And I don't see any reason why it shouldn't be superimposed. For all games where hover don't add green marked squares, only a red square is displayed at the target square. This gives no information (infact causes confusion as in Ultima) and also causes a little bit of flickering at least on my computer.
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, the new WinBoard-Alien.zip should now super-impose the color markers. I just removed clearing of the markers before it started reading the FEN, and moved it to the point where the lift command is sent.

You would still have to send the to-square as legal, though. (I could not apply the same trick there, because the lift command has to mark every square as legal, just in case no highlight command will be coming at all. Only when a highlight command comes, all to-squares become illegal by default. But it is hard to see if a highlight command comes in response to lift or to hover. Or in fact in response to anything at all.)

The way it works is that the empty squares indicated numerically in the color FEN are left unchanged, and any mentioned colors put as a marker, overwriting whatever might have been there before. It is possible to clear an existing marker, using T or t. (Or would it be better to make T and t preserve the existing color, and just alter the legal state?) I guess it would be safe to always highlight it as Red, because sweepPromotions cannot work on drag-drop moves anyway. Only when you would make a click-click move to a Magenta square there will be altered behavior. But you cannot hover for click-click moves, and in fact the to-square will not be visibly marked at all at the time of the to-click. (But WB will remember if it was marked as promotion from the previous lift.)

I could reproduce the ignoring of click commands after many tries. It must be some timing problem causing a recursive interrupt. I sometimes have a timing problem too when I make a very fast click for selecting a piece; the up-click can then occurr before the highlight command n response to the lift was received, and in that case the markers stay on. But perhaps it is desirable markers stay on as long as the piece is selected, and I should not clear them on an up-click on the same square. Only on the clicking of the to-square that follows.
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 forgot what position I posted, but after

1. e5 c5 2. d4 Lxf4

h6 is still marked yellow, and Cxh6 still leaves Lf4 on the board. Have I been downloading a stale version? It is a bit inconvenient I cannot see an exact version number. The size of the exe is reported as 267.264 bytes.

The problem that it does not support variant alien out-of-the-box also still exists.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

You would still have to send the to-square as legal, though. (I could not apply the same trick there, because the lift command has to mark every square as legal, just in case no highlight command will be coming at all. Only when a highlight command comes, all to-squares become illegal by default. But it is hard to see if a highlight command comes in response to lift or to hover. Or in fact in response to anything at all.)
I tried it and it works well. I used T to indicate legal so it gets blank on hover. I think I like it like that because it lets the user know a hover is happening as you pointed out. I could always make it a red but sometimes it could also be magenta when a promotion can take place. I tried it with red before using the old version and it seems it will remember that it was magenta even though I overwrote it with red. I hope it will give promotion options with T too ?
It is possible to clear an existing marker, using T or t. (Or would it be better to make T and t preserve the existing color, and just alter the legal state?)
I think preserving will work too but to differentiate the hove from the original highlight may be a rectangular frame around the target square will help ? But it is upto you, the blank T is enough for me.

I think now only shogi is left and the other is feature = variant issue. Are you going to make the buffer larger so that I can send all the games from alien.ini ? The games I have right now if sent twice crash winboard, and winboard do not append two feature variants sent separately. What I would like to do is register all the games , those accepted will be in the variants menu, the rest would have to be selected from the combox and played as alien games.