Hi,
I've been working on my UCI engine in Rust called Luna ( https://github.com/Spunc595/Luna-Chess-Engine ).
It plays on Lichess as a bot and it's around 2600-2650 in blitz and rapid on Lichess. I test with cutechess SPRT on UHO_4060_v4, so I try not to trust single results.
The net is 768x4 (mirrored king buckets) into 1024 neurons per side, SCReLU, one output. I trained it with a CPU fork of bullet on about 1B positions (Lc0 data converted by Linrock) for 8 epochs. There's also a material based scale applied after the net. The architecture and the starting inference code come from Akimbo, I only trained the weights.
Now I'd like to add output buckets, probably 8 selected by piece count. I found gains between +6 and +20 Elo but from different engines. Does it still help when I already have a material scale after the net, or does it mostly overlap? And is it ok to start from the old net by copying the output weights into every bucket and keep training, or does that bias the test?
Second thing: SMP.
On my 4 core ARM machine NPS scales nicely (about 1.9x per doubling), but 4 threads vs 2 gave only about +15 Elo in 2100 games at 10+0.1 (one game at a time, no ponder) the SPRT stopped there, so it's probably a bit optimistic. Is that normal for a simple lazy SMP at such a short TC? What usually makes the difference?
Last one: threat inputs.
I saw they went into Stockfish 18, but I read different things about the speed cost and about ARM vs x86. With a small single layer net, is it worth the work?
If it helps: some speed work gave about 4%, a time management change looked like +9 Elo at 10+0.1, and a pruning idea using TT scores turned out negative (about -9).
Thanks for any advice.
Output buckets, SMP scaling and threat inputs (Rust engine)
Moderator: Ras
-
Spunc595
- Posts: 49
- Joined: Mon Jul 06, 2026 12:15 am
- Full name: Daniele Marpino
-
jdart
- Posts: 4449
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Output buckets, SMP scaling and threat inputs (Rust engine)
Output buckets are a standard technique, pretty much every engine uses them. They allow for finer adjustments than material scaling along can do. I would think it would be ok to start by seeding those buckets with identical data from your current net. Anyway, you could try that.
Note that 1B training positions is not really a lot. You may need more, particularly as you add more neurons to the network.
Re SMP, I don't customarily run SPRT with multiple threads, so I can't comment much on that. It does seem though, looking at the CEGT results, that 4CPU ratings versus 1CPU show a fairly modest gain.
Threat and pawn-pair features were recently added to Arasan, and there was a pretty good ELO gain from that. But I am doing that on top of a multi-layer network. Adding these features costs NPS, but overall there is a performance gain. Still, you need to take care to optimize inference speed as much as possible. ARM speed is not an issue, in my experience, if the MATMUL_INT8 or DOTPROD features are available.
Note that 1B training positions is not really a lot. You may need more, particularly as you add more neurons to the network.
Re SMP, I don't customarily run SPRT with multiple threads, so I can't comment much on that. It does seem though, looking at the CEGT results, that 4CPU ratings versus 1CPU show a fairly modest gain.
Threat and pawn-pair features were recently added to Arasan, and there was a pretty good ELO gain from that. But I am doing that on top of a multi-layer network. Adding these features costs NPS, but overall there is a performance gain. Still, you need to take care to optimize inference speed as much as possible. ARM speed is not an issue, in my experience, if the MATMUL_INT8 or DOTPROD features are available.