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:
- The v2 score's choice loses 64 cp on average, against 80 for the v1 formula and 352 for a random move.
- Scoring only the scan's eight candidates, it loses 66 cp, and 62 cp with the safety check.
- Stockfish searching one ply loses 44 cp and four plies 29 cp on the same positions.
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:
- Information. The number of safe moves a move leaves the opponent was the second term selected, after material.
- Entropy. The entropy of the formula's own move distribution flags critical positions with AUC 0.81.
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
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):
| Term | Points | Ask yourself |
|---|---|---|
| Material after exchanges | +115 | What do I win (or lose) once every capture sequence is played out? (pawns) |
| Opponent's safe moves | −2 | How many safe moves does the opponent have after my move? (fewer is better) |
| Δ Knight on the rim | −30 | Change caused by the move: does a knight go to (or leave) the edge of the board? |
| Their checks | −50 | How much worse is it if they first play their best check? (pawns) |
| Δ Rook mobility | +4 | Change caused by the move: how many safe squares do my rooks gain (open lines)? |
| Recapture | +130 | Do I take back on the square they just captured on? |
| Capture | +5 | What does the move capture? |
| Opponent's forcing moves | −11 | How many checks and captures does the opponent have? |
| Δ Knight in the centre | +35 | Change caused by the move: does a knight reach (or leave) the central 16 squares? |
| Castling | +135 | Do I castle? |
| Develops a minor piece | +45 | Does 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
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):
- Bishop pair: 133 / -30.
- King stuck in the centre: -71.
- Each safe knight square: 10 / 14.
- Connected passed pawn: 28 / 43.
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).

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.

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,
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.

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.
| k | Term added | CV win-% lost |
|---|---|---|
| 1 | Material after exchanges | 7.497 |
| 2 | Opponent's safe moves | 6.020 |
| 3 | Δ Knight on the rim | 5.616 |
| 4 | Their checks | 5.343 |
| 5 | Development | 5.136 |
| 6 | Δ Rook mobility | 5.042 |
| 7 | Recapture | 4.980 |
| 8 | Develops a minor piece | 4.920 |
| 9 | Capture | 4.895 |
| 10 | Opponent's forcing moves | 4.877 |
| 11 | Δ Knight in the centre | 4.825 |
| 12 | Δ Pieces attacked by cheaper ones | 4.749 |
| 13 | Δ Isolated pawns | 4.714 |
| 14 | Δ Open files at my king | 4.705 |

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 by | Mean loss | Median | ≤ 50 cp | > 100 cp | Blunder | = SF #1 |
|---|---|---|---|---|---|---|
| Random legal move | 352 | 290 | 30% | 59% | 47.6% | 6% |
| Scan points alone | 129 | 25 | 62% | 28% | 18.9% | 29% |
| Viveka v1 (first edition) | 80 | 17 | 70% | 19% | 10.7% | 31% |
| Viveka v2 score, all moves | 64 | 10 | 74% | 16% | 8.4% | 35% |
| Viveka v2: scan 8, then score | 66 | 10 | 74% | 16% | 8.6% | 35% |
| v2 terms, unrounded | 65 | 10 | 74% | 16% | 8.5% | 35% |
| All tested terms (linear ceiling) | 60 | 7 | 76% | 15% | 7.7% | 37% |
| Stockfish depth 1 (machine) | 44 | 2 | 84% | 10% | 4.9% | 46% |
| Stockfish depth 4 (machine) | 29 | 1 | 90% | 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%.

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 size | Stockfish depth 4 | Viveka v1 | Viveka v2 |
|---|---|---|---|
| 0–30 cp | 3.5 | 3.6 | 3.6 |
| 30–100 cp | 5.2 | 12.1 | 10.2 |
| 100–300 cp | 5.9 | 19.9 | 17.1 |
| 300+ cp | 14.8 | 44.2 | 33.5 |
Of v2's errors over 100 cp (16% of positions):
- 51% follow a quiet engine move;
- 32% walk into a forcing reply;
- 9% miss a forcing win;
- 8% are sharp both ways.
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.

9. Tested and rejected
- Learned evaluation at the leaves. Choosing moves by "play it, resolve the exchanges, evaluate with the 41-term evaluation" was worse than the counting score on the same positions (75 cp against 68 cp on a v1 test sample).
- Two-move look-ahead with the same formula (value = V(m) − λ·Vopponent(best reply)): 66 cp without it, 67 cp with λ chosen out of sample, on 290 training positions. No gain.
- Trapped-piece and king-net glances (escape squares of the moved piece, king flight squares, queen raids) were in the selection pool. Their contribution was below the inclusion threshold.
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