The game uses a pseudorandom number generator for deterministic randomness purposes, such as the result of casting spells in the Grimoire and the type of sugar lumps. Therefore, two games with the same seed would behave in the same way (getting the same Force the Hand of Fate outcomes for example).
Every run of Cookie Clicker has a unique seed, stored in Game.seed. This seed is five lowercase letters. The seed can only be changed by ascending, hard resetting or manually editing it in the console.
Use of randomness in the Grimoire mini-game
The Grimoire minigame makes use of randomness in predictable ways. When a spell is cast, to determine if the spell should fail or not, the RNG is seeded with Game.seed, appended with the char '/', then appended with the total number of spells cast. For instance, if your seed is 'okvcd' and you've cast 64 spells across all runs, then the RNG is seeded with the string 'okvcd/64'. After the RNG is seeded, it calls a number, and if this number is less than the success chance (1 minus fail chance), the spell succeeds. This means that the outcome of spells is completely predictable, provided you know your seed.
This can be further abused for getting great combos.
Click Frenzy strategy
- Wait for the game to save, then cast the Force the Hand of Fate.
- If the result was not Click Frenzy (it either backfired or had different effect, such as "Lucky!"), reload the page and cast a different cheap spell (Gambler's Fever Dream for example). Save the game, wait for magic to replenish.
- Note: Gambler's Fever Dream could cast Force the Hand of Fate and result in Click Frenzy.
- Repeat steps 1 and 2 until you get Click Frenzy from the Force the Hand of Fate spell. Then reload the page.
- Don't cast any other spells (to preserve deterministic randomness).
- Wait for a Golden Cookie with Frenzy effect.
- If you have some Golden Cookie upgrades, you get another Golden Cookie while Frenzy is still ongoing. If it happens to be a building buff (works best with Cursor's "High Five" buff since you got the most cursors, Dragon Harvest also works, if active), cast Force the Hand of Fate, so you get a guaranteed Click Frenzy.
This way you have 3 buffs active at the same time: Frenzy, building buff and Click Frenzy. Clicking the big cookie now grants insane amounts of cookies, helping you progress the game much faster. With Pantheon, you can help this strategy with activating Godzamok and Muridal, then selling/buying all Cursors to help your clicking power. With Garden, you can fill all your slots with Thumbcorns, making them mature, using Clay as your soil (and optionally freezing the garden and unfreezing it at the right moment) for 90% bonus to your clicking power.
You can also look for the building buff (or Elder Frenzy) instead of Click Fenzy and then harvest Bakeberries, Queenbeets or Duketaters when Frenzy and another building buff (or Dragon harvest) is active at the same time. Since all three buffs affect your CpS, they also increase the amount of cookies you get from harvesting these plants. Notice that there are 15 different types of building buff. If you reload the game, the outcome will still be a building buff but the types of the building buff will be changed. You can use this technique to choose the types of the building buff with highest multiplier and to avoid repeative types with existing one.