Bored with orthodox Chess?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Bored with orthodox Chess?

Post by hgm »

Still some minor imperfections. I am still using the Fairy-Max version that miscounts the Kings after a promotion to King, leading to some false mate and illegal-move claims from Fairy-Max. But Oberon 0.02 has some glitches too:

Code: Select all

[Event "Computer Chess Game"]
[Site "SCHAAKPC"]
[Date "2011.01.10"]
[Round "1.1"]
[White "Fairy-Max  4.8Q"]
[Black "Oberon"]
[Result "0-1"]
[TimeControl "40/300"]
[Variant "spartan"]
[Number "37"]
[Annotator "1. +0.69   1... +0.06"]

1. Nc3 {+0.69/8 15} Cd6 {+0.06/10 8} 2. d4 {+0.79/8 14} Hef6 {+0.14/10 13}
3. e3 {+0.82/8 13} Lc6 {+0.04/10 8} 4. Nf3 {+0.72/8 13} We7 {+0.16/9 6} 5.
Ne5 {+0.66/8 12} Kg8 {+0.14/9 14} 6. Bc4 {+0.56/8 12} Hde6 {+0.12/9 6} 7.
Nxc6 {+0.42/10 11} Cxc6 {+0.31/9 5} 8. Nd5 {+0.38/9 10} Wg6 {+0.24/10 6} 9.
Bd3 {+0.42/9 10} Hef5 {+0.04/10 4} 10. O-O {+0.30/7 9} Cd6 {+0.18/10 8} 11.
Qf3 {+0.55/9 9} Cee6 {+0.25/9 5} 12. Bd2 {+0.42/8 8} Hge5 {+0.18/9 6} 13.
Nb4 {+0.55/7 8} Lg7 {+0.34/9 6} 14. d5 {+0.34/7 8} Ce7 {+0.36/10 4} 15. c4
{+0.33/7 7} Hc6 {+0.29/9 4} 16. Qg3 {+0.50/6 7} Wf8 {+0.30/8 4} 17. h4
{+0.63/6 7} Wd7 {+0.60/7 8} 18. Bc3 {+0.64/7 6} Wc5 {+0.55/7 5} 19. Rad1
{+0.51/6 6} Hh5 {+0.46/7 6} 20. Nc2 {+0.50/6 6} He4 {+0.33/7 4} 21. Bb4
{+0.09/7 5} Gxb4 {+0.30/9 5} 22. Nxb4 {+0.48/9 5} Wxb4 {+0.27/8 5} 23. a3
{+0.34/8 5} Wa6 {+0.34/8 10} 24. Qg4 {+0.38/8 5} Hf5 {+0.36/7 7} 25. b4
{+0.81/9 4} Wb7 {+0.40/8 10} 26. Qxh5 {+0.79/10 4} Lf7 {+0.41/8 5} 27. Qe2
{+0.82/9 4} Wa8 {+0.51/7 11} 28. b5 {+0.87/9 4} Wb6 {+0.49/8 5} 29. Rd2
{+1.05/8 4} Wc5 {+0.45/8 10} 30. bxc6 {+0.98/9 3} Hxc6 {+0.34/9 10} 31. Ra2
{+0.60/9 3} Lg6 {+0.24/9 9} 32. Re1 {+0.97/9 3} Hxe3 {+0.22/9 7} 33. fxe3
{+0.89/9 2.9} Le4 {+0.21/8 7} 34. Bb1 {+0.95/10 2.8} Kf8 {+0.18/7 7} 35. h5
{+1.15/9 2.6} Ke8 {+0.42/8 16} 36. g4 {+1.56/9 2.5} Cf7 {+0.06/7 5} 37.
gxf5 {+1.59/9 2.4} Hxf5 {+0.01/7 6} 38. h6 {+1.71/9 2.3} Wd7 {+0.21/7 2.9}
39. Bxe4 {+1.98/9 2.1} Hxe4 {+0.01/8 3} 40. Qh2 {+1.70/9 2.0} Wf8
{+0.08/7 5} 41. Rg2 {+2.58/10 17} Cd8 {-1.12/11 6} 42. dxc6 {+2.47/10 16}
Wh7 {-1.16/10 5} 43. Qe5 {+2.79/9 15} Wf6 {+0.98/10 5} 44. Qxf6
{+2.52/10 14} Cxf6 {+0.09/10 8} 45. h7 {+1.70/12 14} Ch6 {+0.03/10 5} 46.
Rg7 {+1.79/12 13} Hc5 {+0.01/10 10} 47. Kf2 {+1.78/12 12} Hxc4 {+0.22/10 9}
48. Rh1 {+2.03/11 12} Ch8 {+0.16/10 6} 49. c7 {+1.60/11 11} Cdf8
{+0.38/10 11} 50. Rd1 {+1.43/12 11} Hb3 {+0.39/10 5} 51. Kf3 {+0.87/12 10}
Hxe3 {+0.42/10 10} 52. Kxe3 {+0.10/12 10} Ha2 {+0.56/9 11} 53. Rc1
{+0.02/11 9} Kf7 {+0.70/10 12} 54. Rg2 {+0.72/12 9} Hb1=K {+0.78/10 5} 55.
Rxb1 {-2.17/11 8} Kxc7 {+0.82/9 4} 56. Rc2 {-2.11/10 8} Kd6 {+0.79/9 5} 57.
Ke4 {+79.95/11 7} Cxh7 {+1.10/9 0.1} 58. Rb6 {+79.98/28 7} Kfe6
{+1.13/10 6}
{False illegal-move claim} 0-1
Fairy-Max thinks black is not allowed to leave Kd6 in check, because of an earlier promotion to King by Oberon:

2k2c1c/2P2k1P/8/5h2/8/P3K3/h5R1/2R5 b - - 4 54

(with black R = Captain)
[d]2k2r1r/2P2k1P/8/5p2/8/P3K3/p5R1/2R5 b - - 4 54

Oberon had played Hb1=K here! But this is not allowed in Spartan Chess, as black already has two Kings. WinBoard of course is also at fault by allowing this move.

A very weird one:

Code: Select all

[Event "Computer Chess Game"]
[Site "SCHAAKPC"]
[Date "2011.01.09"]
[Round "1.1"]
[White "Fairy-Max  4.8Q"]
[Black "Oberon"]
[Result "0-1"]
[TimeControl "40/300"]
[Variant "spartan"]
[Number "9"]
[Annotator "1. +0.70   1... +0.06"]

1. Nc3 {+0.70/8 15} Cd6 {+0.06/10 11} 2. e4 {+0.88/8 14} Hef6 {+0.26/10 6}
3. d4 {+0.57/7 13} Lc6 {+0.24/9 9} 4. d5 {+0.40/10 13} Lb6 {+0.44/9 26} 5.
e5 {+0.27/9 12} Cdd8 {+0.23/9 11} 6. e6 {+0.31/8 12} Hdf5 {+0.27/9 6} 7.
Na4 {+0.07/8 11} Hd6 {+0.16/10 5} 8. Nxb6 {+0.16/8 10} Hxb6 {+0.39/10 17}
9. c4 {+0.00/9 10} Hxd5 {+0.24/10 7} 10. cxd5 {+0.08/9 9} Cd6 {+0.32/9 5}
11. Be3 {+0.21/8 9} We7 {+0.21/9 9} 12. Bc4 {+0.20/8 8} Gc7 {+0.12/9 4} 13.
Rc1 {+0.03/8 8} He4 {+0.08/9 5} 14. Bb3 {+0.06/9 8} Hxe3 {+0.46/10 7} 15.
Rxc7 {+0.03/10 7} Kxc7 {+0.38/9 18} 16. Nf3 {+0.21/9 7} Kg8 {+0.36/8 9} 17.
fxe3 {+0.02/9 7} Wg6 {+0.35/9 7} 18. O-O {+0.03/9 6} Kc8 {+0.37/9 2.8} 19.
Ng5 {+0.08/8 6} Cf8 {+0.18/9 4} 20. Bc2 {+0.06/8 6} Hf5 {+0.11/9 4} 21. Ne4
{+0.24/8 5} We7 {+0.19/9 2.9} 22. Nxd6 {+0.29/10 5} Wxd6 {+0.21/9 16} 23.
Qd4 {+0.33/10 5} Kb7 {+0.20/9 14} 24. g4 {+0.25/9 5} Wb5 {+0.03/9 2.9} 25.
Qb4 {+0.40/9 4} Wa6 {+0.01/9 2.7} 26. Qe1 {+0.14/9 4} Wc4 {+0.08/9 4} 27.
e4 {+0.31/8 4} Wxb2 {+0.08/8 7} 28. Qb4 {+0.34/10 4} We5 {+0.06/8 7} 29. e7
{+0.30/9 4} Ce8 {+0.29/9 2.3} 30. gxf5 {+0.44/8 3} Wg4 {+0.88/9 2.6} 31. d6
{+1.04/8 3} Wh3+ {+7.17/9 5} 32. Kh1 {+1.68/10 3} Hfe5 {+5.09/9 2.7} 33. d7
{+5.88/11 0.1} Lf6 {+99.99/1}
{Black mates} 0-1
This is a false claim, and it must be due to Oberon, as this reports the mate score. (I forgot to switch claim verification on.) There is nohing that looks like mate in the final position:

4c1k1/hk1PPhh1/1h3l2/4hP2/1Q2P3/7w/P1B4P/5R1K w - - 1 34

(with black Q = W)
[d]4r1k1/pk1PPpp1/1p3b2/4pP2/1Q2P3/7q/P1B4P/5R1K w - - 1 34
(after Lh8-f6)
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

Oh, I found another one:

7k/hhk3gP/2hc1l1h/4hB2/3P4/8/PP2PP1B/1R3R1K w - - 3 26

(This time with Q = General)
[d]7k/ppk3qP/2pr1b1p/4pB2/3P4/8/PP2PP1B/1R3R1K w - - 3 26

Again Oberon claims mate After playing Lf6 (Lh4-f6, this time). It seems it thinks a Lieutenant at h6 can caoture to h1? :idea:
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

It seems Fairy-Max sometimes does illegal King moves, stepping a black King two squares sideways, because it thinks it can castle! :lol: :lol: :lol:

This is due to an error in the game definition file, where I use the same King for black and white. The black King should not have castling amongst its moves, of course, so I should define separate Kings for each side. Because Fairy-Max' castling tests do not work when the King does not castle to the usual places (1 or 2 squares from the corner), it sometimes even tried to capture something by such a phoney castling! :shock:
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Bored with orthodox Chess?

Post by PK »

It's great to have these test matches running.

I've uploaded Oberon with f6-h1 bug fixed and some speed optimizations. Third king is still on my to-do list. By the way, it's refreshing on its own right to deal with low-level stuff once again.
User avatar
George Tsavdaris
Posts: 1627
Joined: Thu Mar 09, 2006 12:35 pm

Re: Bored with orthodox Chess?

Post by George Tsavdaris »

hgm wrote: [d]2k2r1r/2P2k1P/8/5p2/8/P3K3/p5R1/2R5 b - - 4 54

Oberon had played Hb1=K here! But this is not allowed in Spartan Chess, as black already has two Kings. WinBoard of course is also at fault by allowing this move.
Hi can you please upload a fixed Winboard for this?
And when the tournament will start?
After his son's birth they've asked him:
"Is it a boy or girl?"
YES! He replied.....
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

I have not fixed it yet. And it does not really seem high priority once it is fixed in the engine. Surely it must be bad to promote to a third King, if the official rules specify you cannot leave any 2 in check. (Fairy-Max implements it actually that way. My new engine I am now convertng to Spartan would crash from it, though, as it has only two King slots in its piece list.) Oberon did it here only because he sees that the promoted piece will be taken no matter what, and apparently choses randomly.
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

I never realized this, but did you know that WinBoard does not test legality of the chosen promotion piece at all? It has never done that, even with legality testing on. It just tests if the Pawn move is legal (i.e. does not leave you in check), and then allows you to pick any piece.

E.g. startup WinBoard 4.2.7 in game-viewer mode, and play

1.h4 a5 2.h5 a4 3.h6 a3 4.hxg7 axb2

Now if you play g7xh8 with the mouse, you get a promotion popup, and 'King' is not on the menu. But if in stead you type g7h8k, it dutifully promotes to King! :lol:

With an engine loaded, (even in edit-game mode), the engine is likely to reject the move then, of course.

