♞Kuikma
Archived version (v2.0, second edition). Shelved because the scan (12 patterns) and the score (11 terms) grew beyond what a player can compute in their head. Superseded by the current version, which limits each step to three variables. Kept unchanged for the record.

Research · Viveka v2.0

Viveka v2: find the candidates, rank them, check them

Sigmoid Vedanta Technologies · October 2026 · Supersedes v1.0 (archived) · Companion to the book (2nd edition) and the calculator

Abstract

Viveka v1 scored every legal move with six terms. v2 splits the decision into two prongs, as strong players do. A scan of glance-level patterns lists the candidates. A score, computed only for those candidates, ranks them. A safety check then examines the opponent's forcing replies. All weights were fitted to Stockfish 19 on 19,007 engine positions: every legal move at depth 15, plus the stored depth-22 analysis of the engine's top three moves. Human games are no longer used.

On 5,949 positions from 21 openings never used in fitting, with the best move defined at depth 22:

We set out to reach the four-ply level and did not. The gap is almost entirely a small tail of deep tactical errors (Section 8). Two new dimensions are reported as findings in their own right:

1. Data: engine positions only

The 19,070 positions of the Kuikma library come from Stockfish self-play in 63 openings. The same 21 openings as in v1 are held out (5,949 positions). Every legal move was scored at depth 15 (MultiPV = all moves, one thread). 99.4% of positions reached depth 15 on every line; the remaining 106, capped at two minutes each, reached depth 11 to 14. The engine's top three moves keep their stored depth-22 scores. Any other move keeps its depth-15 score, capped just below the depth-22 third choice, because at depth 22 it ranked below all three. The hybrid label of a move m is therefore

s(m) = s22(m) if m ∈ top322, otherwise min(s15(m), mintop3 s22 − 1)
(1)

and the loss of a choice is ℓ(m) = max s − s(m), capped at 1,000 cp. Human games were dropped from both training and testing: grandmaster moves contain mistakes, so they are not an answer key.

2. The method: scan, score, check

Prong 1, scan. Each legal move gets scan points from glance-level patterns (captures, recaptures, rescues, checks, centre pawns, development, defending, new targets, centralisation), minus points for landing where it can simply be taken or for leaving another piece loose. The top 8 are the candidates. Fitted to put the depth-22 best move on the list, the scan contains it in 73% of unseen positions with K = 8, and one of the engine's top three in 93%. A random list of eight manages 32%.

Prong 2, score. For each candidate, V = Σ wi·xi with these integer weights (1 pawn = 100 points):

TermPointsAsk yourself
Material after exchanges+115What do I win (or lose) once every capture sequence is played out? (pawns)
Opponent's safe moves−2How many safe moves does the opponent have after my move? (fewer is better)
Δ Knight on the rim−30Change caused by the move: does a knight go to (or leave) the edge of the board?
Their checks−50How much worse is it if they first play their best check? (pawns)
Δ Rook mobility+4Change caused by the move: how many safe squares do my rooks gain (open lines)?
Recapture+130Do I take back on the square they just captured on?
Capture+5What does the move capture?
Opponent's forcing moves−11How many checks and captures does the opponent have?
Δ Knight in the centre+35Change caused by the move: does a knight reach (or leave) the central 16 squares?
Castling+135Do I castle?
Develops a minor piece+45Does a knight or bishop leave its starting square?

The material term is now the full exchange outcome xq: a quiescence search over captures on every square, which either side may stop. v1 counted one square. The change matters most when a move leaves two pieces loose.

Check. For a candidate m, let F be the opponent's forcing replies: captures, checks, and threats (moves after which they could win material by an exchange if we passed). Then

safe(m) = min( xq(m), minr∈F maxa material after r, a and exchanges ),   drop(m) = xq(m) − safe(m)
(2)

and the final choice maximises V(m) − β·100·drop(m), with β chosen on the training openings (β = 0.5).

3. Positional values from 239k depth-22 positions

To give the method better positional knowledge we walked every stored depth-22 principal variation (up to 12 plies) and kept quiet positions: no check, and no capture that wins material. That gives 1,62,775 training and 76,986 test positions with depth-22 values. A tapered linear evaluation was fitted by minimising the squared error in winning chances (Texel tuning): 41 interpretable features, each with a middlegame and an endgame weight. On held-out openings it explains 62% of the variance, against 53% for material 1/3/3/5/9. In the opening the gap is wider: 48% against 28%.

Selected values (centipawns, middlegame / endgame):

These values informed the positional change terms di(m) = fi(after m and the exchanges) − fi(before). Used directly as a move evaluator, though, the 41-term evaluation chose worse moves than the counting score (Section 9).

Figure 1. Piece values re-estimated from Stockfish evaluations, by phase (unchanged from v1).
Figure 1. Piece values re-estimated from Stockfish evaluations, by phase (unchanged from v1).

4. Time evolution

