Stop Fighting Biased RNG.
Make Every Roll Fair.
ZPL is a mathematical API that takes any biased probability and returns a perfectly balanced output — every time, guaranteed.
What is RNG?
RNG stands for Random Number Generator. In games, every coin flip, dice roll, loot box, critical hit, and procedurally generated dungeon depends on RNG.
When you call Math.random() in JavaScript or Random.Range() in Unity, you get a number between 0 and 1. If it's below your threshold → the event happens.
// Classic RNG in games const dropChance = 0.05; // 5% chance function rollLoot() { return Math.random() < dropChance; // true = item drops } // Problem: what if dropChance gets manipulated? // Or what if a player's "luck" stat pushes it to 0.90? // Now your game economy is broken.
What is PRNG — and why is it a problem?
Almost every game uses a PRNG — Pseudo-Random Number Generator. It's not truly random. It uses a mathematical formula starting from a seed to generate numbers that look random.
But even without hacking, PRNG has another problem: bias.
// "Luck" stat — seems fair, but breaks your game economy function lootWithLuck(playerLuck) { // playerLuck ranges 0.0 (unlucky) to 1.0 (max luck) const baseChance = 0.05; const actualChance = baseChance + (playerLuck * 0.85); // Player with max luck: 0.05 + 0.85 = 0.90 drop rate! // Rare items become common → economy collapses return Math.random() < actualChance; }
Biased RNG destroys game balance
Every time you add complexity to your random system — luck stats, pity mechanics, difficulty scaling, seasonal bonuses — you introduce bias. The output is no longer fair.
What is ZPL?
Zero Point Logic is a deterministic mathematical system that takes any biased input probability and returns an output with AIN = 1.0 — perfect equilibrium (p ≈ 0.5).
It doesn't use PRNG. It doesn't need a seed. It uses a matrix-based boolean operator system that mathematically neutralizes any bias. The result is always the same: fair.
bias = 0.9 (90%)
matrix equilibrium
mean ≈ 0.5000
"ain": 1.0, // AIN score: 1.0 = perfect equilibrium (always)
"mean": 0.5001, // Output mean: always ~0.5 regardless of input
"std": 0.2887, // Standard deviation
"status": "STABLE" // Equilibrium confirmed
}
The key field is mean. Use it instead of Math.random() for fair rolls. AIN = 1.0 means the system is in perfect balance.
Where to use ZPL in your game
Replace Math.random() with ZPL in 5 lines
Instead of calling Math.random() directly, send the bias to ZPL and use the returned mean for your roll.
// BEFORE: biased, unfair function lootDrop(playerLuck) { return Math.random() < playerLuck; // max luck = almost always drops } // AFTER: ZPL-powered, always fair async function lootDrop(playerLuck) { const r = await fetch('https://zpl-backend.onrender.com/compute', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Api-Key': 'zpl_your_key' }, body: JSON.stringify({ bias: playerLuck, N: 9, samples: 500 }) }); const { mean } = await r.json(); return Math.random() < mean; // mean ≈ 0.5 always → fair drop } // playerLuck=0.01 → mean≈0.5 ✓ // playerLuck=0.99 → mean≈0.5 ✓ // playerLuck=0.50 → mean≈0.5 ✓
Pick your engine
Ready-to-paste code for every major game engine: