jleclanche / fireplace

A Hearthstone simulator in Python
https://hearthsim.info
GNU Affero General Public License v3.0
669 stars 148 forks source link

Allow deterministic control of random outcomes #323

Open smallnamespace opened 8 years ago

smallnamespace commented 8 years ago

There are a few use cases for this:

  1. Semi-deterministic tests, where we iterate through every possible random outcome (as opposed to manually patching up the outcome, or randomly generating many outcomes, where we might miss a case)
  2. AI use cases, where the AI would like to explore random nodes in a particular direction (e.g. what's the best card I can draw? What's the best juggle/worst juggle that I can get?)
  3. Syncing with HSReplays -- import of HSReplay into the engine and evolve it through time
synap5e commented 8 years ago

It may also be nice to have a probability assigned to each result node.

smallnamespace commented 8 years ago

Yeah that's a nice to have, might be tricky to do it in general though. I'm open to suggestions on how to go about implementing this, otherwise I'll take a good look through the code and draft something.

smallnamespace commented 8 years ago

Per discussion with jleclanche, would be good to think of this in the context of generalizing random outcomes into the DSL