Skip to content

Tetrarch v7

Latest

Choose a tag to compare

@IchNukeDichWeg IchNukeDichWeg released this 02 Aug 20:26

v7 -- net v5, and the engine got 2.4x faster. Two independent gains in one
release, and the speed is by far the larger of them.

Elo   | +63.37 +- 4.68 (95%)   lazy accumulator perspectives
      |  +7.78 +- 4.61 (95%)   net v5, vs net v4
SPRT  | none -- sprt.py not built yet; fixed-N campaign
Conf  | FIXED TIME movetime 200, classic/Teams, 105 workers
Games | 19,999 and 20,000 respectively, 4-game seat rotation
Base  | vs v6 for the net; vs the v7 tree for the accumulator
Bench | 704,240 search nodes, 1,819,341 nps (M2 Pro, depth 7)
Note  | the bench now measures the SEARCH. v6's 93,846,865 was perft, which
      | cannot see the evaluation at all and never moved when a net loaded.

The speed is worth eight times the net

Net v5 is a whole generation of self-play: 125,000 games at 7,500 nodes with
net v4 teaching. It is worth +7.78 +- 4.61. One afternoon of profiling is
worth +63.37 +- 4.68.

The exchange rate that falls out is roughly +115 Elo per doubling of search
speed, well above the +50 to +70 a two-player engine expects. A 10% speedup is
about +15 Elo here, which is twice what generation 5 bought for hours of
many-core time.

Three speed changes, none of which can alter a single move:

  • Lazy accumulator perspectives, +59.8% NPS. All four perspective
    accumulators were maintained on every make and unmake; an evaluation reads
    one. Toggles are now queued per perspective and cancel on unwind, so
    descending into a subtree and coming back out costs no arithmetic at all for
    a perspective nobody evaluated.
  • int8 SIMD for the propagation, +23.5% NPS. crelu already bounded every
    activation to [0,127], so the whole propagation fit in int8 and was being
    carried in int32.
  • Pins computed once per node, +3.9% NPS, so a move that cannot expose its
    own king skips the attack scan.

Found by profiling the real thing, not by timing components

bench.py --profile said the evaluation was 26.7% of a node and the
accumulator about 8%. Sampling the running search said 3.1% and 23.3%. Timing
a component by running it on one position hundreds of thousands of times keeps
the same few rows of a 2 MB table resident, and a real search does not. The
isolation method did not merely have wide error bars, it inverted the ranking,
and the first fix attempted on its advice was 4% slower.

Also in this release

  • Repetition detection. A position the search is walking into that has
    already occurred scores 0 rather than being evaluated as new. Neutral at both
    instruments and kept anyway: scoring a draw as a draw is a rules gap, not a
    tuning choice, and the record says so rather than dressing it up.
  • [StartFen4 "4PC"] is read as the modern start.

On the numbers being small

A partial run of the net v5 A/B read -2.87 +- 14.42 over 2,017 games and was
written up here as a null result. It was not one: the full 20,000 games put it
at +10.50, inside that same interval. An interval running from -18 to +13 means
the instrument cannot see the effect, which is not the same as the effect being
absent.

Full record, including that retraction and every rejection:
docs/AB.md

git clone https://github.com/IchNukeDichWeg/Tetrarch && cd Tetrarch && ./setup.sh