State
- Round
- Chips
- Score
- Streak
- Next house
- Busts
Seed
Your move
Each die costs one chip. Resting wins four chips back and resets the streak. Two or more ones in a roll of two or more dice is a bust. Keys: 1 to 5 roll, R rests, U undoes.
Run file
- Inputs hash
- State hash
Log
Replay a run file
Batch
Plays many runs with one fixed policy, in a Web Worker, and shows how the final scores spread. The policy rolls the chosen number of dice whenever the chips allow and rests otherwise.
How it works
Every rule lives in a small TypeScript core with no dependencies. The core takes a state and one input and returns the next state. The randomness for that step is derived from the seed and the step number, so the state holds no random generator, and replaying the same seed and inputs rebuilds the same state, byte for byte.
The dice and the house mood draw from separate streams. Rolling five dice instead of one does not change the next house mood. Points are an integer formula with one rounding at the end: the sum of the dice, times the combination, times the streak, times the house.
Export run saves the seed, the ruleset version and the inputs, with two SHA-256 hashes: one of the record and one of the final state. Replaying a file recomputes both. If someone edits an input, the inputs hash no longer matches; if the rules changed since the file was saved, the state hash no longer matches.
The batch tab plays up to 10,000 runs in a Web Worker and reports integer statistics. The same form gives the same report hash on any machine.
Everything runs in this tab, offline once the page has loaded. The code is at github.com/Fedemedinilla/applied-ai-toolkit, next to the core library.