ChessGUI and Chess960

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: ChessGUI and Chess960

Post by Matthias Gemuh »

Evert wrote:Do you have a log file or the position where it happened?
I overwrote log with TJChess test.

TJChess test going fine so far.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
TonyJH
Posts: 183
Joined: Tue Jun 20, 2006 4:41 am
Location: USA

Re: ChessGUI and Chess960

Post by TonyJH »

Thanks for adding this approach Matthias. :)
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: ChessGUI and Chess960

Post by hgm »

Evert wrote:Ok, it looks like there's an issue if the rook is between the king and the place where the king ends up: Sjaak tests whether the space between the king and rook is empty, but that's not enough in this situation.
Indeed, you have to ignore King and Rook when testing for emptiness of the King and Rook trajectories.
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: ChessGUI and Chess960

Post by Matthias Gemuh »

Matthias Gemuh wrote:
Evert wrote:Do you have a log file or the position where it happened?
I overwrote log with TJChess test.

TJChess test going fine so far.
TJChess test (36 FRC games) ran flawlessly.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: ChessGUI and Chess960

Post by Evert »

hgm wrote:
Evert wrote:Ok, it looks like there's an issue if the rook is between the king and the place where the king ends up: Sjaak tests whether the space between the king and rook is empty, but that's not enough in this situation.
Indeed, you have to ignore King and Rook when testing for emptiness of the King and Rook trajectories.
I do that, but what I don't do is test properly whether the route to the destination is free.pot differently there is an assumption that the destination is between the king and the rook.
There's also an issue with the relative position of origin and destination squares I when castling long, the king I'd assumed to move to the left (white's perspective).this isn't necessarily true.
User avatar
hgm
Posts: 28354
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: ChessGUI and Chess960

Post by hgm »

Indeed, there are many pitfalls. In Spartacus (which does not play FRC, but at least I designed it such that it would not be to difficult to implement it), I simply have a table that for each castling move stores the from and to-squares, the left-most and right-most squares that have to be tested for emptiness (ignoring the from-squares), and the left-most and rightmost squares that have to be tested for in-check. For the emptiness the left-most square is the left-most piece from both before and after castling (e.g. for O-O the left-most of King before and Rook after castling), etc.
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: ChessGUI and Chess960

Post by Matthias Gemuh »

Evert wrote:
hgm wrote:
Evert wrote:Ok, it looks like there's an issue if the rook is between the king and the place where the king ends up: Sjaak tests whether the space between the king and rook is empty, but that's not enough in this situation.
Indeed, you have to ignore King and Rook when testing for emptiness of the King and Rook trajectories.
I do that, but what I don't do is test properly whether the route to the destination is free.pot differently there is an assumption that the destination is between the king and the rook.
There's also an issue with the relative position of origin and destination squares I when castling long, the king I'd assumed to move to the left (white's perspective).this isn't necessarily true.
Remember that the King sometimes does not move during FRC castling.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: ChessGUI and Chess960

Post by Evert »

Matthias Gemuh wrote: Remember that the King sometimes does not move during FRC castling.
I know, not a problem.

Thanks for the reminder though. :)
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: ChessGUI and Chess960

Post by Matthias Gemuh »

Matthias Gemuh wrote:
Evert wrote:...

nothing in the protocol says I have to work around GUI bugs.

...
I have added the new approach. :wink:

http://biglion.bplaced.net/chess/ChessGUI.zip

Unfortunately, I cannot test it in Chess960 using Sjaak because Sjaak has bugs !

Someone should try TJChess in WB mode and give feedback. Thanks.


Matthias.
BTW, I do not recommend switching to this version yet.
More changes and fixes still to enter this pre-release of ChessGUI 0.241 !

Matthias.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: ChessGUI and Chess960

Post by Evert »

Ok, the bug with construction of FRC castling flags in Sjaak is now fixed in my local tree. It turned out to be very simple in the end. I more-or-less rewrote the relevant part of the code to be stupider and more direct.

I also fixed an unrelated issue where Sjaak would sometimes send O-O when it meant O-O-O. This took a bit longer to find because XBoard would either interpret it correctly as O-O-O (!) or treat it as Kc1, which would cause an illegal move (claim) later in the game.

I'll upload a version for testing later tonight; there is apparently an issue with running Sjaak in 64 bit Windows that I cannot reproduce here (for lack of Windows), so I would appreciate some volunteers to help narrow down the problem. :)