Documentation
DiceSim developer docs
Lua reference
Every global, function and rule of the strategy sandbox, with minimal examples, plus the provably-fair roll algorithm step by step.
Agent API
API keys, compute credits, the four agent endpoints with validated request/response examples, and a complete autonomous tuning loop.
Calculator formulas
Payout, loss-streak probability, bankroll requirement, max survivable streak and risk of ruin: the seven formulas behind the calculator.
Free scripts
Ready-to-run Lua dice bot scripts for all 11 built-in templates, from Martingale and Paroli to D'Alembert and Labouchere.
OpenAPI / Swagger UI
Interactive reference for the whole REST API (auth, strategies, simulations, leaderboard, marketplace, agent).
60-second quickstart
- Open the simulator. It loads a template; Basic Martingale 49.5% is a good first read.
- Set your bankroll, win chance and seeds in the config panel. Anonymous sessions can run up to
100,000rolls per batch; a free account raises that to10,000,000. - Press Start. The engine calls your
dobet()after every roll and streams balance, bet size and drawdown to the chart. - Log the run to get a share card, submit it to the leaderboard, or sell it on the marketplace as a black box. Buyers see the statistics but never your source.
chance = 49.5 -- win probability in percent (payout = 99 / chance = 2x at 1% edge)
basebet = balance / 1000
nextbet = basebet
function dobet() -- called after EVERY roll
if win then
nextbet = basebet
else
nextbet = previousbet * 2
end
endThree things to know before you start
Provably fair, reproducible
Rolls come from HMAC-SHA512(serverSeed, clientSeed:nonce:cursor). The same seeds always give the same rolls, so you can replay any run exactly, here or against a casino's published seeds.
Your code stays yours
Lua runs in a Web Worker in your tab. Saved strategies are encrypted at rest and the API strips luaCode from every public response: leaderboards, profiles, share cards, marketplace listings.
The house edge always applies
No progression changes the expected value of a negative-edge game. DiceSim shows you how fast, how hard and how often a strategy loses before money is involved.