witek902 / caissa Goto Github PK
View Code? Open in Web Editor NEWStrong chess engine
License: MIT License
Strong chess engine
License: MIT License
3r3k/7p/2Q5/8/2B2PK1/6P1/4P3/5q2 b - - 98 99
Please forgive me for my poor English. Caissa1.14.1 is very powerful! But there is a bug, the above situation went through Rd8-d4 in the engine league, resulting in one step being killed by the king. I hope to correct it.
A few things I noticed when building for Mac:
ftello64 and fseeko64 -> ftello and fseeko in
https://github.com/Witek902/Caissa/blob/master/src/utils/Stream.cpp
sprintf is depracated, snprintf seemed to build fine. Needed to be changed in:
https://github.com/Witek902/Caissa/blob/master/src/utils/ThreadPool.cpp
and
https://github.com/Witek902/Caissa/blob/master/src/backend/syzygy/tbprobe.cpp
hi,
i just managed to compile your v1.12 on Xubuntu 22.04, AVX2 version .. i see two "contempt" options 'Static' and 'Dynamic' .. what are those ?
as i understand 'contempt' is something like 'optimism' .. i can imagine how playing style & bestmove can be different when setting such values .. maybe you even have test positions to show the effect of these options ?
hi, i managed to compile your newest Caissa on Linux .. the UCI info says v1.6.11 but also : Failed to load default neural network eval-7.pnn .. indeed this file is missing, where to get it ?
Any chance that the source code will become compatible with Android again (arm64-v8a and armeabi-v7a)?
i let Caissa v1.3 play several games in CuteChess .. all went well but it lost the last game on time : "connection stalls" .. see screenshot. At that moment Caissa had a lost position anyway, maybe that was the cause, but it shouldn't happen. The CuteChess log did not show anything. I don't know what can be done to fix this, i just want to mention this incident.
OS: Archlinux
Caissa works, tested in Nibbler GUI and everything was fine yet it seems something is wrong as I try to make it play games against other engines in Cutechess gui nor BanksiaGUI. I am curious about if it is also the same for Windows.
It's sad that it's not possible to compile the newest version on Android and Linux devices.
again i'm unable to compile your (v1.7) source files on Linux .. i tried to get the source files by git clone
and also the supplied ZIP, both fail :
[ i'm on Xubuntu 22.04 ]
$ make
[ 1%] Building CXX object src/backend/CMakeFiles/backend.dir/Bitboard.cpp.o
[ 3%] Building CXX object src/backend/CMakeFiles/backend.dir/Common.cpp.o
[ 5%] Building CXX object src/backend/CMakeFiles/backend.dir/Endgame.cpp.o
In file included from /home/roelof/Compiled/Caissa-1.7/src/backend/Endgame.cpp:7:
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:13:8: error: duplicate ‘inline’
13 | INLINE inline void GeneratePromotionsMoveList(const Square from, const Square to, MoveList& outMoveList)
| ^~~~~~
| ------
In file included from /home/roelof/Compiled/Caissa-1.7/src/backend/Endgame.cpp:7:
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp: In lambda function:
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:59:101: error: expected primary-expression before ‘)’ token
59 | Square(targetIndex).Shift_Unsafe<pawnRevDirection>().Shift_Unsafe<pawnRevDirection>(),
| ^
In file included from /home/roelof/Compiled/Caissa-1.7/src/backend/Endgame.cpp:8:
/home/roelof/Compiled/Caissa-1.7/src/backend/Math.hpp: In function ‘uint64_t MulHi64(uint64_t, uint64_t)’:
/home/roelof/Compiled/Caissa-1.7/src/backend/Math.hpp:35:23: warning: ISO C++ does not support ‘__int128’ for ‘type name’ [-Wpedantic]
35 | return ((unsigned __int128)a * (unsigned __int128)b) >> 64;
| ^~~~~~~~
/home/roelof/Compiled/Caissa-1.7/src/backend/Math.hpp:35:46: warning: ISO C++ does not support ‘__int128’ for ‘type name’ [-Wpedantic]
35 | return ((unsigned __int128)a * (unsigned __int128)b) >> 64;
| ^~~~~~~~
In file included from /home/roelof/Compiled/Caissa-1.7/src/backend/Endgame.cpp:7:
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp: In instantiation of ‘void GeneratePawnMoveList(const Position&, MoveList&) [with MoveGenerationMode mode = MoveGenerationMode::Quiets; Color sideToMove = Color::White]’:
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:227:43: required from ‘void GenerateMoveList(const Position&, MoveList&) [with MoveGenerationMode mode = MoveGenerationMode::Quiets; Color sideToMove = Color::White]’
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:273:45: required from ‘void GenerateMoveList(const Position&, MoveList&) [with MoveGenerationMode mode = MoveGenerationMode::Quiets]’
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:284:49: required from here
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:59:82: error: no match for ‘operator<’ (operand types are ‘<unresolved overloaded function type>’ and ‘const Direction’)
59 | Square(targetIndex).Shift_Unsafe<pawnRevDirection>().Shift_Unsafe<pawnRevDirection>(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp: In instantiation of ‘void GeneratePawnMoveList(const Position&, MoveList&) [with MoveGenerationMode mode = MoveGenerationMode::Quiets; Color sideToMove = Color::Black]’:
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:227:43: required from ‘void GenerateMoveList(const Position&, MoveList&) [with MoveGenerationMode mode = MoveGenerationMode::Quiets; Color sideToMove = Color::Black]’
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:277:45: required from ‘void GenerateMoveList(const Position&, MoveList&) [with MoveGenerationMode mode = MoveGenerationMode::Quiets]’
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:284:49: required from here
/home/roelof/Compiled/Caissa-1.7/src/backend/MoveGen.hpp:59:82: error: no match for ‘operator<’ (operand types are ‘<unresolved overloaded function type>’ and ‘const Direction’)
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-four-char-constants’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-nested-anon-types’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-gnu-anonymous-struct’ may have been intended to silence earlier diagnostics
make[2]: *** [src/backend/CMakeFiles/backend.dir/build.make:104: src/backend/CMakeFiles/backend.dir/Endgame.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:149: src/backend/CMakeFiles/backend.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Hi,
may you release a non-AVX2/BMI version too, please? I can't run it, I'm limited to AVS and SSE.
Thanx,
Alex
hi, your v1.9 release page states "Add more endgame knowledge, should evaluate some fortress positions better" .. well, a known issue here is mate with 2 kNights, which will never happen, but many engines do not fear to exchange pieces and pawns to reach such position, while they think it is winning due to the material balance .. however, without a pawn, White team KkPP will never win, eg. see https://en.wikipedia.org/wiki/Two_knights_endgame .. Btw. also read about the exception : the opponent might have (only) one pawn, then a mate is possible ..
is Caissa aware of this matter ?
When I compile with Android NDK (which uses the Clang compiler) by using the flag "-DUSE_ARM_NEON", I get the following error message:
backend/PackedNeuralNetwork.cpp:544:33: fatal error: no matching function for call to 'vaddq_s32'
val += vaddvq_s32(vaddq_s32(vaddq_s32(sumA, sumB, vaddq_s32(sumC, sumD));
I assume the line must look like this:
val += vaddvq_s32(vaddq_s32(vaddq_s32(sumA, sumB), vaddq_s32(sumC, sumD)));
Finally, an additional "#include <cmath>" is required in Evaluate.hpp.
With these changes, Caissa compiles smoothly with Android NDK.
hello, please add book support,Thanks.
When running caissa-1.13.1-x64-avx2-bmi2.exe under Win11 I get following output:
AdjustTokenPrivileges failed, error code: 1300
Caissa 1.13.1 AVX2 by Michal Witanowski
info string Using embedded neural network
Engine seems to be working fine...
EDIT: do not have this on other machine with Win10
also found this, but not sure it this is related: https://devblogs.microsoft.com/oldnewthing/20211126-00/?p=105973
is the source code also for Linux ? I guess not .. after doing cmake -DCMAKE_BUILD_TYPE=Debug
i get a makefile .. then i do make
but i get these errors :
~/Compiled/Caissa$ make
[ 2%] Building CXX object src/backend/CMakeFiles/backend.dir/Bitboard.cpp.o
[ 4%] Building CXX object src/backend/CMakeFiles/backend.dir/Common.cpp.o
[ 6%] Building CXX object src/backend/CMakeFiles/backend.dir/Endgame.cpp.o
[ 8%] Building CXX object src/backend/CMakeFiles/backend.dir/Evaluate.cpp.o
In file included from /home/roelof/Compiled/Caissa/src/backend/Evaluate.cpp:8:
/home/roelof/Compiled/Caissa/src/backend/Search.hpp:247:44: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
247 | using NNEvaluatorContextPtr = std::unique_ptr<NNEvaluatorContext>;
| ^~~~~~~~~~
/home/roelof/Compiled/Caissa/src/backend/Search.hpp:8:1: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
7 | #include "Memory.hpp"
+++ |+#include <memory>
8 | #include "NeuralNetworkEvaluator.hpp"
/home/roelof/Compiled/Caissa/src/backend/Search.hpp:248:9: error: ‘NNEvaluatorContextPtr’ does not name a type; did you mean ‘NNEvaluatorContext’?
248 | NNEvaluatorContextPtr nnContextStack[MaxSearchDepth];
| ^~~~~~~~~~~~~~~~~~~~~
| NNEvaluatorContext
cc1plus: note: unrecognized command-line option ‘-Wno-four-char-constants’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-nested-anon-types’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-gnu-anonymous-struct’ may have been intended to silence earlier diagnostics
make[2]: *** [src/backend/CMakeFiles/backend.dir/build.make:118: src/backend/CMakeFiles/backend.dir/Evaluate.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:149: src/backend/CMakeFiles/backend.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.