940 likes | 958 Views
Explore the use of randomness in perception, decision-making, and action, and how it can be harnessed to create interesting and unpredictable experiences. Learn about the limitations of human perception and the potential benefits of incorporating randomness into various aspects of life.
E N D
Using Randomness:Both Sides of the Coin Dave Mark – Intrinsic Algorithm LLCBrian Schwab – Blizzard
Dave Mark • President & Lead Designer of Intrinsic Algorithm LLC • Independent Game Studio • AI Consulting Company • Author of Behavioral Mathematics for Game AI • Contributed to: • AI Game Programming Wisdom 4 • Game Programming Gems 8
Eye of the Beholder 0.4%
Eye of the Beholder 0.4%
Eye of the Beholder • People are conditioned to see patterns • Inflate their importance • Easier to recall • Chunking • Packaging info into memorable chunks • “The magical number 7, plus or minus 2” • George A. Miller, Princeton, 1956
Eye of the Beholder • People can identify shorter patterns or groupings. • Forget to consider the entire context
Opportunity != Outcome • The long-term odds (or % chance) of an event happening can be a poor predictor of short term results. • People suck at remembering that. • People suck at calculating that. • It can be used for good or eeevviiilllll!
Opportunity != Outcome “But I had 3… and he only had 1!” Sid Meier
Opportunity != Outcome 7-game series (e.g. baseball, basketball) Team A has a 55% chance of winning each game Team B will win series40% of the time Team A has 66.6% chance of winning each game Team B will still win series 20% of the time
That’s a lot of games… • Statistically significant – i.e. weaker team wins < 5% of the time • Stronger team has 66.7% advantage • Best 12 out of 23 • Stronger team has 55% advantage • Best of 135 out of 269!
Law of Large Numbers As the number of trials increases, the outcome approaches the theoretically expected value.
When Is it “Large Enough”? To achieve a 90% chance of getting within ± n%. (Think polls)
Law of… small numbers? • Kahneman & Tversky • Judgment and decision-making • Behavioral economy • Sarcastic reference to misconception that a small sample accurately reflects underlying probabilities.
Gambler’s Fallacy • Idea that the odds of an independent event with fixed probability changing based on recent occurrences. • “Catching up.” • “His luck will run out sooner or later.” • “He’s due!”
We all do it… 6 22 4 19 14 00 22 20 24 13 35 31 8 30 29 17 4 25 31 11 17 24 10 35
Determinism that Looks Random • 3 Sine waves • Different frequencies • Different magnitudes • For each value of x • Sum y values • Normalize
Complexity Obscures Patterns • People can only keep track of a limited number of factors • As factors increase, complexity increases • People can no longer keep track of relationships • Deterministic result looks “random”
Hidden Factors Look Random • People can only take into account what they perceive • If input factors are hidden, people ascribe it to randomness
Brownian Motion • Robert Brown – 1827 • Under a microscope – pollen grains moved in “jittery” manner • Ascribed it to pollen being alive • Heat-based molecular vibration bumping the grains
Brownian Motion ? ? ?
Brownian Motion ? ? ? Fake it!
So what can we do with this? • Random sequences that look rigged… • Unseen deterministic factors that look random… • Intentional randomness to fake complex determinism…
Two Ways to Use It • Fuzzying Things Up • Weighted Randoms
Fuzzying Things Up • Start with a defined anchor point • Add “parametric noise” (i.e. ± n)
Fun with Distributions • 1 die = flat ± • 2 die = triangular distribution • 3+ die = bell curve • More die → squished curve • Fun tricks • Skewing dist. (e.g. 4 die, drop the lowest) • Combining different types of dice
Single Die Anchor • Adds variation • Quick to process • Single random call • Easy to visualize • Easy to tweak range
2 Dice Anchor • Triangular distribution • Mostly clustered towards center • Fairly quick to process • Two random calls • Easy to visualize • Easy to tweak range
3+ Dice • Normal distribution • Gaussian distribution • Bell curve • Very clustered towards center • Very expressive • Slower to process • n random calls • Harder to tweak
Where to Use Randomness • Perception • Decision • Action
Where to Use Randomness • Perception • Decision • Action
Randomizing Perception • Range • I can see 30’ ± 5’ = [25-35’] • Accuracy • I have an 80% chance of seeing you ± 10% • Frequency • Check senses every n ticks where n is 500-2000 ms
Where to Use Randomness • Perception • Decision • Action
Where to Use Randomness • Perception • Decision • Action
Randomizing Actions • Delay before acting • Speed of acting • Acceleration into act
Human Response Times • Average is ≈250ms • Not everyone clapped at 250ms • Distributed over a range • Everyone clapping at 250ms would be odd
Deliberative Decisions Take Time Action Deliberation Action