NebiyuReversi problem

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

NebiyuReversi problem

Post by hgm »

The version of NebiyuReversi I have accepts normal moves (like e4e6) in addition to drops. I don't think that is legal in Reversi.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NebiyuReversi problem

Post by Daniel Shawul »

Try this one . Nebiyu rejected such moves as illegal with WB-alien. I have made some changes in the winboard protocol code since last update to handle multi player games better, which may affect other behavior adversely.
abulmo
Posts: 151
Joined: Thu Nov 12, 2009 6:31 pm

Re: NebiyuReversi problem

Post by abulmo »

I have another problem. Not sure if it is related to NeniyuReversi or xboard/winboard

When playing matches between my program (Edax) and NebiyuReversi, if NebiyuReversi is wiped out and lose 64-0 the result is displayed as a draw because of "bare king". As there is no king in Reversi, just discs, and 64-0 are perfectly legal score, I do not understand what this means.

Here is an example of such a game :

Code: Select all

[Event "Computer Chess Game"]
[Site "sonata"]
[Date "2012.01.04"]
[Round "1"]
[White "Edax 4.2.1"]
[Black "NebiyuReversi_1.42"]
[Result "1/2-1/2"]
[TimeControl "40/60"]
[Variant "reversi"]
[FEN "8/2p5/1P1p4/1Pppp3/1P1Ppp2/3P4/8/8 b - - 0 1"]
[SetUp "1"]

{--------------
. . . . . . . .
. . p . . . . .
. P . p . . . .
. P p p p . . .
. P . P p p . .
. . . P . . . .
. . . . . . . .
. . . . . . . .
black to play
--------------}
1... P@a5 2. P@g4 {+13,00/35 2,9} P@a3 3. P@c6 {+18,00/35 5} P@d7 4. P@f5
{+18,00/37 1,9} P@f3 5. P@e3 {+18,00/31 4} P@f6 6. P@g5 {+22,00/29 4} P@h5
7. P@e6 {+36,00/31 6} P@c4 8. P@c3 {+38,00/39 6} P@b3 9. P@g6 {+58,00/37 4}
P@h6 10. P@d8 {+62,00/35 4} P@e7 11. P@f7 {+62,00/33 3} P@e8 12. P@f8
{+62,00/31 3} pass 13. P@h3 {+62,00/30 4} P@g3 14. P@h4 {+64,00/28} P@g7
15. P@c8 {+64,00/26} P@h2 16. P@a4 {+64,00/24} P@a6 17. P@h8 {+64,00/22}
P@b7 18. P@h7 {+64,00/20} P@g8 19. P@h1 {+64,00/18} P@b8 20. P@a8
{+64,00/16} pass 21. P@a7 {+64,00/15} pass 22. P@g2 {+64,00/14} P@f2 23.
P@f1 {+64,00/12} P@g1 24. P@e2 {+64,00/10} P@d2 25. P@d1 {+64,00/8} P@e1
26. P@c1 {+64,00/6} P@b1 27. P@a1 {+64,00/4} pass 28. P@a2 {+64,00/3} pass
29. P@b2 {+64,00/2}
{White wins 63-0 but bare king} 1/2-1/2
Richard
User avatar
hgm
Posts: 27814
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: NebiyuReversi problem

Post by hgm »

Yes, that does sound like a WinBoard bug. And a pretty weird one, as in Reversi the disks are represented by Pawns, I think, so you should have plenty of pieces other than King. But even apart from that, is clear this kind of adjudication should not take place when adjudications (like mate detection) or legality testing are off.

I will check it out.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: NebiyuReversi problem

Post by Evert »

I've seen a similar problem (engine claims "1-0" or "0-1", but XBoard overrules it and gives "1/2-1/2" instead) for games where the goal is to capture all enemy pieces as well as for games where the goal is to occupy certain squares (XBoard doesn't know about those, of course, but it shouldn't have to as long as the engine knows).
My impression is that it gets confused if there is no royal piece.
User avatar
hgm
Posts: 27814
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: NebiyuReversi problem

Post by hgm »

I took a look at the code, and the problem seems to be that "verify engine claims" is switched on. Without that, it would never to this "result correction".

It could be considered a bit sloppy, though, that it even attempts to verify claims when legality testing is off. Although the rule that a bare King cannot force checkmate is almost universally valid in Chess variants. And it is a bad idea to use Kings in non-chesslike games (as it would for instance also clutter up notation with irrelevant check symbols).

The algorithm used is a bit course too, however: it counts pieces of the side that just claimed the win, and if the number is <= 1, it corrects to draw. It does not actually test if the remaining piece is a King, and the case of 0 pieces is of course also suspect. (The losers chess variants are of course not subected to this test.) I could limit it to a single King.

This does not explain the case with Edax, however, as it is the losing side that has no pieces there. So it seems to me that Edax is at fault here too, and claimed a win for the wrong side. Do you have a winboard.debug file for this case, so that we could see what result claim Edax actually made?
abulmo
Posts: 151
Joined: Thu Nov 12, 2009 6:31 pm

Re: NebiyuReversi problem

Post by abulmo »

hgm wrote: This does not explain the case with Edax, however, as it is the losing side that has no pieces there. So it seems to me that Edax is at fault here too, and claimed a win for the wrong side. Do you have a winboard.debug file for this case, so that we could see what result claim Edax actually made?
Yes, this is actually what happened. My program displayed a score as [first player's score] - [second player's score] {[color's winner] wins}. Unfortunately to me, XBoard considers that White is always the first player. So when my program sent 0-1 {White wins} on a game started by black, XBoard got it wrong. I have changed my program to display [White's score]-[Black's score] {[color's winner] wins}, so the bug is gone.

PS: Considering White as always the first player is too rigid on my opinion. According to Othello's rule, Black is the first player for instance.

