SjaakII 1.3.1

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

Moderators: hgm, Rebel, chrisw

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

SjaakII 1.3.1

Post by Evert »

A new version of my multi-variant version SjaakII, version 1.3.1, is available for download at http://www.eglebbk.dds.nl/program/chess-download.html (source, Linux and OS X binaries, Windows binaries to follow).

Changes and new features include:
  • Remove castling from the definition of Suicide Chess.
  • Fix a bug where en-passant captures were not considered forced in forced-capture variants.
  • Fix an en-passant capture bug in Crazyhouse.
  • New variants: Wa-Shogi, Wa-Shogi with drops, Theban Chess.
  • Multi-PV mode, for analysis
  • Several options for weakening the engine.
  • Allow "-" in variant names.
  • Rename "Guard"->"Adviser" in Xiangqi.
  • New piece movement propertie: "block", which treats certain squares as always occupied for the purpose of piece movement.
  • Better error messages/feedback if a variant cannot be loaded.
  • A new "history" command to review the game history in console mode.
  • A new "skill" command to set the strength in console mode.
  • Various minor bug fixes.
Perhaps most generally interesting are the Multi-PV analysis mode, and the "skill/level" option to weaken play. This can be accessed from the engine options dialog box and through the "skill" command in console mode.
The default mode, "normal", does a standard search and plays at full strength (which isn't that impressive, of course). Other options are "clueless" (random mover), "random" (which replaces the evaluation with a random number) and "static", which plays whatever it thinks the best move is based on a simplistic static evaluation of the position.
Of these, "clueless" is obviously the weakest. Between "static" and "random" it's not so clear unless search depth is large enough for the so-called "Beal-effect" to kick in (which I haven't actually given it time to do in testing).

I'm up for better names for most of these, as well as suggestions for alternatives/improvements. Please let me know about bugs or non-features.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.3.1

Post by Evert »

Minor update to 1.3.1a, to fix a small glitch in highlighting promotion moves.
Norbert Raimund Leisner
Posts: 1643
Joined: Tue May 20, 2008 4:57 pm
Location: Augsburg - Germany

Re: SjaakII 1.3.1

Post by Norbert Raimund Leisner »

Evert, what´s about Sjaak II 1.3.1 release for Windows (32/64 bit)?

You wrote on this same website that Postduif cannot play normal chess.

Which variant is supported by Postduif? I would add these extra informations to CCWiki Variant Engine List.

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

Re: SjaakII 1.3.1

Post by Evert »

Norbert Raimund Leisner wrote:Evert, what´s about Sjaak II 1.3.1 release for Windows (32/64 bit)?
I can't make my own*, so I need to rely on other people's time to make them for me. This means it can sometimes take a little longer for the Windows build to be available.
You wrote on this same website that Postduif cannot play normal chess.

Which variant is supported by Postduif? I would add these extra informations to CCWiki Variant Engine List.
Postduif plays Grande Acedrex, Shatranj and Courier Chess. At some point it will also play Tamerlane Chess, but so far it doesn't...

*Well, I could, if I cross-compile in Linux, but then I need to distribute the rather large runtime library...
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.3.1

Post by Evert »

Windows builds are now up.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: SjaakII 1.3.1

Post by JoshPettus »

Have you tried building the windows build with mingw? I have a script to install it on OSX

The origional version used homebrew, I modified it to make use of macports instead.

Code: Select all

#!/bin/sh

# check_error my_cmd --param ...
check_error() {
  $* # we execute everything
  if [ $? -ne 0 ]; then
    echo "check_error(): Error in the last command:"
    echo "check_error(): $*"
    echo "check_error(): Continue? y/n"
    read a
    if [ $a != "y" ]; then
      exit
    fi
    echo "check_error(): Yes continue..."
  else
    echo "check_error(): OK: $*"
  fi
}
# check_download "file_maybe_existing" download_cmd...
check_download() {
  file=$1
  shift
  if [ ! -f "$file" ]; then
    echo "check_download(): download of $file must be done"
    $*
  else
    echo "check_download(): $file already downloaded"
  fi
}
# check_unzip "dir_unzipped" unzip_cmd...
check_unzip() {
  unzipped=$1
  shift
  if [ ! -d "$unzipped" ]; then
    echo "check_unzip(): unzip is needed"
    $*
  else
    echo "check_unzip(): unzip not needed, the $unzipped dir already exists"
  fi
}

#  dependencies 

echo "installing dependencies"
check_error sudo port install gcc49 gmp mpfr libmpc wget
check_error 

#  mingw

PREFIX="/usr/local/mingw"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
check_error cd $DIR

