vast342 / clarity Goto Github PK
View Code? Open in Web Editor NEWUCI chess engine with NNUE evaluation
License: GNU General Public License v3.0
UCI chess engine with NNUE evaluation
License: GNU General Public License v3.0
in a 900+3 game Clarity v5.0.0 lost without a reason, while it was simply winning : it couldn't mate with just one Rook !?
here's the game :
[Event "engine vs engine"]
[Site "Holland"]
[Date "2024.02.17"]
[Round "?"]
[White "Winter v2.04b NN"]
[Black "Clarity v5.0.0 NNUE"]
[Result "1/2-1/2"]
[Termination "illegal move"]
[TimeControl "900+3"]
[Opening "Sicilian"]
[ECO "B23"]
[Variation "Closed, 2...Nc6"]
With 15 minute time control with Banksia, Clarity will not function properly. The current theory is that this is due to a lack of input acceptance during searches.
After copying your v7.2.0 source by git clone
(PR 107) i got errors when compiling. But i solved them, here's how.
On the CXXFLAGS := ...
line you use the option -std=c++20
, so this requires a modern clang
version. On my OS (Xubuntu 22.04) the default clang version is 14 : i changed that by setting CXX := clang-17
.
But this didn't solve some other errors. Looking for answers, even consulting ChatGPT, i found you made a basic mistake : clang++
should be used, in my case clang++-17
!
I also got many (same) warnings argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
.
I discovered this option isn't needed (or is it?) so i safely removed it from the CXXFLAGS := ...
line.
Other minor adjustments :
LDFLAGS :=
: this is empty, and used only once, so i removed that also.PGO_DIR
isn't defined and also not used (only at clean:
), so i removed it.pgo-generate
(at .PHONY:
) : not used, so i removed it.Besides that, i solved this warning (i only got one) :
src/external/fathom/tbprobe.cpp:2463:41: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
2463 | if (popcount(pos->white | pos->black) <= cardinalityDTM) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
like this :
if (static_cast<unsigned int>(popcount(pos->white | pos->black)) <= static_cast<unsigned int>(cardinalityDTM)) {
Maybe i'm mistaken at some points, then please correct me.
After these changes the compilation went well and it created a binary of size 1.7 Mb which runs fine in CuteChess GUI.
And it plays a good game !
Btw. you may look at my ChatGPT session to solve the errors and warnings : https://chatgpt.com/share/93580c50-3ec8-4091-8524-692befc2f184
But this 'conversation' contains lots of useless (?) tries and code constructs, upto to moment i discovered clang++
is needed .. anyhow, this way i learned a lot !
It's sad that it's not possible to compile the newest version on Android and Linux devices.
Engine crashes when exiting - threads not cleaned up properly.
changing all instances of std::thread with std::jthread fixes the problem.
JA.
Please correct the version number displayed by version 2.0.0. It says it is version 1.0.2.
in order to compile on Linux, i had to adjust your source a bit (git clone after PR38).
at first i get this error (don't mention my line number 42) :
src/uci.cpp:42:18: error: no member named 'thread' in namespace 'std'
42 | std::vector<std::thread> threads;
i solved this by adding #include <thread>
on top of the uci.cpp
file.
then i encountered this error :
/usr/bin/ld: build/wdldatagen.o (symbol from plugin): in function `main':
(.text+0x0): multiple definition of `main'; build/uci.o (symbol from plugin):(.text+0x0): first defined here
i solved it by excluding this main (!?) function in wdldatagen.cpp
:
int main([[maybe_unused]]int argc, char** argv) { .. }
after these changes i did make
and all went well .. indeed Clarity has threads now and it seems to run fine in CuteChess.
[ i'm on Xubuntu 22.04 ]
Consider using a file-naming scheme for releases that states the overall version of Clarity. It currently isn't possible to discern between different releases of the engine based on file name alone. The v1, v2, v3, v4, etc. structure works, but it needs to clarify which overall engine version is present.
Keeping it separated by micro-architecture levels is good, keep that.
Idea:
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.