PS-2: Sorry for my late answer, I didn't see your post at the right time.
Richard
User avatar
hgm
Posts: 27814
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: NebiyuReversi problem

Post by hgm »

I agree that it is unfortunate that WB protocol identifies players by a color. Especially since in some games the players are red and blue. The Shogi system of sente & gote would be much less confusing.

For purists there is always the possibility to configure away the difference, however. You can pick any color for the pieces (like black for the white pieces, and white for the black pieces), and you can supply a language file (e.g. shoginese.lng) that defines "White" === "Sente" etc. to get the desired texts in the clock and menus (provided you select Shoginese from the Help menu).
Mark
Posts: 216
Joined: Thu Mar 09, 2006 9:54 pm

Re: NebiyuReversi problem

Post by Mark »

abulmo wrote:I have another problem. Not sure if it is related to NeniyuReversi or xboard/winboard

When playing matches between my program (Edax) and NebiyuReversi, if NebiyuReversi is wiped out and lose 64-0 the result is displayed as a draw because of "bare king". As there is no king in Reversi, just discs, and 64-0 are perfectly legal score, I do not understand what this means.

Here is an example of such a game :

Code: Select all

&#91;Event "Computer Chess Game"&#93;
&#91;Site "sonata"&#93;
&#91;Date "2012.01.04"&#93;
&#91;Round "1"&#93;
&#91;White "Edax 4.2.1"&#93;
&#91;Black "NebiyuReversi_1.42"&#93;
&#91;Result "1/2-1/2"&#93;
&#91;TimeControl "40/60"&#93;
&#91;Variant "reversi"&#93;
&#91;FEN "8/2p5/1P1p4/1Pppp3/1P1Ppp2/3P4/8/8 b - - 0 1"&#93;
&#91;SetUp "1"&#93;

&#123;--------------
. . . . . . . .
. . p . . . . .
. P . p . . . .
. P p p p . . .
. P . P p p . .
. . . P . . . .
. . . . . . . .
. . . . . . . .
black to play
--------------&#125;
1... P@a5 2. P@g4 &#123;+13,00/35 2,9&#125; P@a3 3. P@c6 &#123;+18,00/35 5&#125; P@d7 4. P@f5
&#123;+18,00/37 1,9&#125; P@f3 5. P@e3 &#123;+18,00/31 4&#125; P@f6 6. P@g5 &#123;+22,00/29 4&#125; P@h5
7. P@e6 &#123;+36,00/31 6&#125; P@c4 8. P@c3 &#123;+38,00/39 6&#125; P@b3 9. P@g6 &#123;+58,00/37 4&#125;
P@h6 10. P@d8 &#123;+62,00/35 4&#125; P@e7 11. P@f7 &#123;+62,00/33 3&#125; P@e8 12. P@f8
&#123;+62,00/31 3&#125; pass 13. P@h3 &#123;+62,00/30 4&#125; P@g3 14. P@h4 &#123;+64,00/28&#125; P@g7
15. P@c8 &#123;+64,00/26&#125; P@h2 16. P@a4 &#123;+64,00/24&#125; P@a6 17. P@h8 &#123;+64,00/22&#125;
P@b7 18. P@h7 &#123;+64,00/20&#125; P@g8 19. P@h1 &#123;+64,00/18&#125; P@b8 20. P@a8
&#123;+64,00/16&#125; pass 21. P@a7 &#123;+64,00/15&#125; pass 22. P@g2 &#123;+64,00/14&#125; P@f2 23.
P@f1 &#123;+64,00/12&#125; P@g1 24. P@e2 &#123;+64,00/10&#125; P@d2 25. P@d1 &#123;+64,00/8&#125; P@e1
26. P@c1 &#123;+64,00/6&#125; P@b1 27. P@a1 &#123;+64,00/4&#125; pass 28. P@a2 &#123;+64,00/3&#125; pass
29. P@b2 &#123;+64,00/2&#125;
&#123;White wins 63-0 but bare king&#125; 1/2-1/2
A little off topic here, but have you thought about trying to solve 8x8 othello with Edax and current hardware? Thanks!
abulmo
Posts: 151
Joined: Thu Nov 12, 2009 6:31 pm

solving othello with edax ?

Post by abulmo »

Mark wrote: A little off topic here, but have you thought about trying to solve 8x8 othello with Edax and current hardware? Thanks!
I am afraid Edax or my computer is too slow...
The best Edax reached is (after the move F5) :

Code: Select all

59@87%  +00  4&#58;23&#58;23&#58;56.78 43654107405796 101559729  D6 c4 D3 c3 F4 c5 B3 c2 B4 e3 E6 c6 F6 a5 A4 b5 A6 d7 C7 e7 E8 b6 D8 g3 F7 g5 D1 c1 B1 g6 A7 g8 H6 h5 F8 c8 H4 g4 B2 a1 B7 e1 H3 g7 D2 e2 F2 a2 H8 f3 F1 h7 A3 a8 B8 g1 G2 h1 H2
with Edax last version (4.2.1), on a i7 2600k, compiled with icc 12.1 under Linux Ubuntu, ie a faster compiled version than the binary available for download.
The meaning of the line is <depth>@<probcut selectivity level> <score> <time> <nodes> <speed> <PV>. Edax uses Iterative deepening and then iterative & diminishing selectivity, using the percentage 73, 87, 95, 98 and 100%. 100% means no selectivity.
After more than 20 days, Edax was not able to reach the next level 59@95%, and I had to abort the search. So, I have no idea how long it will take to solve Othello with Edax, is it 1 year (optimistic) or 100 years ?

Even if Edax was able to solve Othello, I am not sure that its result will be mathematically accepted as there are possible transposition table collisions.
Richard