xboard problem

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: xboard problem

Post by hgm »

Indeed, if there is no engine, or if Fairy-Max would be loaded, you won't get an error message.

This is all happens in the common back-end code, so XBoard and WinBoard should behave the same (and apparently they do). That also means that fixing it will fix them both.
LiquidNitrogenOverclocker

Re: xboard problem

Post by LiquidNitrogenOverclocker »

Hey H.G.,

I just played against your program on the variant server and got my head handed to me!
LiquidNitrogenOverclocker

Re: xboard problem

Post by LiquidNitrogenOverclocker »

But I got my revenge as white:

[Event "ICS unrated gothic match"]
[Site "80.100.28.169"]
[Date "2010.02.24"]
[Round "-"]
[White "gothicinventor"]
[Black "FairyMax"]
[Result "1-0"]
[WhiteElo "0"]
[BlackElo "1293"]
[TimeControl "720+2"]
[Variant "gothic"]

1. d4 Nc6 2. Nh3 d5 3. Nc3 e6 4. g3 Nh6 5. b3 g6 6. Ba3+ Ne7
7. e3 Bf6 8.Bg2 Bd7 9. Af3 Nf5 10. O-O Ah6 11. Bc1 O-O
12. e4 Nxd4 13. Bxh6 Nxf3 14.Bxf3 Bxc3 15. Bxj7+ Kj8
16. Cf3 Bxa1 17. Ch4 Bf6 18. Cj5 Bxj2+
19. Nxj2 ixh6 20. Bi8+ Kxi8 21. Qj7#
{FairyMax checkmated} 1-0
LiquidNitrogenOverclocker

Re: xboard problem

Post by LiquidNitrogenOverclocker »

The analysis by FairyMax:


Creating: gothicinventor (0) FairyMax (1293) unrated gothic 7200 20

{Game 1 (gothicinventor vs. FairyMax) Creating unrated gothic match.}

FairyMax(1323)(C) kibitzes: !!! +0.16/7
(21.94 sec, 2652520 nodes, 121 knps)
PV=b8c6


FairyMax(1323)(C) kibitzes: !!! +0.20/7
(16.84 sec, 1972109 nodes, 117 knps)
PV=d7d5


FairyMax(1323)(C) kibitzes: !!! +0.05/6
(28.74 sec, 3389292 nodes, 118 knps)
PV=e7e6

FairyMax(1323)(C) kibitzes: !!! -0.05/7
(17.88 sec, 2074571 nodes, 116 knps)
PV=i8h6

FairyMax(1323)(C) kibitzes: !!! -0.14/6
(18.49 sec, 2144831 nodes, 116 knps)
PV=g7g6


FairyMax(1323)(C) kibitzes: !!! -0.06/7
(14.13 sec, 1637047 nodes, 116 knps)
PV=c6e7

FairyMax(1323)(C) kibitzes: !!! -0.03/7
(49.83 sec, 5675159 nodes, 114 knps)
PV=h8f6


FairyMax(1323)(C) kibitzes: !!! -0.06/6
(12.94 sec, 1449241 nodes, 112 knps)
PV=c8d7

FairyMax(1323)(C) kibitzes: !!! -0.17/6
(9.85 sec, 1093307 nodes, 111 knps)
PV=h6f5

FairyMax(1323)(C) kibitzes: !!! -0.04/6
(16.43 sec, 1809303 nodes, 110 knps)
PV=g8h6

FairyMax(1323)(C) kibitzes: !!! +0.10/6
(11.80 sec, 1352143 nodes, 115 knps)
PV=f8i8

FairyMax(1323)(C) kibitzes: !!! +0.62/7
(70.10 sec, 8567722 nodes, 122 knps)
PV=f5d4

FairyMax(1323)(C) kibitzes: !!! +0.55/7
(7.94 sec, 966038 nodes, 122 knps)
PV=d4f3

FairyMax(1323)(C) kibitzes: !!! +2.06/9
(10.55 sec, 1412101 nodes, 134 knps)
PV=f6c3

FairyMax(1323)(C) kibitzes: !!! +3.97/7
(5.62 sec, 716501 nodes, 127 knps)
PV=i8j8

FairyMax(1323)(C) kibitzes: !!! +4.50/8
(38.52 sec, 4977967 nodes, 129 knps)
PV=c3a1

FairyMax(1323)(C) kibitzes: !!! +4.81/6
(10.34 sec, 1183683 nodes, 114 knps)
PV=a1f6

FairyMax(1323)(C) kibitzes: !!! -79.97/9
(5.73 sec, 758475 nodes, 132 knps)
PV=f6j2

FairyMax(1323)(C) kibitzes: !!! -79.98/28
(3.73 sec, 1904093 nodes, 510 knps)
PV=i7h6

FairyMax(1323)(C) kibitzes: !!! -79.99/28
(0.00 sec, 248 nodes, 248 knps)
PV=j8i8

{Game 1 (gothicinventor vs. FairyMax) FairyMax checkmated} 1-0
No ratings adjustment done.
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: xboard problem

Post by hgm »

Yes, that can always happen in a highly tactical game like Gothic Chess, against an engine. :) That is why I like that variant so much!

I a not so sure how I can solve the problem this thread started with, though. Your game is a good example, so I posted it below. Currently XBoard saves it with a variant tag, but the variant is also recognizable from the event tag as Gothic. Problem is that older XBoards / WinBoards did not add the variant tag. So there will be tens of thousands of games around played on an ICS in variants losers, giveaway, suicide, atomic, that were all saved without variant tag.

