Ultima

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Re: Ultima

Post by Daniel Shawul »

I think it is becoming more and more bug free now. A clean game with no tree explosions. Let me know of what symbol to use chameleon 'X' so that I can upload with all these fixes.

Code: Select all

[Event "Computer Chess Game"]
[Site "CEE-3624-AB52"]
[Date "2011.03.22"]
[Round "-"]
[White "NebiyuAlien_1.2"]
[Black "NebiyuAlien_1.2"]
[Result "1-0"]
[TimeControl "40/120"]
[Variant "alien"]
[FEN "3wkgl1/Lpgp4/c2p4/PP3pp1/1P2p1Pi/7p/3PPPP1/I1GKWG1C w - g6 0 1"]
[SetUp "1"]

{--------------
. . . w k g l .
L p g p . . . .
c . . p . . . .
P P . . . p p .
. P . . p . P i
. . . . . . . p
. . . P P P P .
I . G K W G . C
white to play
--------------}
1. Pbb4 {+0.05/10} Pcc6 {-0.15/11 2.8} 2. Lb3 {+0.15/11 2.3} Ld6
{-0.05/10 2.7} 3. Pgg4 {+0.10/10 2.6} Pe4 {-0.15/9 2.2} 4. Paa4
{+0.15/9 2.8} Pff5 {-0.15/9 2.8} 5. Le3 {+0.20/9 2.9} Pbb5 {-0.15/9 2.9} 6.
Pg2 {+0.35/9 2.8} Ph3 {-0.10/8 2.9} 7. Lh2 {-0.15/8 2.9} Ih4 {+0.10/8 2.9}
8. Lc7 {-0.10/6 4} Pb7 {+0.00/10 2.9} 9. Paa5 {-0.15/7 2.9} Ca6
{+0.20/8 2.2} 10. La7 {-0.30/8 6} Gc7 {+0.45/8 3} 11. Pcc5 {+0.10/9 2.2}
Pd6 {+0.05/8 6} 12. Pb5 {-0.05/9 2.8} Pg5 {+0.15/10 2.9} 13. Lc5
{-0.25/9 2.3} Cc6 {+0.35/10 2.9} 14. Pdd4 {-0.35/10 2.9} Pff4 {+0.40/9 2.8}
15. Kd2 {-0.30/9 2.2} Pge5 {+0.25/9 2.6} 16. Ke3 {-0.20/10 2.3} Ld5
{+0.35/10 2.9} 17. Gd1 {-0.25/9 5} Ph2 {+0.25/8 2.6} 18. Gd3 {-0.40/9 2.8}
Gf5 {+0.50/10 2.5} 19. Ic3 {-0.45/11 2.7} Ig4 {+0.40/11 2.9} 20. Wd2
{-0.45/11 2.8} Wf6 {+0.40/10 2.4} 21. Pff3 {+0.00/9 2.3} Wg5 {+0.00/9 10}
22. Ga1 {+0.95/10 2.7} Ih4 {-0.80/9 2.5} 23. Pfh3 {+0.90/10 2.9} Pg4
{-0.90/9 2.6} 24. Lb6 {+0.90/9 2.3} Gd8 {-0.80/10 2.6} 25. Kf2
{+0.90/9 2.9} Lf7 {-0.70/8 2.6} 26. Pg3 {+1.00/9 5} Ped5 {-0.45/8 2.4} 27.
Cd1 {+0.95/9 2.9} Pa7 {-0.95/9 2.5} 28. La6 {+0.85/9 2.8} Gfe6
{-0.75/10 2.5} 29. Gf3 {+1.30/9 2.8} We5 {-1.00/9 2.1} 30. Wd3
{+1.00/10 2.8} Wh8 {-1.00/9 2.7} 31. Wd4 {+1.30/10 2.9} Lf6 {-1.20/9 2.8}
32. Gb2 {+1.40/10 2.8} Pee5 {-1.45/8 3} 33. Cc2 {+1.30/10 2.8} Lg6
{-1.50/10 2.7} 34. Wd3 {+1.45/10 2.9} Wf6 {-1.45/9 2.7} 35. Id4
{+1.45/9 2.6} Pc7 {-1.35/10 2.1} 36. Lb7 {+1.30/9 3} Pd5 {-1.35/11 2.8} 37.
Pe4 {+1.20/10 3} Cc5 {-1.50/10 2.8} 38. Kg2 {+1.80/9 2.4} Ga8
{-1.85/11 2.3} 39. La6 {+1.60/11 2.6} Lf5 {-1.50/11 3} 40. Gfd1
{+2.35/10 4} Pg7 {-3.00/9 3} 41. Gh5 {+3.75/11 2.5} Ph7 {-3.80/10 2.6} 42.
Kh1 {+4.40/12 2.6} Lf2 {-4.60/11 2.4} 43. Ca4 {+4.90/12 2.9} La2
{-4.95/13 2.5} 44. Wc4 {+5.05/11 2.8} Lf2 {-4.90/10 2.8} 45. Pg2
{+6.20/11 2.5} Lc2 {-6.30/9 3} 46. Id2 {+6.90/12 2.9} Cd4 {-6.90/12 5} 47.
Pb2 {+6.80/10 0.6} Cf4 {-6.95/11 2.3} 48. Wb3 {+7.00/11 2.8} Kd8
{-7.00/10 2.5} 49. Ic2 {+7.75/12 3} Cg5 {-8.15/9 2.8} 50. We3 {+8.50/9 2.3}
Ph6 {-8.40/9 2.2} 51. If5 {+10.00/9 3} Pc4 {-11.40/10 15} 52. Wd4
{+10.45/8 3} Gc8 {-11.30/8 2.9} 53. Wf4 {+12.50/10 2.9} Kc7 {-13.35/9 2.6}
54. Pd5 {+15.15/10 3} Ph7 {-15.50/9 2.0} 55. We5 {+16.10/12 3} Kb7
{-16.60/12 2.4} 56. Ld6 {+17.35/10 3} Pe7 {-17.10/9 2.7} 57. Ge8
{+20.50/10 3} Ka6 {-21.45/10 2.6} 58. Ph5 {+21.95/13 3} Gc4 {-22.05/12 2.6}
59. We2 {+21.85/11 3}
{Black resigns} 1-0

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

