SjaakII 1.0 RC1

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

Moderator: Ras

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

Re: SjaakII 1.0 RC3

Post by Evert »

hgm wrote:OK, great! This one works. I could castle. It does not implement 'guarding'?
No, not yet. It takes very little to add it at this point, but there are one or two places where it is explicitly assumed that there are only two castling moves.

My understanding is that "guarding" is an addition to Omega Chess (in a variation by the same author called "Omega Chess Advanced"), which also includes a new piece, the Fool (a Chamaeleon that has to be gated in before move 20, and/or optionally a type of Immobiliser) and an optional replacement for the Knight (NmZ). The Fool is a problematic piece to add without adding a lot of code.
User avatar
hgm
Posts: 28493
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC3

Post by hgm »

Ah, OK, it is just in the extension. I wasn't aware of that. Then it isn't really worth it. I was just curies whether it would work in XBoard. I suppose I could configure the current version of Sjaak to do the guarding instead of castling?
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC3

Post by Evert »

hgm wrote:Ah, OK, it is just in the extension. I wasn't aware of that. Then it isn't really worth it. I was just curies whether it would work in XBoard. I suppose I could configure the current version of Sjaak to do the guarding instead of castling?
Sure. This is probably easiest to do with Omicron Chess because it is defined in the config file, but it can be done with Omega Chess too if you're willing to edit the configuration in variants.h.

For Omicron Chess, just changing

Code: Select all

Castle: white g2-i2 with j2
Castle: white g2-e2 with c2
Castle: black g9-i9 with h9
Castle: black g9-e9 with j9
to

Code: Select all

Castle: white f2-h2 with j2
Castle: white f2-d2 with c2
Castle: black f9-h9 with h9
Castle: black f9-d9 with j9
should do it (not fully tested though).
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC3

Post by Evert »

Windows 32 and 64 bit binaries are up.

Thanks Martin!
Ferdy
Posts: 4853
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: SjaakII 1.0 RC3

Post by Ferdy »

Evert wrote:Windows 32 and 64 bit binaries are up.

Thanks Martin!
Setup in winboard 4.8.0b as s-chess, windows 7. Then run in analyze mode, but it rejected the move e2e4.

Code: Select all