Forward. For each position we followed the engine's best line and its third line for eight plies and compared them from the mover's side. Where the choice matters (best ≥ 50 cp better than third), the best move immediately takes away 2.2 of the opponent's legal moves and gains 1.9 squares of mobility and 0.9 of space. The edge persists over the following plies while material accumulates (Figure 2).

Backward. We also computed what the opponent's last move changed: newly attacked pieces, and whether a candidate answers that threat or captures the piece that just moved. These terms came close in selection but were not chosen on their own. Recapture, a time-linked pattern, was.

Figure 2. Best line minus third line, from the mover's side, ply by ply.
Figure 2. Best line minus third line, from the mover's side, ply by ply.

5. Information and entropy

Two information measures were tested. The first is the number of safe moves the opponent has after our move. It was the second term selected, after material, and cut the cross-validated loss by more than any second term in v1. The second is the entropy of the formula's own move distribution,

H(P) = − Σm p(m) log2 p(m),   p(m) ∝ ew·x(m)
(3)

which correlates with the engine's own entropy (Spearman 0.60) and flags critical positions (best move ≥ 1 pawn better than the second) with AUC 0.81. In the lowest-entropy fifth of positions 32% are critical; in the highest, 1.8%. At the board the simpler proxy is the margin between the best and second candidate: a large margin means a critical position, so calculate.

Figure 3. Share of critical positions by the formula's entropy.
Figure 3. Share of critical positions by the formula's entropy.

6. Fitting and selection

As in v1, weights come from a conditional logit over each position's legal moves, with soft targets e(W(m)−max W)/3 in winning-chance units. Terms were added greedily under 5-fold cross-validation with openings held out together, from a pool of 100+ candidates. We kept the smallest set within 3% of the best score on the path, then rounded the weights on a 1-pawn = 100-points scale.

kTerm addedCV win-% lost
1Material after exchanges7.497
2Opponent's safe moves6.020
3Δ Knight on the rim5.616
4Their checks5.343
5Development5.136
6Δ Rook mobility5.042
7Recapture4.980
8Develops a minor piece4.920
9Capture4.895
10Opponent's forcing moves4.877
11Δ Knight in the centre4.825
12Δ Pieces attacked by cheaper ones4.749
13Δ Isolated pawns4.714
14Δ Open files at my king4.705
Figure 4. Cross-validated loss against the number of terms.
Figure 4. Cross-validated loss against the number of terms.

7. Results

Held-out openings (5,949 positions), best move at depth 22. "Blunder" means a drop of at least 15 winning-chance points.

Move chosen byMean lossMedian≤ 50 cp> 100 cpBlunder= SF #1
Random legal move35229030%59%47.6%6%
Scan points alone1292562%28%18.9%29%
Viveka v1 (first edition)801770%19%10.7%31%
Viveka v2 score, all moves641074%16%8.4%35%
Viveka v2: scan 8, then score661074%16%8.6%35%
v2 terms, unrounded651074%16%8.5%35%
All tested terms (linear ceiling)60776%15%7.7%37%
Stockfish depth 1 (machine)44284%10%4.9%46%
Stockfish depth 4 (machine)29190%6%2.6%51%

Adding the safety check to the eight candidates moves the mean loss from 66 to 62 cp. Errors over 100 cp go from 16% to 16%, and errors over 300 cp from 6.4% to 5.8%.

Figure 5. Average loss of the chosen move on held-out openings.
Figure 5. Average loss of the chosen move on held-out openings.

8. The tail: where the method stops

The average is driven by rare large errors. Contribution of each error size to the mean loss (cp):

Error sizeStockfish depth 4Viveka v1Viveka v2
0–30 cp3.53.63.6
30–100 cp5.212.110.2
100–300 cp5.919.917.1
300+ cp14.844.233.5

Of v2's errors over 100 cp (16% of positions):

Inspection of the worst ones shows two recurring shapes. The first is a piece that grabs material and is trapped two or three moves later (the poisoned-pawn pattern). The second is a quiet move that lets a mating net close. Neither is visible to any counting rule or to a two-ply forcing check. A player needs calculation, which a shallow engine supplies, and the entropy signal tells the player when to calculate.

Figure 6. Contribution of each error size to the average loss.
Figure 6. Contribution of each error size to the average loss.

9. Tested and rejected

10. Reproducibility and versions

The pipeline is Python with fixed seeds: depth-15 labelling, depth-22 hybrid labels, the positional dataset, the candidate scan, the move features (exchange search, time, information, danger), selection and fitting, the safety check and the book build. The site's calculator uses a TypeScript port of the same definitions, parity-tested against the Python code. v1.0 and its first-edition book are archived unchanged at /research/viveka/v1. Code and data are available to researchers on request (sigmoidvedantatechnologies@gmail.com).

Try the scan and score on any position, drill it daily, or read the second edition with 100 worked positions.

CalculatorThe book