The current code, which is the same as in 4.2.7, tries to identify the variant from the event tag if the variant is still set to 'normal' after reading the tags. (I.e. if there was no variant tag, and the user did nt switch to another variant before loading the game.) This code is used both for loading from a file and for pasting from the clipboard. If I would stop identifying the variant from the event tag , all these old suicide etc. games could not be read by XBoard anymore, and their owners would not be happy...

My only contribution to this problem is that I added a variant with the name 'super', which is arguably too likely a word to occur in an event name for other reasons to be a good variant name. The variant officially is called ' Superchess' , and I could change the WB name for it to that. This would solve the problem at hand, because it would not match SuperGM anymore, but SuperChess might also not be very unlikely to occur. In general there is no guarding against event names containing the name of a variant which it is not. (FICS, for instance, is guilty of this; they feature a wild called misc/shogi which is not shogi at all...)

Perhaps the best solution is to not accept variants that I added myself from the event tag. (There is no need for that, as the XBoard versions that supported those variants also always saves them with a variant tag.) Then the problem would remain limited to the variants where 4.2.7 would also get it wrong.

Code: Select all

[Event "ICS Unrated gothic match"]
[Site "192.168.2.2"]
[Date "2010.02.24"]
[Round "-"]
[White "FairyMax"]
[Black "gothicinventor"]
[Result "1-0"]
[WhiteElo "1293"]
[BlackElo "0"]
[Variant "gothic"]

1. c3 Nh6 2. Nh3 d5 3. Qb3 Nc6 4. d3 Rb8 5. g3 Be6 6. Nf4 f6 7. Nxe6+ Axe6
8. e4 Ac5 9. exd5 Axb3 10. axb3 Ne5 11. f4 Nef7 12. Ce6+ Kg8 13. Cxd8 Cxd8
14. Rxa7 Ra8 15. Bf3 g6 16. Rxa8 Cxa8 17. Ac5 Nd6 18. O-O Bg7 19. Nd2 Kf7
20. Ae6+ Ke8 21. Axg7+ Kf7 22. Ae6+ Ke8 23. j4 Nhf7 24. Ag7+ Kd8 25. Ai5 h6
26. Axg6
{Black resigned} 1-0
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: xboard problem

Post by Dirt »

hgm wrote:Perhaps the best solution is to not accept variants that I added myself from the event tag. (There is no need for that, as the XBoard versions that supported those variants also always saves them with a variant tag.) Then the problem would remain limited to the variants where 4.2.7 would also get it wrong.
I think having Winboard choke on games from the Capablanca Memorial tournament is not reasonable, whether 4.2.7 did or not (I don't know). I think you need a pop-up if you get the variant from something other that the variant tag. Note that there are Capablanca variations, so the variation tag cannot be trusted either.
LiquidNitrogenOverclocker

Re: xboard problem

Post by LiquidNitrogenOverclocker »

Dirt wrote:
hgm wrote:Perhaps the best solution is to not accept variants that I added myself from the event tag. (There is no need for that, as the XBoard versions that supported those variants also always saves them with a variant tag.) Then the problem would remain limited to the variants where 4.2.7 would also get it wrong.
I think having Winboard choke on games from the Capablanca Memorial tournament is not reasonable, whether 4.2.7 did or not (I don't know). I think you need a pop-up if you get the variant from something other that the variant tag. Note that there are Capablanca variations, so the variation tag cannot be trusted either.
The only alternative then would be something like INDEXING the variants. Gothic = 1, Capablanca = 2, etc. but this has its drawbacks also. As long as one person "controls the variant index list" then this is OK. The other big detractor is the tedium of indexing the variants in the first place.
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: xboard problem

Post by hgm »

Dirt wrote:
hgm wrote:Perhaps the best solution is to not accept variants that I added myself from the event tag. (There is no need for that, as the XBoard versions that supported those variants also always saves them with a variant tag.) Then the problem would remain limited to the variants where 4.2.7 would also get it wrong.
I think having Winboard choke on games from the Capablanca Memorial tournament is not reasonable, whether 4.2.7 did or not (I don't know). I think you need a pop-up if you get the variant from something other that the variant tag. Note that there are Capablanca variations, so the variation tag cannot be trusted either.
Well, I think the solution I currently chose would work best in practice. People would also be very annoyed when they got a popup every time they loaded an old suicide game, where they would not get one in 4.2.7.

No variant that was added since 4.2.7 can be recognized from the event tag now. So the Capablanca Memorial Tourney is safe, and if it does not contain a tag [Variant "capablanca"], it will be recognized as normal Chess. That would displace the problem to 10x8 Capablanca games announced in the event tag (e.g. [Event "ICS capablanca game"]), but lacking a variant tag. But WinBoard would never save such a game without the variant tag. (And I hope Chess GUI would not do it either.)

This solution perfictly mimics 4.2.7 behavior for any game not containing an explicit variant tag. And for games with variant tag there never would be problems. (Assuming the tag is not bogus.)

The problem was reported just in time for the fix to go into 4.4.3.
LiquidNitrogenOverclocker

Re: xboard problem

Post by LiquidNitrogenOverclocker »

Is your server up today HG? I am not able to connect to it.