PUZZLTHINK

DEV NOTE

Hit,Stay

Hit,Stay AI dev notes

All five AIs calculate at full strength. Only their temperament differs.

Hit,Stay is a five-player betting game: bring the sum of your number cards as close as you dare to the round’s limit (an eight-sided die, 5–12) without going over. The 35-card deck holds one 7, two 6s … seven 1s and seven −1s. You get three cards, show one, then bet → HIT or STAY → bet again → showdown.

It went live on the night of 24 November. Against the AI you sit with four AIs, and they have no difficulty levels: all compute the same thing, and each name has its own betting temperament. This note covers that calculation, those temperaments, and the tuning that made skill beat luck.

Play now

Published · 2026-11-26 · Last updated · 2026-11-27

What the AI knows

The comment at the top of the AI code says it uses only what that seat can see: its own cards, everyone’s face-up cards and the card counts. Other players’ hidden cards and the deck are pooled into "cards I cannot see".

Judging: play it out 360 times

Every AI decision comes from Monte Carlo simulation. It shuffles the unseen cards to fill everyone’s hidden cards, plays out the rest of the HIT/STAY step with a simple policy, and checks whether it wins the showdown — 360 times per decision. A shared first place counts as 1/(number tied).

In the simulation people follow a simple rule: draw if the expected value after one more card beats the current one. Value is the total if at or under the limit, and heavily marked down if over (a −1 can still rescue it). It assumes it needs a 0.15 edge to draw itself, others 0.35.

On a HIT/STAY turn it simulates "HIT now" and "STAY now" 360 times each and takes the side with the higher win chance.

Betting: the utility of chips

Bets are chosen by expected utility, valuing a stack of c chips as c to the power risk (risk < 1): losing chips hurts more than winning them helps, because a player at zero is out. Fold, call and every possible raise are scored as "win the pot or lose what I put in", and the best is played.

One correction: the simulation treats hidden cards as random, but a bet that has climbed toward the cap means someone has a good hand. So the win chance is marked down by up to 40% as the bet climbs. When weighing a big raise it assumes whoever calls it is strong, and marks down the same way.

Five temperaments

Never shown in the game. The calculation is the same; only how a win chance becomes an action differs.

AIFace-up cardTemperament
ZEROmiddle cardThe baseline. Average caution, 3% bluffs, only calls with 10% of strong hands.
LEOhighest cardAggressive. Less cautious, rates raises 6% better, 10% bluffs.
MOAmiddle cardCareful. The most cautious, never bluffs, hits slightly less.
LUNAmiddle cardGambler. The least cautious, 7% bluffs, hits slightly more.
KAIhighest or lowest (half and half)Trickster. 9% bluffs, only calls with 40% of strong hands to hide them.

A "bluff" is a small raise without the hand, so that not every raise reads as strength — made only when calling is about as good as folding or better.

The bug that made LUNA draw the whole deck

Fixed in the early hours after launch. LUNA added a fixed +0.02 to the HIT side, and in a lost hand (both HIT and STAY near 0) that 0.02 always won — so it drew until the deck ran out. The lean now scales with min(HIT, STAY, 1 − STAY): zero when the round is already lost or won, tipping only close calls. In simulation LUNA’s average went from 4.7 to 1.3 hits a round (maximum 29 → 9), in line with the others.

11/27: from five to ten — same calculation, different temperaments

On 27 November the AI grew to ten. All five betting games on the site (Black & White, Black & White II, Indian Poker, Two-Sided Poker, Hit,Stay) now share the same ten. The original five keep their names, colours and characters (LEO the Attacker, MOA the Careful One, LUNA the Bluffer, KAI the Trapper, ZERO the Calculator), joined by VEGA the Chaser, MIRO the Wildcard, DODAM the Grinder, HARU the Fast Starter and NOX the Closer.

  • Same calculation: all of them get the same win chance from 360 simulations. A temperament only changes caution (risk), the weight on raising, bluff and slow-play rates and a lean toward HIT.
  • Temperaments that move: the Chaser turns bold in the bottom half of the chip ranking and tight as the leader; the Fast Starter is bold until round 10, the Closer from round 13 (antes grow fast from round 17); the Wildcard draws a new temperament every decision.
  • A little different every match: a seed moves caution by ±4% and bluffing by ±20% per match, and 8% of decisions use the plain base.
  • Reading raises: the old AI read a bet near the cap as strength by the same 40% whoever raised. Now it counts whether the last raiser’s earlier raises won at the showdown and reads them 0.4–1.6× as strongly. Only public information is used (raises and shown hands).