530 >first : xboard
protover 2
530 <first : Sjaak II version 1.0 RC3b (x86_64)
530 <first : Type 'help' for a list of commands and help topics
530 <first :  8[1m[46m[30mr [45m[30mn [46m[30mb [45m[30mq [46m[30mk [45m[30mb [46m[30mn [45m[30mr [0m
530 <first :  7[1m[45m[30mp [46m[30mp [45m[30mp [46m[30mp [45m[30mp [46m[30mp [45m[30mp [46m[30mp [0m
540 <first :  6[1m[46m  [45m  [46m  [45m  [46m  [45m  [46m  [45m  [0m
540 <first :  5[1m[45m  [46m  [45m  [46m  [45m  [46m  [45m  [46m  [0m
540 <first :  4[1m[46m  [45m  [46m  [45m  [46m  [45m  [46m  [45m  [0m
540 <first :  3[1m[45m  [46m  [45m  [46m  [45m  [46m  [45m  [46m  [0m
540 <first :  2[1m[46m[37mP [45m[37mP [46m[37mP [45m[37mP [46m[37mP [45m[37mP [46m[37mP [45m[37mP [0m
540 <first :  1[1m[45m[37mR [46m[37mN [45m[37mB [46m[37mQ [45m[37mK [46m[37mB [45m[37mN [46m[37mR [0m*
540 <first :   a b c d e f g h 
540 <first : #[Chess] 0w>
540 <first : feature setboard=1 time=1 sigint=0 colors=0 highlight=1 ping=1 memory=1 analyze=1 pause=1 nps=1 myname="Sjaak II 1.0 RC3b" myversion="[1.0 RC3b (x86_64)]" variants="seirawan,shatar,makruk,shatranj,sittuyin,crazyhouse,chessgi,asean,ai-wok,spartan,pocketknight,kingofthehill,knightmate,amazon,chancellor,berolina,losalamos,micro,capablanca,gothic,embassy,courier,grand,opulent,omega,minishogi,shoshogi,shogi,torishogi,xiangqi,chess960,fischerandom,fischerrandom,nocastle,wildcastle,caparandom,minisho,5x5+5_shogi,tori,7x7+6_shogi,sho,9x9+0_shogi,king-of-the-hill,fairy,8x8+0_fairy,8x8+6_fairy,8x8+1_fairy,6x6+0_fairy,5x5+0_fairy,10x8+0_fairy,12x8+0_fairy,10x10+0_fairy,12x12+0_fairy,5x5+5_fairy,9x9+0_fairy,9x9+8_fairy,7x7+6_fairy,9x10+0_fairy,normal"
540 >first : accepted setboard
540 >first : accepted time
540 >first : accepted sigint
540 >first : accepted colors
540 >first : accepted highlight
540 >first : accepted ping
540 >first : accepted memory
540 >first : accepted analyze
540 >first : accepted pause
540 >first : accepted nps
540 >first : accepted myname
540 >first : rejected myversion
540 >first : accepted variants
540 <first : feature option="Variant fairy selects -combo chess (8x8+0) /// seirawan (8x8+0) /// shatar (8x8+0) /// makruk (8x8+0) /// shatranj (8x8+0) /// sittuyin (8x8+6) /// crazyhouse (8x8+6) /// chessgi (8x8+6) /// asean (8x8+0) /// ai-wok (8x8+0) /// spartan (8x8+0) /// pocketknight (8x8+1) /// kingofthehill (8x8+0) /// knightmate (8x8+0) /// amazon (8x8+0) /// chancellor (8x8+0) /// berolina (8x8+0) /// losalamos (6x6+0) /// micro (5x5+0) /// capablanca (10x8+0) /// gothic (10x8+0) /// embassy (10x8+0) /// courier (12x8+0) /// grand (10x10+0) /// opulent (10x10+0) /// omega (12x12+0) /// minishogi (5x5+5) /// shoshogi (9x9+0) /// shogi (9x9+8) /// torishogi (7x7+6) /// xiangqi (9x10+0) /// chess960 (= chess) /// fischerandom (= chess) /// fischerrandom (= chess) /// nocastle (= chess) /// wildcastle (= chess) /// caparandom (= capablanca) /// minisho (= minishogi) /// 5x5+5_shogi (= minishogi) /// tori (= torishogi) /// 7x7+6_shogi (= torishogi) /// sho (= shoshogi) /// 9x9+0_shogi (= shoshogi) /// king-of-the-hill (= kingofthehill)"
550 >first : accepted option
550 <first : feature option="Send 'piece' descriptions -check 1"
550 >first : accepted option
550 <first : feature option="Mark holes in board -check 1"
550 >first : accepted option
550 <first : feature option="Report fail low -check 0"
550 >first : accepted option
550 <first : feature option="Report fail high -check 0"
550 >first : accepted option
550 <first : feature option="Set variant alias -string "
550 >first : accepted option
550 <first : feature option="Variant configuration file -file "
550 >first : accepted option
550 <first : feature done=1
550 >first : accepted done
570 >first : memory 68
570 >first : new
random
570 >first : variant seirawan
570 >first : level 0 5 1
570 >first : post
570 >first : hard
570 >first : easy
570 >first : ping 1
580 <first : pong 1
Reset(1, 1) from gameMode 0
recognized 'seirawan' (-1) as variant seirawan
GameEnds(0, (null), 2)
3332 >first : force
3332 >first : ping 2
shuffleOpenings = 0
3342 >first : memory 68
3342 >first : new
random
3342 >first : variant seirawan
3342 >first : level 0 5 1
3342 >first : post
3342 >first : hard
3342 >first : easy
3342 >first : ping 3
3342 <first : pong 2
3352 <first : pong 3
7884 >first : force
7884 >first : analyze
Impossible move , type = 0
7904 <first :   2     0      0       107  1. Nc3 Nc6
Impossible move , type = 32
7904 <first :   3    56      0       399  1. Nc3 Nc6 2. Nf3
Impossible move , type = 32
7944 <first :   4    -4      6      4762  1. Nc3 Nc6 2. Nf3  d6
Impossible move , type = 32
7974 <first :   5    41      7      9582  1. Nc3 Nc6 2. Nf3  d6 3.  e3
Impossible move , type = 32
8044 <first :   6     0     15     17288  1. Nc3 Nc6 2. Nf3  d6 3.  d3 Nf6
Impossible move , type = 32
8174 <first :   7    20     28     34581  1. Nc3 Nc6 2. Nf3  d6 3.  d3 B8e6 4.  a3
Impossible move , type = 32
9275 <first :   8     3    138    148941  1.  d3 Nh6 2. Nf3  d6 3.  c3 Nc6 4. Q1b3 Ng4
Impossible move , type = 32
9915 >first : .
9935 >first : lift e2
FRC castling, 9 2 6 9 2 6
10155 <first :   9    12    226    241493  1.  d3 Nc6 2. Nc3  d6 3. Nf3 Nf6 4. B1e3/H  h6 5. Nd4
Impossible move , type = 32
10715 >first : put e4
FRC castling, 9 2 6 9 2 6
FRC castling, 9 2 6 9 2 6
10715 >first : e2e4
10725 <first : Illegal move: e2e4
10735 <first : 
14340 <first :  10     0    645    674537  1.  d3 Nc6 2. Nc3  d6 3. Nf3 Nf6 4.  a3  h6 5.  h3  a6
Impossible move , type = 32
GameEnds(29, xboard exit, 2)
15260 >first : exit
15260 >first : quit
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC3

Post by Evert »

Seems I broke analysis mode. I'll look into it!
User avatar
hgm
Posts: 28493
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC3

Post by hgm »

There also seems to be a problem with make-install:

Code: Select all

hgm@hgm-xboard:~/SjaakIIc/Build$ sudo make install
[ 93%] Built target libsjaak
[100%] Built target sjaakii
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/bin/sjaakii
CMake Error at cmake_install.cmake:52 (FILE):
  file INSTALL cannot find "/home/hgm/SjaakIIc/sjaakii.6.gz".


make: *** [install] Error 1
hgm@hgm-xboard:~/SjaakIIc/Build$ ls -l
total 3216
-rw-r--r-- 1 hgm hgm   12470 2015-02-06 23:17 CMakeCache.txt
drwxr-xr-x 7 hgm hgm    4096 2015-02-08 10:51 CMakeFiles
-rw-r--r-- 1 hgm hgm    3915 2015-02-06 23:17 cmake_install.cmake
-rw-r--r-- 1 hgm hgm  199732 2015-02-06 23:17 liblibsjaak.a
-rw-r--r-- 1 hgm hgm   15926 2015-02-06 23:17 Makefile
-rwxr-xr-x 1 hgm hgm 3038331 2015-02-06 23:17 sjaakii
-rw-r--r-- 1 hgm hgm    2865 2015-02-06 23:17 sjaakii.6.gz
-rw-r--r-- 1 hgm hgm    7170 2015-02-06 23:24 xboard.debug
It seems it expects the man file in a different directory then where it actually is.
User avatar
hgm
Posts: 28493
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC3

Post by hgm »

hgm wrote:XBoard still seems to have a problem with promotions: it does trigger the procedure, but it fails to attache the chosen suffix to the move it sends to the engine, Will fix that this weekend.
I found a fix for this. But these 'highlight-induced promotions' still seem to function sub-optimally. At least when sweepPromotions is on. (And when it is off you have the problem that the promotion popup does not list the Wizzard and Champion as possible promotion choices.)

Normally sweepPromotions would already morph the Pawn into a Queen when it is picked up, and allow you to change it by moving it to the promotion square through a detour, pulling it backwards first. But here it only realizes it is a promotion when the piece is actually released on the purple square, and as it is too late to select anything then, it picks the default Queen. The only way to make a different selection is now to enter the promotion as a click-click move: then the down-click on purple makes XBoard realize this is a promotion, making the Queen appear on the to-square, and it allows you then to change the Queen into something else by dragging down the mouse before you release the second click.

The latter procedure is the only way for Shogi promotions, where you don't know in advance if a picked-up piece will move into the zone or not. I guess the same info could be extracted from the highlight command by checking if all the highlighted squares are purple; if they are, promotion is unavoidable, and the procedure could already be triggered when the piece is picked up. The problem is that unlike the case where the built-in move generator knows this, the information now is not really available when the piece is picked up for dragging, but only after the highlight response to the lift command comes in.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC3

Post by Evert »

hgm wrote:There also seems to be a problem with make-install:

[…]

It seems it expects the man file in a different directory then where it actually is.
Ok, this one is fixed with the following patch:

Code: Select all

Index: ../CMakeLists.txt
===================================================================
--- ../CMakeLists.txt	(revision 248)
+++ ../CMakeLists.txt	(working copy)
@@ -306,8 +306,8 @@
 endif(WANT_RELEASE)
 
 # Installation targets
-install (TARGETS "sjaakii" RUNTIME DESTINATION "bin")
-install (FILES "sjaakii.6.gz" RUNTIME DESTINATION "man/man6")
+install (TARGETS "sjaakii"                            RUNTIME DESTINATION "bin")
+install (FILES "${CMAKE_BINARY_DIR}/sjaakii.6.gz"     DESTINATION "share/man/man6")
 install (FILES "${CMAKE_SOURCE_DIR}/variants.txt"     DESTINATION "share/games/sjaakii/")
 install (FILES "${CMAKE_SOURCE_DIR}/misc/sjaakii.eng" DESTINATION "share/games/plugins/xboard/")
 install (FILES "${CMAKE_SOURCE_DIR}/misc/sjaakii.png" DESTINATION "share/games/plugins/logos/")
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC3

Post by Evert »

Ok, the immediate problem with analysis mode was caused by a change in the way moves are parsed, but analysis mode turns out to have been badly broken. I can't tell how it ever could have worked in the first place (at least not if you tried to undo moves and input new ones).

Should be fixed locally, but I do have one comment/question regarding the implementation and the CECP specs. Specifically:
new Reset position to start of game but stay in analyze mode.
In normal mode, "new" has the following description if we cut out all cruft that doesn't apply in analysis (force) mode:
new

Reset the board to the standard chess starting position.
[…]
Remove any search depth limit previously set by the sd command.
Apparently, "reset the board to the standard chess starting position." also implies switching back to variant "normal". I'm assuming this is not intended to be the case for "new" in analysis mode, in other words, they're different commands despite being called the same (I understand the historical reasons for this distinction).