I'll look into it. It should always recognise O-O unless that option is deliberately disabled (which gives a warning that this will break shuffle variants), so this seems odd. What version is it?
./sjaakii-1.3.0
Sjaak II version 1.3.0 (x86_64)
Type 'help' for a list of commands and help topics
8r n b q k b n r
7p p p p p p p p
6
5
4
3
2P P P P P P P P
1R N B Q K B N R *
a b c d e f g h
#[Chess] 0w>setboard bnrbk1rq/pppppppp/4n3/8/8/1P2P3/P1PP1PPP/BNRBKNRQ b KQkq -
8b n r b k r q *
7p p p p p p p p
6 n
5
4
3 P P
2P P P P P P
1B N R B K N R Q
a b c d e f g h
#[Chess] 0b (f)>O-O
8b n r b r k q
7p p p p p p p p
6 n
5
4
3 P P
2P P P P P P
1B N R B K N R Q *
a b c d e f g h
#[Chess] 1w (f)>
Michel wrote:
BTW Sjaak prints so much info during start up that it exposed a buffer overflow in icsdrone
Really? All it should print is a version string, a help message, the board and a prompt.
Although I suppose that if you expect to receive in the order of a single line at a time it could overflow the buffer...
If you start directly in CECP mode ("sjaakii -xboard") it will not print the board. You still get the version and help message though.
EDIT: I tested both "bnrbk1rq/pppppppp/4n3/8/8/1P2P3/P1PP1PPP/BNRBKNRQ b CGcg -" and "bnrbk1rq/pppppppp/4n3/8/8/1P2P3/P1PP1PPP/BNRBKNRQ b KQkq -", both seem to work here.
Michel wrote:While testing icsdrone with Sjaak it appears that Sjaak rejects O-O as castling notation during fisherandom. I think this is incorrect according to
Note that the ICS board gives the situation _after_ the castling move.
What is that character following the O-O? (012) In C that would be octal making it a 0x'0a' or "\n".
That's the normal unix end of line character (where windows likes a CR/LF pair to end the line.) That is normally removed during input parsing, but since it is showing that each time it mentions the O-O move, that looks wrong.
bob wrote:
What is that character following the O-O? (012) In C that would be octal making it a 0x'0a' or "\n".
That's the normal unix end of line character (where windows likes a CR/LF pair to end the line.) That is normally removed during input parsing, but since it is showing that each time it mentions the O-O move, that looks wrong.
You know, that is a good point. If there is an extra character, the string would not match the move string and the move would be rejected.
Question is how the extra character would get there. I use fgets to get the string (or readline when reading from a terminal) and then trim whitespace and newline from the end of the string...
Well it happens only with O-O or O-O-O. That suggests it is not a silly white space issue.
The \012 is just a textual representation (for the log file) of a newline (^J), the line separator on Linux. It is natural that icsdrone sends this to the engine and also natural that the engine sends it back.
I noticed now that the phenomenon does not always happen. Sometimes the O-O is accepted as legal.
I will try to get to the bottom of this, but right now I am bit busy.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
It may be useful to run SjaakII with the -log argument so that it does its own logging. Mostly this will just record the input and output, but it makes it easy to see what the engine things it gets as input (at least for me).
I don't think it logs the FEN of the current position at the start of the search, but this might actually be useful information to have, so perhaps I should add that.