Re: Ultima

Post by hgm »

Can't you switch off null move automatically, for the side that has too little material? I see that it can be a problem to judge what is "too little material" in a general variant engine, but I think you can safely assume that bare King fits the bill...

I noted that Nebiyu in Grand Chess seemed extremely allergic to checks. It really keeps its King surrounded by pieces all the time, in an almost paranoic way. This happens to work very well in Grand Chess. At least against Spartacus, which is extremely careless exposing its King to check.

I suspect that this is an effect of the way you treat any QS check as mate. But I also suspect it only works because you reach so much higher depth than Spartacus. Given that depth difference, the results of Nebiyu against Spartacus are actually quite disappointing.

So I wonder if this is really a good search strategy. Note that there is a third possibility, next to generating non-capture evasions or simply considering it mate if there are none: you can ignore the check and stand pat. This seems the most realistic: not many checks at the tree leaves are actually mates. So simply assuming there is an evasion is probably right 99% of the time, while assuming it is mate is only right 1% of the time.

Even if you see that considering all checks mate performs better (because of inducing paranoic implicit King Safety) in an engine with poor King Safety eval, it would not mean it cannot be far better to generate the evasions (or just stand pat) in an engine with realistic explicit King-Safety eval.

Btw, in micro-Max (which does the stand-pat, as it can detect in-check only at d>=1, where it tries null move), I found that check extension in general had a negative impact in the end-game. This does not sound implausible: in many end-games checking is simply a waste of time, and the way to progress is cutting the King off. So with check extension you are mainly searching irrelevant lines, at the expense of the good stuff.
User avatar
hgm
Posts: 28388
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Ultima

Post by hgm »

Daniel Shawul wrote:I think it is becoming more and more bug free now. A clean game with no tree explosions. Let me know of what symbol to use chameleon 'X' so that I can upload with all these fixes.
Use 'X'. I am pretty sure it is a WInBoard problem that it doesn't work, and I rather fix the problem there than being forced to use non-standard piece names. I think there is code in the WB FEN reader that considers 'x' equivalent to '10' in a FEN. This was a now obsolete XFEN standard, and I think I can safely remove that.

