Comments (13)
can AVX(2) be compiled ? (i adjusted the Makefile)
With GCC go, it is automatically activated when it is supported, go-compiler doesn't do that
from zahak.
Thanks for having interest in the branch... it is still very early work in progress, the branch doesn't still outplay my latest stable release. I believe I should have a bug somewhere, which I am currently trying to figure it out
I expect to break the Makefile a few times before I get to something that works, for now (if you really want to build the branch), simply delete engine/nn.go
file, it will be auto-generated when you run make build
But the included default.nn
is a very experimental too, it will be very weak, most likely weaker than Zahak 5.0 too.
And, to compile the branch, you need gccgo
installed, as this compiler enables AVX instructions and further optimizations than regular go compiler
from zahak.
Thanks for gccgo recommendation, I’d never heard of it.
However I now get these errors after installing gccgo v8.3.0 and trying your build:
(I don’t know why everything is crossed out?)
Al@RPi4-SSD:~/Engine-Source/zahak-nnue $ make clean
go clean ./...
rm -rf bin
rm engine/nn.go <<<<< I included this in the clean:
Al@RPi4-SSD:/Engine-Source/zahak-nnue $ make build -j5/Engine-Source/zahak-nnue $
go run -ldflags "-X 'main.netPath=default.nn'" netgen/nn.go
mkdir -p bin
#go build -ldflags "-X 'main.version=e99e11f31b4cb856138867e1cdb8aeca8ed7ac7a'" -o bin ./...
go build -compiler gccgo -gccgoflags -O3 -o bin ./...
engine/cache.go:32:27: error: expected ‘;’ or newline after top level declaration
const MOVE_MASK uint64 = 0b1111111111111111111111111111 // move << 0, 28 bits
^
engine/cache.go:33:27: error: expected ‘;’ or newline after top level declaration
const EVAL_MASK uint64 = 0b1111111111111111 // eval << 28, 16 bits
^
engine/cache.go:34:28: error: expected ‘;’ or newline after top level declaration
const DEPTH_MASK uint64 = 0b1111111 // depth << 44, 7 bits
^
engine/cache.go:35:27: error: expected ‘;’ or newline after top level declaration
const TYPE_MASK uint64 = 0b111 // type << 51, 3 bits
^
engine/cache.go:36:26: error: expected ‘;’ or newline after top level declaration
const AGE_MASK uint64 = 0b1111111111 // age << 54, 10 bits
^
engine/movegen.go:1078:20: error: shift count not unsigned integer
var b = uint64(1 << sq)
^
make: *** [Makefile:16: build] Error 2
Al@RPi4-SSD:
—————
I can still compile via “make dist -j5” but nothing works with build
from zahak.
Incidentally, your current NNUE is not as weak as you think:
in a cutechess tournament with TC settings of 20 50 where each game took between 1-2 minutes, a 722 game tournament produced the following results:
(Again sorry for the bold and non bold, I have no control over it?)
Rank Name Rating Δ + - # Σ Σ% W L D W% =% OppR
1 Zahak-v6.2 2794 0.0 25 25 722 523.0 72.4 472 148 102 65.4 14.1 2626
2 ZahakNN-v6.2 2626 167.4 25 25 722 199.0 27.6 148 472 102 20.5 14.1 2794
However in a shorter 64 game tournament of TC settings of 120 40 where each game took 10-18 mins, it faired much better:
Rank Name Rating Δ + - # Σ Σ% W L D W% =% OppR
1 Zahak-v6.2 2802 0.0 77 77 64 37.0 57.8 32 22 10 50.0 15.6 2748
2 ZahakNN-v6.2 2748 55.0 77 77 64 27.0 42.2 22 32 10 34.4 15.6 2802
I tried to base the Elo on a estimated rating of @2800 for Zahak v6.2, but at least it shows the Elo difference.
So the NN version is much closer at slower time controls (55 Elo weaker rather than 167.4 Elo weaker)
I appreciate we need a stronger NN file, I’m also hoping you can produce a few of different strengths to provide us with levels.
Al.
from zahak.
Even with a stronger net (a net that is actually very close to Bit-Genie's net, that is a 3000 elo engine), my NNUE branch cannot beat Zahak 6.2 (even after I use the much faster gccgo compiler)
So, there must be an issue somewhere in my probing code.
As for the gccgo compiler issue, you are using a very old compiler, which couldn't parse binary literals, you probably want to upgrade it to the latest
from zahak.
Thanks for the update, however that is the latest version on the Raspberry Pi. Normally with other compilers if I need a later version I download the source and build it myself, but I cannot find anyway of the doing that with gccgo.
from zahak.
hi, i'm not into GO but normally i succeed in using a Makefile .. yours is OK, i even used make dist
to get a linux amd64 binary but what about that gccgo thingy ? I found it in my Synaptic and installed it, but how to change your Makefile into gccgo ? I tried replacing "go" with "gccgo" in the Makefile, but i get errors .. it seems gccgo has another syntax ?! I found https://golang.org/doc/install/gccgo and i read "Using gccgo" but it gave me no clue .. i'd like to compile your go source into AVX / BMI code while my newest laptop has it ..
from zahak.
Hi,
Once you have gccgo installed (on the RPi it’s sudo apt install gccgo) you just need to change the
dist: netgen in the Makefile to
dist: netgen build
& then run the make via make dist
the build part uses the earlier build: reference in the Makefile to use gccgo
from zahak.
Good news, I finally got NNUE to work, it is currenlty around +90 against 6.2... Once I cleanup the code a bit, I will also provide a better Makefile
You can still compile with normal go-compiler, it will just be slower (weaker), but probably this won't matter if you want it on DGT Pi
from zahak.
Great, I’ll wait for you to add the code to your GitHub …
from zahak.
i managed to tackle my issue : you're talking about https://github.com/amanjpro/zahak/tree/nnue .. indeed, there i find a Makefile which has some gccgo commands .. however, at first i encountered problems with the golang versions on my Xubuntu 20.04 : i had 1.13.8 and also 1.16.2 installed !? And go version
showed 1.13 but your code warnings show i need 1.16.2 to be used .. then i found the tool gvm
by https://otzarri.net/install-multiple-versions-of-golang-on-ubuntu/ and thus i made 1.16.2 default, and so zahak-nnue (from your ZIP) compiled OK ! And it runs in CuteChess with the default.nn !
can AVX(2) be compiled ? (i adjusted the Makefile)
from zahak.
Is this still an issue? can we close it?
from zahak.
closing is OK with me
from zahak.
Related Issues (20)
- Problem under Fritz HOT 13
- Raspberry Pi 4 32 bit compile problems HOT 17
- Doesn't work on my XEON 3680 HOT 1
- drawDivider is not apply when p.Turn() == Black HOT 2
- Compile issues on RPi 32 bit since commit d46bc7b2d176f7efc71eaaedd9aefa8850ab5efa HOT 4
- Evaluation and best move differ in 2 GUIs HOT 4
- LMR+PVS HOT 1
- Is it possible to get a working compilation for CPUs not suporting avx instructions? HOT 1
- Won't run in android
- incorrect move generation HOT 3
- Endgame TB
- Pawn endgame eval HOT 1
- King-safety eval
- Trapped pieces HOT 1
- Losing on time A LOT HOT 23
- Zahak can sometimes make an illegal move HOT 3
- Multi-stage movegen
- Pseudo-Legal moves
- +250-300? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zahak.