Written from scratch, although many pieces were taken (or adapted) from DiscoCheck: https://github.com/lucasart/demolito
By computer standards, it's rather weak (roughly on par with Sungorus 1.4 = 2300 elo CCRL 40/4). But that should be enough if you want to play against it (unless you're a GM).
Known issues:
Chess960 works, but only if the GUI uses Shredder FEN (ie. AHah, not KQkq).
SMP works (ie. does what it's designed to do), but doesn't scale. So it's best not to use it for now.
Relies on thread local storage, whose Windows implementation sucks. So it's going to be slow on Windows, and fast on Linux, Android, and (possibly) MacOSX.
I'm not providing any compile, because, at this stage, I'm more interested in feedback from programmers than casual users.
"Talk is cheap. Show me the code." -- Linus Torvalds.
lucasart wrote:Written from scratch, although many pieces were taken (or adapted) from DiscoCheck:
...
I'm not providing any compile, because, at this stage, I'm more interested in feedback from programmers than casual users.
Given your frequent comments about C++, is there any reason why you chose it rather than plain C?
$ gcc *.cc
In file included from types.h:5:0,
from bitboard.h:2,
from move.h:2,
from move.cc:16:
move.cc: In member function 'Move::operator move_t() const':
move.cc:28:20: error: invalid user-defined conversion from 'const Move' to 'const Move*' [-fpermissive]
assert(move_ok(*this));
^~
move.cc:26:1: note: candidate is: Move::operator move_t() const <near match>
Move::operator move_t() const
^~~~
move.cc:26:1: note: no known conversion from 'move_t {aka short unsigned int}' to 'const Move*'
move.cc:20:6: note: initializing argument 1 of 'bool move_ok(const Move*)'
bool move_ok(const Move *m)
^~~~~~~
In file included from types.h:5:0,
from bitboard.h:2,
from move.h:2,
from move.cc:16:
move.cc: In member function 'Move Move::operator=(move_t)':
move.cc:37:20: error: invalid user-defined conversion from 'Move' to 'const Move*' [-fpermissive]
assert(move_ok(*this));
^~
move.cc:26:1: note: candidate is: Move::operator move_t() const <near match>
Move::operator move_t() const
^~~~
move.cc:26:1: note: no known conversion from 'move_t {aka short unsigned int}' to 'const Move*'
move.cc:20:6: note: initializing argument 1 of 'bool move_ok(const Move*)'
bool move_ok(const Move *m)
^~~~~~~
But I get a segfault after uci followed by ucinewgame:
DCorbit@dcorbit MINGW64 /f/project/dcorbit/Demolito-master/src
$ ./demolito.exe
uci
id name Demolito
id author lucasart
option name UCI_Chess960 type check default false
option name Hash type spin default 1 min 1 max 1048576
option name Threads type spin default 1 min 1 max 64
option name Contempt type spin default 10 min -100 max 100
option name Time Buffer type spin default 30 min 0 max 1000
uciok
ucinewgame
Segmentation fault
$ gcc *.cc
In file included from types.h:5:0,
from bitboard.h:2,
from move.h:2,
from move.cc:16:
move.cc: In member function 'Move::operator move_t() const':
move.cc:28:20: error: invalid user-defined conversion from 'const Move' to 'const Move*' [-fpermissive]
assert(move_ok(*this));
^~
move.cc:26:1: note: candidate is: Move::operator move_t() const <near match>
Move::operator move_t() const
^~~~
move.cc:26:1: note: no known conversion from 'move_t {aka short unsigned int}' to 'const Move*'
move.cc:20:6: note: initializing argument 1 of 'bool move_ok(const Move*)'
bool move_ok(const Move *m)
^~~~~~~
In file included from types.h:5:0,
from bitboard.h:2,
from move.h:2,
from move.cc:16:
move.cc: In member function 'Move Move::operator=(move_t)':
move.cc:37:20: error: invalid user-defined conversion from 'Move' to 'const Move*' [-fpermissive]
assert(move_ok(*this));
^~
move.cc:26:1: note: candidate is: Move::operator move_t() const <near match>
Move::operator move_t() const
^~~~
move.cc:26:1: note: no known conversion from 'move_t {aka short unsigned int}' to 'const Move*'
move.cc:20:6: note: initializing argument 1 of 'bool move_ok(const Move*)'
bool move_ok(const Move *m)
^~~~~~~
You're not compiling correctly. Please have a look at the make.sh file.
"Talk is cheap. Show me the code." -- Linus Torvalds.
But I get a segfault after uci followed by ucinewgame:
DCorbit@dcorbit MINGW64 /f/project/dcorbit/Demolito-master/src
$ ./demolito.exe
uci
id name Demolito
id author lucasart
option name UCI_Chess960 type check default false
option name Hash type spin default 1 min 1 max 1048576
option name Threads type spin default 1 min 1 max 64
option name Contempt type spin default 10 min -100 max 100
option name Time Buffer type spin default 30 min 0 max 1000
uciok
ucinewgame
Segmentation fault
$ gcc *.cc
In file included from types.h:5:0,
from bitboard.h:2,
from move.h:2,
from move.cc:16:
move.cc: In member function 'Move::operator move_t() const':
move.cc:28:20: error: invalid user-defined conversion from 'const Move' to 'const Move*' [-fpermissive]
assert(move_ok(*this));
^~
move.cc:26:1: note: candidate is: Move::operator move_t() const <near match>
Move::operator move_t() const
^~~~
move.cc:26:1: note: no known conversion from 'move_t {aka short unsigned int}' to 'const Move*'
move.cc:20:6: note: initializing argument 1 of 'bool move_ok(const Move*)'
bool move_ok(const Move *m)
^~~~~~~
In file included from types.h:5:0,
from bitboard.h:2,
from move.h:2,
from move.cc:16:
move.cc: In member function 'Move Move::operator=(move_t)':
move.cc:37:20: error: invalid user-defined conversion from 'Move' to 'const Move*' [-fpermissive]
assert(move_ok(*this));
^~
move.cc:26:1: note: candidate is: Move::operator move_t() const <near match>
Move::operator move_t() const
^~~~
move.cc:26:1: note: no known conversion from 'move_t {aka short unsigned int}' to 'const Move*'
move.cc:20:6: note: initializing argument 1 of 'bool move_ok(const Move*)'
bool move_ok(const Move *m)
^~~~~~~
You're not compiling correctly. Please have a look at the make.sh file.
If your compile in debug mode, you should get the same problems.
move_ok wants a pointer, not an object.
But I get a segfault after uci followed by ucinewgame:
DCorbit@dcorbit MINGW64 /f/project/dcorbit/Demolito-master/src
$ ./demolito.exe
uci
id name Demolito
id author lucasart
option name UCI_Chess960 type check default false
option name Hash type spin default 1 min 1 max 1048576
option name Threads type spin default 1 min 1 max 64
option name Contempt type spin default 10 min -100 max 100
option name Time Buffer type spin default 30 min 0 max 1000
uciok
ucinewgame
Segmentation fault