Blog

One human reply ahead: how Feint chooses a move

In this article
  1. Separating Likelihood from Strength
  2. How Likely Is the Mistake?
  3. The browser has a time budget
  4. The Balance between Temptation and Risk
  5. Measuring What Actually Improves Play

An engine prefers one move by a fraction of a pawn. Another move gives your opponent a choice that looks much easier than it is.

Which would you play?

To answer that, we need to know two things: how good each reply is objectively, and which reply a person is actually likely to play. Stockfish Lite scores the positions; our Chessformer model predicts the human replies. Feint blends both within the limits of the chosen strength setting.

The trick is in how the two systems meet. Even an accurate human-move predictor will produce bad games if the move selector uses it naively.

Feint Chess uses what we call S1-style scoring: it predicts the possible human replies one move ahead after each candidate move, while letting the engine search many plies deeper from the resulting positions.

Stockfish proposes and evaluates moves; Chessformer predicts replies after each candidate; bounded reply loss contributes to the final move distribution.
The two probability distributions have different jobs: predicting the human's reply, and sampling Feint's own move.

Separating Likelihood from Strength

Quiet knight moves and queen trades ask completely different questions of your opponent. That’s why we run a fresh prediction after every candidate move rather than reusing a single forecast. For each move, we separate how likely a human reply is from how strong it is objectively.

Let ss be the current game state and recent board history. An AI candidate move aa leads to sas_a, and a human reply bb to sabs_{ab}. Given the legal reply set L(sa)\mathcal L(s_a) and the available player and game context cc, we write the human policy as

p(b∣sa,c),∑b∈L(sa)p(b∣sa,c)=1.p(b\mid s_a,c),\qquad \sum_{b\in\mathcal L(s_a)}p(b\mid s_a,c)=1.

Because a trap that tempts a casual player may be obvious to a stronger one, Feint supplies the player context cc by blending predictions across several assumed rating bands and adjusting their weights as you play. These weights help predict your replies; they don’t tell us your actual Elo or why you chose a move.

For the value side, Stockfish estimates the position after each human reply in pawns from the human's perspective. Comparing any reply bb against the human's best available move gives the reply loss L(sa,b)L(s_a,b)—how much that specific choice costs the player.

Everything here is measured in pawns, not win probability. A one-pawn loss doesn't necessarily mean losing a pawn—it might just mean an exposed king or a worse endgame.

How Likely Is the Mistake?

A spectacular mistake with a tiny predicted probability contributes little. A modest mistake that appears likely can contribute more. This is where the probability model earns its place: an attractive line must be attractive to the player being modelled, not merely available on the board.

Multiplying each reply's probability by its pawn loss gives the expected reply loss R(a)R(a)—the gap between the human's best reply and the average reply we expect them to play:

R(a)=∑b∈L(sa)p(b∣sa,c)L(sa,b).R(a)=\sum_{b\in\mathcal L(s_a)}p(b\mid s_a,c)L(s_a,b).

Let's put simple numbers on this. Suppose candidates A and B are both sound enough to pass our safety checks, and each allows just three legal replies:

Candidate Possible reply Predicted probability Human loss in pawns
A: quiet Strong reply 70% 0.0
A: quiet Slight inaccuracy 20% 0.2
A: quiet Larger mistake 10% 0.6
B: tempting Take the offer 50% 1.4
B: tempting Decline correctly 35% 0.0
B: tempting Another reply 15% 0.4

Then

R(A)=0.70(0)+0.20(0.2)+0.10(0.6)=0.10,R(A)=0.70(0)+0.20(0.2)+0.10(0.6)=0.10,
R(B)=0.50(1.4)+0.35(0)+0.15(0.4)=0.76.R(B)=0.50(1.4)+0.35(0)+0.15(0.4)=0.76.

Let Vh(a)V_h(a) be Stockfish's human-perspective value for candidate aa. Suppose Vh(A)=−0.60V_h(A)=-0.60 and Vh(B)=−0.45V_h(B)=-0.45. A is objectively better for Feint by 0.15 pawns. In a simplified score −Vh(a)+0.4R(a)-V_h(a)+0.4R(a), however,

S(A)=0.640,S(B)=0.754.S(A)=0.640,\qquad S(B)=0.754.

B moves ahead. Feint accepts a 0.15-pawn objective cost for a trap the reply model thinks might work. If the player sees through it, Feint may have to pay for that: the model has placed a bet, not found a free advantage.

Illustrative probabilities and loss contributions for quiet candidate A and tempting candidate B. Expected reply losses are 0.10 and 0.76 pawns.
The arithmetic above is fully illustrative; it is not evidence that a particular move will fool a player.

The browser has a time budget

In a live game, we don't have time to search every legal reply before the player gets tired of waiting.

So Stockfish evaluates an initial batch of replies, and Feint spends any remaining search time on missing replies that the human model thinks are likely. Those replies get priority, though the model can still be wrong.

When we only evaluate part of the tree, each reply keeps its original probability. Say the moves we've searched cover 60% of the predicted probability mass. We leave that at 60%. Rescaling it to 100% would overstate the value of a partially searched trap. If the optional reply analysis fails or exceeds its overall time budget, Feint drops the reply reward for all candidates. Otherwise, the first few candidates would get an unfair boost.

The Balance between Temptation and Risk

The objective checks come first. A tempting reply cannot rescue a candidate the engine checks have already rejected.

For moves that pass those safety checks, Feint combines the expected reply loss with objective position value, position complexity, and blunder risk. Strength controls search depth and which moves are eligible, while Trickiness scales how heavily the reply reward is weighted. When Feint considers itself decisively ahead, it switches this extra reward off and concentrates on converting the advantage.

The risk allowance also depends on the position. At the lowest setting, Feint can concede up to 3.0 pawns when level or ahead, tapering down to 1.5 pawns once the player is up by 3.0. We tighten the limit when Feint is losing because engine evaluations flatten out in lost positions—where blundering a queen might barely move the score. Shrinking the allowance limits reckless giveaways.

Scoring the candidates still leaves the final choice of move. Softmax converts the scores into probabilities, with temperature controlling how strongly Feint favours the top score. Feint applies its probability limits, then samples a move. That means B can outscore A in our example, yet A still gets played.

This is Feint's own move distribution. The earlier pp predicts the human's reply. One forecasts your choice; the other governs the computer's choice. Both are recorded for the Reveal.

Measuring What Actually Improves Play

There are several ways this can disappoint us. The predictor may overestimate a tempting mistake. The engine may underestimate its cost. A safe selector may leave too little room for prediction to change anything. Or the changed moves may be perfectly reasonable and simply less enjoyable.

A useful comparison holds the openings, colours and other settings fixed, then enables and disables the reply reward. Human play is needed to learn whether the opponent becomes more enjoyable; engine match scores answer another question.

Even a brilliant-looking sacrifice needs scrutiny: the engine might have played the exact same move with the reply reward switched off. Our decision logs help separate a good chess story from evidence that the predictor influenced the choice.