Grand Chess

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: NebiyuAlien 1.2

Post by hgm »

Hmm, it still has some problems:

Code: Select all

[Event "Computer Chess Game"]
[Site "CHESS_LAPTOP"]
[Date "2011.03.16"]
[Round "3"]
[White "Spartacus 1.00"]
[Black "NebiyuChess_1.2"]
[Result "1-0"]
[TimeControl "40/60"]
[Variant "gothic"]
[Annotator "1. +0.37   1... -0.15"]

1. d4 {+0.37/9} Nh6 {-0.15/11 1.4} 2. Nh3 {+0.36/10 1.7} Nc6 {-0.10/11 1.3}
3. d5 {+0.31/9 1.4} Ne5 {+0.00/11 1.4} 4. Nc3 {+0.29/9 0.8} d6
{-0.15/10 1.4} 5. f3 {+0.47/8 1.0} a5 {+0.00/8 1.2} 6. g4 {+0.75/9 1.1} f5
{-0.15/11 1.5} 7. gxf5 {+1.28/10 1.4} Bxf5 {-0.15/11 1.4} 8. e4
{+1.26/9 0.9} Bd7 {-0.15/12 1.5} 9. Bg2 {+2.48/9 1.8} c5 {-0.05/9 1.1} 10.
Ng5 {+3.22/9 1.2} b5 {+0.05/9 1.2} 11. Ne2 {+3.10/9 1.2} Cf6 {-0.15/9 1.5}
12. f4 {+3.46/9 1.1} i6 {+0.15/9 1.4} 13. Ne6+ {+3.03/9 0.9} Bxe6
{+1.55/9 0.3} 14. dxe6 {+1.16/10 0.9} Axe6 {+1.25/9 1.5} 15. h4
{+2.61/10 1.5} Qd7 {+1.40/9 1.6} 16. Bh3 {+1.69/10 1.7} Nhg4 {+1.55/10 1.4}
17. Cg2 {+2.31/8 1.3} Bj6 {+1.35/9 1.2} 18. c3 {+1.75/8 1.2} Rd8
{+1.40/7 1.6} 19. Qc2 {+2.06/8 1.2} d5 {+1.55/9 1.6} 20. f5 {+2.24/9 1.5}
dxe4 {+0.10/10 1.4} 21. Bxj8 {+2.98/9 1.1} Ac4 {+3.05/9 1.2} 22. Bxg4
{+3.31/8 1.2} Bi7 {-1.95/8 1.5} 23. Bxi7 {+6.56/9 1.2} Nxg4 {-4.65/9 1.2}
24. Bf4 {+5.54/9 2.1} Qxf5 {-0.60/14 1.8} 25. Ke1 {+2.01/9 1.0} Ne5
{+0.65/13 1.6} 26. b3 {+1.85/9 1.1} Nd3+ {+2.80/14 1.4} 27. Kf1
{-0.19/11 1.6} Nxf4 {+9.60/13 1.3} 28. bxc4 {-0.61/11 2.3} Nxg2+
{+1.00/12 1.2} 29. Kxg2 {+0.03/12 4} Cg4+ {+0.95/15 1.7} 30. Kh1
{+0.02/13 4} Cxh4+ {+0.45/14 1.8} 31. Ki1 {+0.01/13 2.7} Qe5+
{+0.50/14 1.7} 32. Ng3 {-0.68/12 1.4} Qxg3+ {+4.00/16 1.6} 33. Ah2
{-0.97/13 1.9} Qg2 {+2.75/17 1.8} 34. Qxg2 {-0.76/12 0.7} Cxg2+
{+2.95/19 1.7} 35. Kh1 {-1.20/13 0.9} Cf2+ {+2.15/17 1.7} 36. Kg1
{-2.92/13 1.3} e3 {+3.90/16 1.6} 37. Rf1 {-3.10/13 1.3} Rd1 {+4.55/19 1.4}
38. Rxd1 {-3.62/13 0.8} Cxd1+ {+4.95/18 1.5} 39. Kg2 {-3.55/13 1.0} e2
{+4.95/18 1.9} 40. Rxd1 {-3.54/13 2.3} exd1=Q {+5.40/14 0.7} 41. cxb5
{-3.20/14 2.1} Qd2+ {+5.75/14 1.2} 42. Kh3 {-3.24/13 1.0} Qxc3+
{+6.20/15 1.4} 43. Ag3 {-3.80/13 1.5}
{Error: second chess program (nebiyuChess) exited unexpectedly} 1-0
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NebiyuAlien 1.2

Post by Daniel Shawul »

Ok it is hanging at the end position for some reason. The Alien version doesn't seem to have that problem though. I will fix it and get back to you.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NebiyuAlien 1.2

Post by Daniel Shawul »

Ok got it.
It was the uneven board size which caused the problem 10x8. Attack table calculation should have been done on a 10x10. Fixed it now. I will upload shortly.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Grand Chess

Post by TonyJH »

H.G.,
I saw TJchess had a rough time versus Spartacus and Nebiyu. Did it at least not lose any games on time?