In my versions the only thing that is checked is if the requested piece exists in the variant, as specified by the pieceToCharTable. Of necessity, because when someone would specify 'g7h8x', when WB does not have the slightest idea what 'x' means, it would not know what to do. So such moves are rejected even with legality testing off, not because they are illegal, but because they are invalid moves (like off-board, etc.). Pawn as promotion piece is not accepted by WB 4.2.7 because the parser there only accepts the suffixes NBRQK, and leads to a 'could not parse move' error message. (K is included because in suicide / giveaway you can promote to King). But to parse general variants I had to expand that to A-Z. So my versions can also 'promote' to Pawn.

So this is a much more general problem than just Spartan Chess. Normal Chess engines could cheat by playing promotion to King, and if their opponent objects, WB would forfeit it for 'False illegal-move claim'! :shock:
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

George Tsavdaris wrote:Hi can you please upload a fixed Winboard for this?
And when the tournament will start?
Considerng the pervasive nature of the problem I decided to fix it after all. The current beta at http://hgm.nubati.net/WinBoard-4.5.beta.zip will enforce strict promotion rules (when legality testing is on):

* no promotion to Pawn ever
* promotion to King only in Suicide / Giveaway or
* promotion to black King in Spartan only when you have less than 2 Kings
* no pomotion to black Lance in Spartan

As to the tourney, I am not sure yet. It seems we can have more or better engines by waiting a little more:

* ChessV and Oberon seem to have their last bugs weeded out now,and are runnnig ' final' test games to mae sreofit.
* I just fixed micro-Max' treatment of an opponent promotion to King (it never does it itself) and phantom castlings, but it still has to be tested.
* Catalyst does still have problems with King promotion, but Richard is not backto fix them before the end of the week.
* Gregory might still want to convert Quadrox, and it is sorely needed, because:
* My 'secret weapon' (a conversion of the new normal Chess engine I am building) seems to play Spartan quite well now, but it is hardly tested.
* Daniel Shawul is still working on something, and I have no idea what the status of that is.
Last edited by hgm on Tue Jan 11, 2011 4:00 pm, edited 1 time in total.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

perft

Post by Daniel Shawul »

Here is my perft 6 at the start position [leaf nodes only]. It probably has tons of bugs
so I need someone to post their result.

Code: Select all

Welcome to Nebiyu
white>d

            a b c d e f g h
            * * * * * * * * * * * * * * * *
            * * * * * * * * * * * * * * * *
            * * * * * * * * * * * * * * * *
          8 L G k C C k W L * * * * * * * * 8
          7 H H H H H H H H * * * * * * * * 7
          6 . . . . . . . . * * * * * * * * 6
          5 . . . . . . . . * * * * * * * * 5
          4 . . . . . . . . * * * * * * * * 4
          3 . . . . . . . . * * * * * * * * 3
          2 P P P P P P P P * * * * * * * * 2
          1 R N B Q K B N R * * * * * * * * 1
            * * * * * * * * * * * * * * * *
            * * * * * * * * * * * * * * * *
            * * * * * * * * * * * * * * * *
            a b c d e f g h

        LGkCCkWL/HHHHHHHH/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ - 0 1

white>perft 1

nodes 20
time 0.00 sec
white>perft 2
....................
nodes 640
time 0.00 sec
white>perft 3
....................
nodes 14244
time 0.01 sec
white>perft 4
....................
nodes 473282
time 0.20 sec
white>perft 5
....................
nodes 11712515
time 3.65 sec
white>perft 6
....................
nodes 406299459
time 112.95 sec
white>

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

Re: perft

Post by hgm »

Oh wow! I was just mentioning your name during editing of my posting, and when I submit, I find your posting. Like a genie to grant wishes! :lol:

None of my engines perfts, actually. I will see if I can convert one to do it. Fairy-Max would be a very slow perfter, because it relies on King capture in the next ply to find a move is illegal. So you basically have to do 1 ply of pseudo-legal moves on top of your perft. OTOH, it does many variants than any then engine I have, so it might be useful anyway.

It does not do under-promotions, however. But for the initial position that wold not be a problem. My new engine still does not do under promotions yet anyway.

I' ll be back... 8-)