I will upload a corrected WB version soon, if I can test it on Nebiyu.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Ultima

Post by Daniel Shawul »

Ok all the changes are incorporated. Also by default qsearch check evasions are on, and null moving only when a side has a piece(no pawns). Now it should not show fluctuating scores.
https://sites.google.com/site/dshawul/N ... ects=0&d=1
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Ultima

Post by Daniel Shawul »

You put it in words I can never do ! Yes 'paranoic king safety' that is what I wanted to tell all along. And it works very well at least until I start adding king safety. Especially it scores better in tactical in tactical test suites. I actually discovered this 'bug' after I got desperate and decompiled Nebiyu16_xx to see what it does. It was consistentily beating it 70-30%. Maybe that has changed since then, I have found another bug with history tables that version 16_xx never had.

I also tried standing pat all the time like in TSCP, but that was very bad. It looses all sense of detecting mates. The one without the proper evasions usually wins crushing the others in the first 20 moves! So it is not only against spartacus. But surely it will loose this edge when I start adding proper king safety (i.e if I ever do).

I should also add that NPS drops by 20% if I add proper evasions. This is much like adding checks in qsearch. So it has two disadvantages.

Anyway for this test we are doing in the endgame it is really bad, and I took it out now. Any big score fluctuations should be a bug from now on.
User avatar
hgm
Posts: 28388
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Ultima

Post by hgm »

OK, the version now at http://hgm.nubati.net/WinBoard-4.5.beta.zip does not seem to have any problems with the C/X notation.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Ultima

Post by Daniel Shawul »

It seems to have the same problem. Starting position is orthodox chess's.
I have the old one ulitima.ini with

Code: Select all

/fontPieceToCharTable="PLXCWIM....C.L.WX.PKplxcwim....c.l.wx.pk"
Can you modify that without jumping dots (all 44 or so characters) ?
User avatar
hgm
Posts: 28388
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Ultima

Post by hgm »

Then either I must have made an upload error, or you must be downloading a cached version. How many bytes is your winboard.exe?

Mine is 1,279,488, made 20:21:45 today.

[Edit] It seems I made an upload error. The good version should be there now.
Daniel Shawul
Posts: 4186
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Ultima

Post by Daniel Shawul »

Oops mine is different. 1 282 and 3:30 pm...
I was afraid that might be the case since it was downloading instantaneously but then I deleted all downloaded files.. Let me clear the cache and try again.

Edit: It works now

Code: Select all

[Event "Computer Chess Game"]
[Site "CEE-3624-AB52"]
[Date "2011.03.22"]
[Round "-"]
[White "NebiyuAlien_1.2"]
[Black "NebiyuAlien_1.2"]
[Result "1-0"]
[TimeControl "40/120"]
[Variant "alien"]
[FEN "dlcwkcli/1p1pp1pp/2p5/4pp2/1P4P1/1L3D2/P1PPPP1P/I1CKWCL1 w - f6 0 1"]
[SetUp "1"]