Speaking of variants, if I wanted to play something like crazyhouse960, should Winboard support that with /variant=8x8+5_fischerandom ? This didn't seem to work, but that's not unexpected since no other engines play it.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NebiyuAlien 1.2

Post by Daniel Shawul »

It is uploaded. For wide boards the enpassant hash key tables were not fully initiialized ( first 8 files of orthodox chess !). That took some time to find. It is uploaded now and it should play all with no problem now.
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Grand Chess

Post by hgm »

TonyJH wrote:H.G.,
I saw TJchess had a rough time versus Spartacus and Nebiyu. Did it at least not lose any games on time?

Speaking of variants, if I wanted to play something like crazyhouse960, should Winboard support that with /variant=8x8+5_fischerandom ? This didn't seem to work, but that's not unexpected since no other engines play it.
I did not notice any problems with TJchess10x10, but I did not look at the games very carefully yet. I still have to play it against ChessV, but the latter has stillto be fixed to use the new variant name "grand".

To play Crazyhouse960, you have to use the WB command-line options

/variant=fischerandom
/holdingsSize=5
/pieceToCharTable="PNBRQ.......++++Kpnbrq.......++++k"


WinBoard will then send variant 8x8+5_fischerandom to the engine,because it detects the non-standard holdings size. The engine will have to list 8x8+5_fischerandom in its variants feature. The pieceToCharTable tells WinBoard the pieces marked with + should be used for a Pawn that has promoted to the piece 11 positions earlier, and will revert back to Pawn when captured. (With the normal pieceToCharTable for FRC promoted Pawns would be indistinguishable from the primordial piece, and not revert ("Loop Chess").

The opposite aproach, trying to modify Crazyhouse through

/variant=crazyhouse
/shuffleOpenings=true


will not work, as there is no option to force Fischer castling in variants that do not have it naturally, and /shuffleOpenings will shuffle games with Fischer and normal castling in a different way (leaving King and Rooks unshuffled in the latter case).
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

sucicide move

Post by Daniel Shawul »

I have done about 4 pieces of Ultima now. One problem is how to communcate a 'suicide' move to winboard. It understands drop moves like P@e4. There doesn't seem to be a corresponding format for representing suicide moves. I needed this when an immobilized piece wants to make a suicide for opening up attacks.
I tried same from and to squares like 'c5c5', it didn't work even if legality was off. So I guess there is always some basic move legality checking. I think it is a good idea to extend the protocol by P#c5 or other symbol to indicate suicide. I could come up with a way to trick winboard to accept a move, and move on since the engine sends a "setup" to update the board anyway. But the former is cleaner. what do you think?

2nd question is about using alien mode. Winboard understands this mode iff I do not declare them as known variants at startup. So I am letting it know the variant 'alien' only and then let user select from my combo box whichever it wants to play. If I do not set this long leaper and coordinated captures do not get updated.
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: Grand Chess

Post by TonyJH »

Thanks for the instructions. Looks like crazyhouse960 is almost working, except promoted pieces are not reverting to pawns, which eventually causes a false illegal move in some games. This is with /pieceToCharTable="PNBRQ.......++++Kpnbrq.......++++k", and I also tried /pieceToCharTable="PNBRQ.......~~~~Kpnbrq.......~~~~k" with the same results (after I read a little bit about how pieceToCharTable table works).
I also notice that new games aren't automatically re-shuffled unless I use "New Shuffle Game..." instead of "New Game..." but maybe that is intended.
Still, many games play out just fine, and FRC castling works as expected in this mode.
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Grand Chess

Post by hgm »

Oh, I was mistaken. :oops: You should indeed use ~ in stead of +. (I have been doing Shogi for too long...) When you use + a piece from the 'promoted' family (the second group of 11) will be demoted on capture not to Pawn but to its unpromoted counterpart (11 earlier in the list).

You are also right about it not working as I intended. I had a look at the WB code, and in the routine to apply the move, I was still testing directly the variant type on a Pawn promotion, and only using the promoted form of the piece (which would revert automatically) in variants bughouse and crazyhouse. This was the way I initially implemented it, before designing the more general method of programming the behavior through the pieceToCharTable. I made a new version of WB doing it as I intended, nowavailable in the http://hgm.nubati.net/WinBoard-GC.zip package.

About the shuffling: when the initial-position number in the New Shuffle Variant is set to -1, it should make a new shuffle each game. Only when you put a number >= 0 there,all games will start with the corresponding position, untill you change that number. The "Random" button is only for selecting a fixed random position. Perhaps this is a bit confusing, and there should be two buttons, "Fixed" and "Randomize", where "Fixed" does what "Random" does now, (put a random number in the number field), and "Randomize" would put a -1 there.
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Grand Chess

Post by hgm »

Another 'Oops'...

When you play variants with Fischer castling (FRC or CRC) with holdings, because of the internal representation of such castlings as KxR, castling adds a Rook to your own holdings! :shock:

I guess I should only put _opponent_ pieces that are captured into the holdings...

[edit] fixed that too now, in the Grand-Chess package.