check_error mkdir source
check_error mkdir $PREFIX

echo "Downloading binutils\n"

check_error cd ./source
check_error check_download "binutils-2.25.1.tar.bz2" curl -O http://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2
check_error check_unzip "binutils-2.25.1" tar xjf binutils-2.25.1.tar.bz2

echo "Building binutils\n"
echo "1/2 32-bit\n"

check_error cd binutils-2.25.1
check_error mkdir build
check_error cd build

CC=/opt/local/gcc-mp-4.9 CXX=/opt/local/g++-mp-4.9 CPP=/opt/local/cpp-mp-4.9 LD=/opt/local/gcc-mp-4.9

check_error ../configure --target=i686-w64-mingw32 --disable-werror --disable-multilib --prefix=$PREFIX --with-sysroot=$PREFIX
check_error make -j4
check_error make install-strip

echo "2/2 64-bit\n"
cd ..
#check_error rm -rf build
check_error mkdir build64
cd build64

CC=/opt/local/gcc-mp-4.9 CXX=/opt/local/g++-mp-4.9 CPP=/opt/local/cpp-mp-4.9 LD=/opt/local/gcc-mp-4.9
check_error ../configure --target=x86_64-w64-mingw32 --disable-werror --disable-multilib --prefix=$PREFIX --with-sysroot=$PREFIX --enable-64-bit-bfd
check_error make -j4
check_error make install-strip

check_error cd ..
check_error cd ..

echo "Downloading mingw-w64\n"

check_error check_download "mingw-w64-v4.0.4.tar.bz2" wget -O mingw-w64-v4.0.4.tar.bz2 "http://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v4.0.4.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmingw-w64%2Ffiles%2Fmingw-w64%2Fmingw-w64-release%2F&ts=1396199899&use_mirror=kent"

check_error check_unzip "mingw-w64-v4.0.4" tar xjf mingw-w64-v4.0.4.tar.bz2

echo "Building mingw-headers\n"

echo "1/2 32-bit\n"

check_error cd mingw-w64-v4.0.4
check_error mkdir build-headers32
check_error cd build-headers32

check_error ../mingw-w64-headers/configure --host=i686-w64-mingw32 --prefix=$PREFIX/i686-w64-mingw32
check_error make -j4
check_error make install-strip

check_error cd $PREFIX/i686-w64-mingw32
check_error ln -s lib lib32
check_error cd $DIR/source/mingw-w64-v4.0.4

echo "2/2 64-bit\n"
#check_error rm -rf build-headers
check_error mkdir build-headers64
check_error cd build-headers64

check_error ../mingw-w64-headers/configure --host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32
check_error make -j4
check_error make install-strip


check_error cd $PREFIX/x86_64-w64-mingw32
check_error ln -s lib lib64
check_error cd $DIR/source/

echo "Downloading gcc\n"

check_error check_download "gcc-4.9.3.tar.bz2" curl -O ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2

check_error check_unzip "gcc-4.9.3" tar xjf gcc-4.9.3.tar.bz2

echo "Building core gcc\n"

echo "1/2 32-bit\n"


check_error cd $PREFIX
check_error ln -s i686-w64-mingw32 mingw

check_error cd $DIR/source/gcc-4.9.3
check_error mkdir build32
check_error cd build32

echo "Something is wrong with the macports gmp. Using the built-in one instead\n"

CC=/opt/local/gcc-mp-4.9 CXX=/opt/local/g++-mp-4.9 CPP=/opt/local/cpp-mp-4.9 LD=/opt/local/gcc-mp-4.9 PATH=/usr/local/mingw/bin/:$PATH

check_error ../configure --target=i686-w64-mingw32 --disable-multilib --enable-languages=c,c++,objc,obj-c++ --with-gmp=/usr --with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local --with-isl=/opt/local --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --enable-threads=win32 --disable-sjlj-exceptions --prefix=$PREFIX --with-sysroot=$PREFIX LDFLAGS='-I/opt/local/include'

PATH=/usr/local/mingw/bin/:$PATH
check_error make all-gcc -j4
PATH=/usr/local/mingw/bin/:$PATH
check_error make install-gcc

echo "2/2 64-bit\n"

check_error cd $PREFIX
check_error rm mingw
check_error ln -s x86_64-w64-mingw32 mingw

check_error cd $DIR/source/gcc-4.9.3
check_error mkdir build64
check_error cd build64

CC=/opt/local/gcc-mp-4.9 CXX=/opt/local/g++-mp-4.9 CPP=/opt/local/cpp-mp-4.9 LD=/opt/local/gcc-mp-4.9 PATH=/usr/local/mingw/bin/:$PATH

