CODA now has a released page.

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

Moderator: Ras

chessica
Posts: 1124
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: CODA now has a released page.

Post by chessica »

Is it possible that the location of the egtb files is not freely selectable? And that it only works under C:?
adamtwiss
Posts: 12
Joined: Mon Jul 06, 2026 9:33 pm
Full name: Adam Twiss

Re: CODA now has a released page.

Post by adamtwiss »

chessica wrote: Sun Jul 12, 2026 1:10 pm Is it possible that the location of the egtb files is not freely selectable? And that it only works under C:?
Thanks for the feedback. I've just tested it and it looks like drive letters are fine, but there's an issue with UCI handling for paths with spaces in their names (my UCI handling was splitting args on spaces). Can you confirm you had a space in the folder name?

I have just pushed a fix for that now. If you build from source (latest head) it should now work. I am intending to do a 0.9.1 release tomorrow (just waiting for a model train to finish). This fix will be included in it and will have pre-built Windows binaries.

One workaround for you (if it's feasible) is to move it to a folder with no spaces in (e.g. "d:\egtb") should work fine.

Really appreciate the bug report, and please let me know if that doesn't work for you.
op12no2
Posts: 571
Joined: Tue Feb 04, 2014 12:25 pm
Location: Gower, Wales
Full name: Colin Jenkins

Re: CODA now has a released page.

Post by op12no2 »

adamtwiss wrote: Sun Jul 12, 2026 4:09 pm (my UCI handling was splitting args on spaces)
our? 😀
chessica
Posts: 1124
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: CODA now has a released page.

Post by chessica »

now it works....

setoption name SyzygyPath value C:\Program Files\arena_3.5.1\TB\syzygy
info string Syzygy tablebases loaded: 6 pieces from C:\Program Files\arena_3.5.1\TB\syzygy, cache 16 MB

but the makefile was wrong. some errors.

Code: Select all

# Coda Chess Engine — Makefile
# Supports: manual builds, OpenBench integration, PGO builds
#
# Usage:
#   make                  Build with native CPU optimizations
#   make EXE=coda-v2      Build with custom output name
#   make pgo              PGO-optimized build (only helps v5 on main branch — see note below)
#   make openbench        OpenBench-compatible build target
#   make net              Download the production NNUE net
#   make clean            Remove build artifacts

# Configuration
EXE := coda
NET_URL := $(shell cat net.txt 2>/dev/null)
# EVALFILE: defaults to the filename from net.txt (e.g. net-v5-768pw-w7-e800s800-filtered-lowestlr.nnue)
# OB overrides this with an absolute path to the network file.
EVALFILE := $(if $(NET_URL),$(notdir $(NET_URL)),net.nnue)
MIN_RUST_VERSION := 1.70.0

# Platform detection
ifeq ($(OS),Windows_NT)
	NAME := $(EXE).exe
	RM := del /q
else
	NAME := $(EXE)
	RM := rm -f
endif

# Rust flags
export RUSTFLAGS := -Ctarget-cpu=native

# Default: build with embedded NNUE net (downloads from net.txt if needed)
# EVALFILE may be overridden by OpenBench with an absolute path to the network
rule: check-rust net
	CODA_EVALFILE=$(abspath $(EVALFILE)) cargo rustc --release --features embedded-net -- --emit link=$(NAME)

# Alias for OpenBench compatibility
openbench: rule

# PGO build (profile-guided optimization).
#
# Status (2026-05-17): builds cleanly with cgu=16 (the v9-era crash that
# the prior comment described is gone), but PGO with bench-13 profile is
# fleet-fragile and not shipped as default. Production-class hardware
# (Lichess host, "fast ionos" cohort) shows ~0 Elo; Zen 5 hosts (zeus)
# regress -18.5 Elo. Older silicon (Coffee Lake Xeon, Zen 1) wins.
#
# See docs/pgo_fleet_finding_2026-05-17.md for the full per-machine data
# and why we're not using PGO by default.
#
# `make pgo` here remains available for one-off local experiments and as
# scaffolding for future profile-strategy work (richer profile, AutoFDO).
#
# Requires: cargo install cargo-pgo; rustup component add llvm-tools-preview
TARGET_TUPLE := $(shell rustc --print host-tuple 2>/dev/null)
pgo: check-rust net
	CODA_EVALFILE=$(abspath $(EVALFILE)) cargo pgo instrument build -- --features embedded-net
	LLVM_PROFILE_FILE=target/pgo-profiles/coda_%m_%p.profraw ./target/$(TARGET_TUPLE)/release/coda bench 13
	CODA_EVALFILE=$(abspath $(EVALFILE)) cargo pgo optimize build -- --features embedded-net
	cp target/$(TARGET_TUPLE)/release/coda $(NAME)

# Download production NNUE net (uses actual filename from net.txt, not generic net.nnue)
net:
	@if [ ! -s "$(EVALFILE)" ] && [ -n "$(NET_URL)" ]; then \
		set -e; \
		tmp="$(EVALFILE).tmp"; \
		trap 'rm -f "$$tmp"' EXIT; \
		echo "Downloading NNUE net from $(NET_URL)..."; \
		curl -fsSL --retry 3 --retry-delay 2 "$(NET_URL)" -o "$$tmp"; \
		test -s "$$tmp"; \
		mv "$$tmp" "$(EVALFILE)"; \
		trap - EXIT; \
		echo "Downloaded $(EVALFILE)"; \
	elif [ -s "$(EVALFILE)" ]; then \
		echo "$(EVALFILE) already exists"; \
	else \
		echo "Warning: no net.txt found and no $(EVALFILE) present"; \
	fi
# Check Rust toolchain version
check-rust:
	@command -v cargo >/dev/null 2>&1 || { echo "Error: cargo not found. Install Rust from https://rustup.rs"; exit 1; }
	@RUST_VERSION=$$(rustc --version | sed 's/rustc \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/'); \
	MIN="$(MIN_RUST_VERSION)"; \
	awk -v min=$$MIN -v cur=$$RUST_VERSION ' \
		function cmp(a,b) { \
			split(a,A,"."); split(b,B,"."); \
			for(i=1;i<=3;i++){ \
				if(A[i]+0 < B[i]+0) return -1; \
				if(A[i]+0 > B[i]+0) return 1; \
				} \
			return 0; \
		} \
		BEGIN { if(cmp(cur,min) < 0) exit 1 }' \


clean:
	cargo clean
	$(RM) $(NAME)

.PHONY: rule openbench pgo net check-rust clean
chessica
Posts: 1124
Joined: Thu Aug 11, 2022 11:30 pm
Full name: Esmeralda Pinto

Re: CODA now has a released page.

Post by chessica »

now it works....only in console mode, in arena not

setoption name SyzygyPath value C:\Program Files\arena_3.5.1\TB\syzygy
info string Syzygy tablebases loaded: 6 pieces from C:\Program Files\arena_3.5.1\TB\syzygy, cache 16 MB

but the makefile was wrong. some errors.

My makefile:

Code: Select all

# Coda Chess Engine — Makefile
# Supports: manual builds, OpenBench integration, PGO builds
#
# Usage:
#   make                  Build with native CPU optimizations
#   make EXE=coda-v2      Build with custom output name
#   make pgo              PGO-optimized build (only helps v5 on main branch — see note below)
#   make openbench        OpenBench-compatible build target
#   make net              Download the production NNUE net
#   make clean            Remove build artifacts

# Configuration
EXE := coda
NET_URL := $(shell cat net.txt 2>/dev/null)
# EVALFILE: defaults to the filename from net.txt (e.g. net-v5-768pw-w7-e800s800-filtered-lowestlr.nnue)
# OB overrides this with an absolute path to the network file.
EVALFILE := $(if $(NET_URL),$(notdir $(NET_URL)),net.nnue)
MIN_RUST_VERSION := 1.70.0

# Platform detection
ifeq ($(OS),Windows_NT)
	NAME := $(EXE).exe
	RM := del /q
else
	NAME := $(EXE)
	RM := rm -f
endif

# Rust flags
export RUSTFLAGS := -Ctarget-cpu=native

# Default: build with embedded NNUE net (downloads from net.txt if needed)
# EVALFILE may be overridden by OpenBench with an absolute path to the network
rule: check-rust net
	CODA_EVALFILE=$(abspath $(EVALFILE)) cargo rustc --release --features embedded-net -- --emit link=$(NAME)

# Alias for OpenBench compatibility
openbench: rule

# PGO build (profile-guided optimization).
#
# Status (2026-05-17): builds cleanly with cgu=16 (the v9-era crash that
# the prior comment described is gone), but PGO with bench-13 profile is
# fleet-fragile and not shipped as default. Production-class hardware
# (Lichess host, "fast ionos" cohort) shows ~0 Elo; Zen 5 hosts (zeus)
# regress -18.5 Elo. Older silicon (Coffee Lake Xeon, Zen 1) wins.
#
# See docs/pgo_fleet_finding_2026-05-17.md for the full per-machine data
# and why we're not using PGO by default.
#
# `make pgo` here remains available for one-off local experiments and as
# scaffolding for future profile-strategy work (richer profile, AutoFDO).
#
# Requires: cargo install cargo-pgo; rustup component add llvm-tools-preview
TARGET_TUPLE := $(shell rustc --print host-tuple 2>/dev/null)
pgo: check-rust net
	CODA_EVALFILE=$(abspath $(EVALFILE)) cargo pgo instrument build -- --features embedded-net
	LLVM_PROFILE_FILE=target/pgo-profiles/coda_%m_%p.profraw ./target/$(TARGET_TUPLE)/release/coda bench 13
	CODA_EVALFILE=$(abspath $(EVALFILE)) cargo pgo optimize build -- --features embedded-net
	cp target/$(TARGET_TUPLE)/release/coda $(NAME)

# Download production NNUE net (uses actual filename from net.txt, not generic net.nnue)
net:
	@if [ ! -s "$(EVALFILE)" ] && [ -n "$(NET_URL)" ]; then \
		set -e; \
		tmp="$(EVALFILE).tmp"; \
		trap 'rm -f "$$tmp"' EXIT; \
		echo "Downloading NNUE net from $(NET_URL)..."; \
		curl -fsSL --retry 3 --retry-delay 2 "$(NET_URL)" -o "$$tmp"; \
		test -s "$$tmp"; \
		mv "$$tmp" "$(EVALFILE)"; \
		trap - EXIT; \
		echo "Downloaded $(EVALFILE)"; \
	elif [ -s "$(EVALFILE)" ]; then \
		echo "$(EVALFILE) already exists"; \
	else \
		echo "Warning: no net.txt found and no $(EVALFILE) present"; \
	fi
# Check Rust toolchain version
check-rust:
	@command -v cargo >/dev/null 2>&1 || { echo "Error: cargo not found. Install Rust from https://rustup.rs"; exit 1; }
	@RUST_VERSION=$$(rustc --version | sed 's/rustc \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/'); \
	MIN="$(MIN_RUST_VERSION)"; \
	awk -v min=$$MIN -v cur=$$RUST_VERSION ' \
		function cmp(a,b) { \
			split(a,A,"."); split(b,B,"."); \
			for(i=1;i<=3;i++){ \
				if(A[i]+0 < B[i]+0) return -1; \
				if(A[i]+0 > B[i]+0) return 1; \
				} \
			return 0; \
		} \
		BEGIN { if(cmp(cur,min) < 0) exit 1 }' \


clean:
	cargo clean
	$(RM) $(NAME)

.PHONY: rule openbench pgo net check-rust clean
adamtwiss
Posts: 12
Joined: Mon Jul 06, 2026 9:33 pm
Full name: Adam Twiss

Re: CODA now has a released page.

Post by adamtwiss »

chessica wrote: Sun Jul 12, 2026 6:05 pm now it works....only in console mode, in arena not
but the makefile was wrong. some errors.
Thanks we (or my good friend Claude :D) have fixed the Arena situation. Arena also adds quotes around the path it sends. Which Coda now handles and strips off properly. If you pull it should work in Arena now. LMK if it doesn't.

We've also updated the Makefile based upon your edit (using awk and not relying on GNU Sort, so it works in gitbash). Thanks for your input and happy testing!
sscg13
Posts: 25
Joined: Mon Apr 08, 2024 8:57 am
Full name: Chris Bao

Re: CODA now has a released page.

Post by sscg13 »

adamtwiss wrote: Sat Jul 11, 2026 10:17 pm Coda implements things that I beleve are both significant and novel. E.g. Xray threat features into the NNUE model, which were a > 100 Elo gain for us - that I don't believe any engine does. I feel it should be possible to close the Elo gap to the top engines in the near future, and create several new ideas along the way.
I am surprised this works, because past experiments have indicated to us that xray threats are very unlikely to be helpful.
urbanmusic
Posts: 12
Joined: Tue Dec 12, 2023 11:36 pm
Full name: Bruno Santos

Re: CODA now has a released page.

Post by urbanmusic »

Sylwy wrote: Sat Jul 11, 2026 4:37 pm technologies develop faster than communities can adapt
So does society. I think a lot of the confusion these days is related to that. We used to have one, maybe one and a half generations struggling to adapt to new realities. But change is so fast now that you get to see two , even three generations at times

That phrase is spot on.
User avatar
jasper.sinclair
Posts: 23
Joined: Fri Nov 17, 2023 2:50 am
Location: USA
Full name: Jasper Sinclair

Re: CODA now has a released page.

Post by jasper.sinclair »

chrisw wrote: Sun Jul 12, 2026 10:30 am All that Claude has done is to massively speed up the development cycle, it’s not doing anything new.
Cycle is, and everybody does it, scan GitHub etc for new source releases. Go through the code looking for what’s changed/ideas your own program lacked. Select the most promising (Elo) idea, code it, tune the weights (if any), test if better, keep idea or junk it. Repeat cycle.
Nothing new, nothing unlawful, just faster, more efficient and fully automatable.
The whingers are concentrating on one highly contentious position, that when Claude codes the idea it is using direct copy, a virtual cut and paste and is therefore code-stealing (or rape or plunder or whatever manically emotive word their brain emits). But this is nonsense, LLMs do not verbatim copy.
+1
Precisely...well said.

The whiners, (all of which are authors who created an engine based on open source ideas that came before them!), now protest?
How dare some machine intelligence scan their repo to get ideas!

Objecting strongly like this almost seems narcissist...
as if to say 'my' engine is unique and completely original, filled with incredible and unique secrets which I don't choose to share.
PS- my engine hasn't incorporated any ideas from engines that existed before!
Attention to me!

But as Chris states above, it's completely clear there's no verbatim code copying.
So what's the issue?
Why are the whiners publishing their code 'open source' if they don't want to openly share the ideas and techniques?
adamtwiss
Posts: 12
Joined: Mon Jul 06, 2026 9:33 pm
Full name: Adam Twiss

Re: CODA now has a released page.

Post by adamtwiss »

sscg13 wrote: Sun Jul 12, 2026 10:38 pm I am surprised this works, because past experiments have indicated to us that xray threats are very unlikely to be helpful.
It is suprisingly effective in Coda. About a month ago I did an ablation test. Taking a prod-like recipe model (at SB800, which is somewhat scaled down vs Coda prod) and trained with and without the xray features. Result here: https://ob.atwiss.com/test/2014/