{--------------
d l c w k c l i
. p . p p . p p
. . p . . . . .
. . . . p p . .
. P . . . . P .
. L . . . D . .
P . P P P P . P
I . C K W C L .
white to play
--------------}
1. Pbb4 {+0.10/10} Pcc6 {-0.10/11 2.9} 2. Lb3 {+0.15/11 2.6} Pa5
{-0.10/9 2.9} 3. Pgg4 {+0.25/10 2.3} Pae5 {-0.20/10 2.9} 4. Df3
{+0.20/11 2.9} Pff5 {-0.25/10 2.8} 5. Ic3 {+0.10/10 2.9} Da4 {-0.15/10 2.6}
6. Ic4 {+0.10/9 3} Le6 {-0.05/10 2.9} 7. Lg3 {+0.10/9 2.9} Lbd6
{-0.10/9 2.9} 8. Pa3 {-0.05/7 2.6} Wb6 {-0.10/9 2.5} 9. Pee3 {+0.20/9 2.5}
Ph4 {+0.10/9 2.9} 10. Pgd4 {-0.10/8 2.5} Ih5 {+0.20/11 2.7} 11. Cfd3
{-0.15/9 2.8} Phe4 {+0.25/10 2.9} 12. We2 {-0.25/9 2.2} Ig4 {+0.75/10 2.2}
13. Ph3 {-0.55/11 2.5} Kd8 {+1.10/12 2.6} 14. Pcc3 {-1.40/12 5} Da7
{+1.55/13 2.3} 15. Pa4 {-1.60/12 2.2} Wa5 {+1.85/12 2.3} 16. Pa2
{-1.95/11 3} Wa4 {+2.10/11 3} 17. Pb5 {-2.00/11 3} Da5 {+2.00/11 3} 18. Ic5
{-1.90/10 3} Ped5 {+2.85/8 2.9} 19. Pb2 {-2.80/6 3} Lee5 {+1.75/9 2.3} 20.
Pf1 {-1.85/7 3} Db4 {+1.75/7 2.4} 21. Cd4 {-1.75/6 3} Pb6 {+1.75/7 4} 22.
Lb5 {-1.60/8 9} Wb3 {+0.50/8 2.3} 23. Ic4 {-1.30/6 2.0} Lh6 {+0.35/7 3} 24.
Wh2 {-0.05/6 2.4} Lh4 {-0.40/7 3} 25. Pf2 {+1.25/10 2.5} Le6 {-1.25/7 2.3}
26. Pa2 {+3.20/8 2.8} Cf6 {-3.15/6 3} 27. Lb2 {+3.20/9 2.8} Cg5
{-3.05/9 2.9} 28. Ccc2 {+3.15/10 2.7} Kc7 {-3.10/9 3} 29. Pa5
{+3.15/11 2.8} If4 {-3.20/11 3} 30. Pg2 {+3.25/9 2.3} Pcc5 {-3.10/9 2.7}
31. Ccd3 {+3.20/10 2.9} Pbb5 {-3.20/9 3} 32. Pa4 {+3.25/8 2.8} La6
{-3.10/9 2.9} 33. La3 {+3.15/8 2.3} Le6 {-3.15/9 2.9} 34. Pf2 {+3.30/7 2.2}
Pdd6 {-3.20/9 2.7} 35. Pab4 {+3.20/11 3} Lg4 {-3.20/10 3} 36. Ke2
{+3.20/11 3} Cd7 {-3.20/13 4} 37. La5 {+3.20/13 3} Kc6 {-3.25/12 4} 38. Pb3
{+3.30/10 2.6} Pfe5 {-3.15/12 3} 39. La6 {+4.65/12 4} Ph7 {-4.65/10 3} 40.
Ib4 {+4.65/15 4} Lgf5 {-4.65/13 5} 41. Lc4 {+4.65/11 0.7} Pf7
{-4.65/14 2.9} 42. La6 {+4.70/12 3} Kc7 {-4.70/13 2.9} 43. Ib8
{+6.40/13 2.2} Pcc4 {-7.95/12 7} 44. Cd4 {+10.45/10 3} P5c5
{-299.93/15 2.2} 45. Lb6 {+299.94/17 3} Cd8 46. Lc6 {+299.96/19 2.2}
{Black resigns} 1-0


User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Ultima

Post by Evert »

hgm wrote:Can't you switch off null move automatically, for the side that has too little material? I see that it can be a problem to judge what is "too little material" in a general variant engine, but I think you can safely assume that bare King fits the bill...
In Sjaak, the criterion is less than 4 piece types, which seems to work fairly well in practice.
The idea behind this really to check if the player has tempo moves available, so he can reach the current position with the other player on move in a normal way. I don't want to include pawns and kings in that consideration, so I want at least one other type of piece. A better scheme considers whether that piece could lose a tempo (sliders can, many leapers can't), but I haven't implemented that (yet).
Of course, that leaves situations where a player is in zugzwang despite having a piece that could normally do a tempo move, but you can't avoid those completely I guess.

By the way, my experience with null move in something like KRK is that the engine completely fails to deliver mate. I think that's to be expected though, since zugzwang is important for driving the lone king to the edge of the board.