In simulation (200 deals per decision for every seat alike), one personality against four of the old AIs took first place 16.7–24.3% of the time (20% = even, ±5 points noise), and in 700 tables of five random personalities 14.9–23.7%. DODAM the Grinder came out lowest in the league; its settings are close to the Calculator’s, so luck is a big part of that. One lesson on the way: personalities with a negative HIT lean (preferring STAY) kept losing, which means the shared estimate already leans slightly toward STAY, so the leans now stay within 0 to +0.015.

Letting skill beat luck: the ante curve

On 25 November match length and the share of luck were changed three times in a row.

  1. STEP 01

    At first: +1 every 10 rounds

    In self-play a match took a median of 51 rounds — far too long.

  2. STEP 02

    Fewer chips (reverted)

    Starting AI matches at 15 chips barely shortened them, because bets are capped at the smallest stack and shrink with it. Reverted six minutes later.

  3. STEP 03

    +5 every 3 rounds

    Raising the ante 1 → 6 → 11 cut the median to 14 rounds — but now the cards decided almost everything. In self-play a strong player won 31% of five-player tables, hardly above the 20% of pure luck.

  4. STEP 04

    Now: slow, then fast

    +1 every 2 rounds up to round 16 (1, 1, 2, 2 … 8), then +5 every 2 rounds (13, 13, 18 …), chosen by self-play over 16 schedules. A strong player wins about 42% of five-player tables; matches last about 24 rounds and rarely pass 38.

Real records

Signed-in players’ games against the AI as of 2026-11-26, 14:00 KST.

Final placeMatchesShare
1st13048.0%
2nd5219.2%
3rd3412.5%
4th2710.0%
5th2810.3%

Pure luck would give a human 20% first places against four AIs; over these 271 matches it was 48.0%. An AI match averaged 25.3 rounds. The records span all three ante curves and are not split by curve. Counting everyone, the game had been played 1,201 times (657 against the AI).

Gaps a human can use

The face-up card gives the temperament away

LEO always shows its highest card, KAI its highest or lowest, the rest a middle card. If LEO shows a low card, the other two are low too.

Big bets make it doubt

The AI marks its win chance down as the bet nears the cap (up to 40%). Bet big when you are sure and it is more likely to fold — and a big bet works as a bluff for the same reason.

Its imagined opponents are simple

The AI assumes everyone hits by expected value only. If you stay on a low total or hit on a high one on purpose, it misreads your hand.

It fears elimination

The fewer chips it has, the more careful the utility curve makes it. Pressure a short-stacked AI and it folds even good hands.

Where this comes from

This note is written only from the code, the commit history and the aggregate numbers below.

  • `src/lib/hitStay.ts` — rules, hsAnte, HS_PERSONA, STYLE, unseen, wantsHit, winChance, chooseHsAction
  • Commits e7313d8 (11/24 Hit,Stay), 250af41 (11/25 records and rankings), f5ae749 (11/25 LUNA HIT bug), 1a68974 and 00b1494 (11/25 15-chip try and revert, +5 every 3 rounds), cd19fec (11/25 the current ante curve)
  • DB aggregates (2026-11-26 14:22 KST): game_results (game = hit_stay, mode = ai) final-place distribution and average rounds, game_plays_daily totals

Read next

  • How the Wallgo AI plays

    From a reach-first territory estimate to alpha-beta with a transposition table: what each Wallgo AI level computes, and where it is weak.

  • 12 Janggi AI dev notes

    Why a 7-ply Hard was almost unbeatable and went down to 5, the no-third-repetition ban, and a Very Hard that reads 13–19 plies.

  • Russian Janggi AI dev notes

    Even the Very Hard engine that reads to the end must lose to a first-move large cup in the centre — and how that shaped the AI and its win rate.

All dev notes →