check_error ../configure --target=x86_64-w64-mingw32 --disable-multilib --enable-languages=c,c++,objc,obj-c++ --with-gmp=/usr --with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local --with-isl=/opt/local --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --enable-threads=win32 --prefix=$PREFIX --with-sysroot=$PREFIX LDFLAGS='-I/opt/local/include'

PATH=/usr/local/mingw/bin/:$PATH
check_error make all-gcc -j4
PATH=/usr/local/mingw/bin/:$PATH
check_error make install-gcc

echo "Building mingw runtime\n"

check_error cd $PREFIX
check_error rm mingw
check_error ln -s i686-w64-mingw32 mingw

check_error cd $DIR/source/mingw-w64-v4.0.4
check_error mkdir build-crt32
check_error cd build-crt32

echo "1/2 32-Bit\n"

PATH=/usr/local/mingw/bin/:$PATH
check_error ../mingw-w64-crt/configure --host=i686-w64-mingw32 --prefix=$PREFIX/i686-w64-mingw32 --with-sysroot=$PREFIX

PATH=/usr/local/mingw/bin/:$PATH
check_error make
PATH=/usr/local/mingw/bin/:$PATH
check_error make install-strip

echo "2/2 64-Bit\n"

check_error cd $PREFIX
check_error rm mingw
check_error ln -s x86_64-w64-mingw32 mingw

check_error cd $DIR/source/mingw-w64-v4.0.4
#check_error rm -rf build-crt
check_error mkdir build-crt64
check_error cd build-crt64

PATH=/usr/local/mingw/bin/:$PATH

check_error ../mingw-w64-crt/configure --host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32 --with-sysroot=$PREFIX

PATH=/usr/local/mingw/bin/:$PATH
check_error make
PATH=/usr/local/mingw/bin/:$PATH
check_error make install-strip

echo "Building all gcc\n"

echo "1/2 32-Bit\n"

check_error cd $PREFIX
check_error rm mingw
check_error ln -s i686-w64-mingw32 mingw

check_error cd $DIR/source/gcc-4.9.3/build32

PATH=/usr/local/mingw/bin/:$PATH
check_error make
PATH=/usr/local/mingw/bin/:$PATH
check_error make install-strip

echo "2/2 64-Bit\n"

check_error cd $PREFIX
check_error rm mingw
check_error ln -s x86_64-w64-mingw32 mingw

check_error cd $DIR/source/gcc-4.9.3/build64

PATH=/usr/local/mingw/bin/:$PATH
check_error make
PATH=/usr/local/mingw/bin/:$PATH
check_error make install-strip

echo "Linking libgcc\n"

check_error cd $PREFIX/i686-w64-mingw32/lib
check_error ln -s ../../lib/gcc/i686-w64-mingw32/lib/libgcc_s.a ./

check_error cd $PREFIX/x86_64-w64-mingw32/lib
check_error ln -s ../../lib/gcc/x86_64-w64-mingw32/lib/libgcc_s.a ./

echo "Building winpthreads\n"
check_error cd $DIR/source/mingw-w64-v4.0.4/mingw-w64-libraries/winpthreads

echo "1/2 32-Bit\n"

check_error mkdir build32
check_error cd build32

PATH=/usr/local/mingw/bin/:$PATH \
check_error ../configure --host=i686-w64-mingw32 --prefix=$PREFIX/i686-w64-mingw32
check_error make
check_error make install-strip

check_error cd ..
#check_error rm -rf build

echo "2/2 64-Bit\n"

check_error mkdir build64
check_error cd build64

PATH=/usr/local/mingw/bin/:$PATH \
check_error ../configure --host=x86_64-w64-mingw32 --prefix=$PREFIX/x86_64-w64-mingw32
check_error make
check_error make install-strip

echo "Cleaning up\n"

check_error cd $DIR
#check_error rm -rf source

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

Re: SjaakII 1.3.1

Post by Evert »

JoshPettus wrote:Have you tried building the windows build with mingw?
Yes, and that works ok. The problem is that the resulting binary requires the GNU C++ runtime, which is pretty massive.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: SjaakII 1.3.1

Post by JoshPettus »

You can statically link those. I don't remember it being that massive, I'm going to have to check

[EDIT] Woah I guess it is 11megs. Odd I don't remember my binaries being that large.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: SjaakII 1.3.1

Post by JoshPettus »

For jokes I tried compiling an old C++ homework assignment. It was quite a bit larger, by 3 megabytes, but at least not 11mb larger :-)
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: SjaakII 1.3.1

Post by Jamal Bubker »

Danke Evert for this new release 8-)