|
Post by lilith on Feb 21, 2013 9:18:21 GMT -8
two starmies, Jaedong and Flash, bravely volunteered for a monte carlo experiment.
Jaedong agreed to always bolt, while Flash made sure to use twave first.
def alwaysbolt(): def s(p, q): return p.moves[1]
return s
def alwayswave(): def s(p, q): if q.status != PAR: return p.moves[0] else: return p.moves[1]
return s
many trials were conducted. all of them were 100% as exciting as the lovely examples below:
Jaedong (Starmie) used Thunderbolt (23/24) Flash (Starmie) 323.0 -> 18.0 Flash (Starmie) took Paralysis Flash (Starmie) used Thunder_Wave (31/32) Jaedong (Starmie) took Paralysis Flash (Starmie) fp Jaedong (Starmie) fp Flash (Starmie) fp Jaedong (Starmie) used Thunderbolt (22/24) Flash (Starmie) 18.0 -> 0.0
Flash (Starmie) used Thunder_Wave (31/32) Jaedong (Starmie) took Paralysis Jaedong (Starmie) fp Flash (Starmie) used Thunderbolt (23/24) Jaedong (Starmie) 323.0 -> 168.0 Jaedong (Starmie) used Thunderbolt (23/24) Flash (Starmie) 323.0 -> 163.0 Flash (Starmie) used Thunderbolt (22/24) Jaedong (Starmie) 168.0 -> 0.0
after 200,000 trials, it appears that Jaedong has the upper hand with a winrate of 54%.
|
|
|
Post by Agent Syrup on Feb 21, 2013 12:24:07 GMT -8
Thanks for the tip! I'm now 4% stronger as a Pokemon trainer!
|
|
|
Post by Crystal_ on Feb 21, 2013 12:25:40 GMT -8
What if the unparalyzed Starmie can choose recover as well? (when it's below 50% and can't ohko opposing starmie). I think that would turn the odds in Flash's favor.
|
|
|
Post by Agent Syrup on Feb 21, 2013 12:47:29 GMT -8
Oh true!
|
|
|
Post by jorgen on Feb 21, 2013 18:03:52 GMT -8
not only that, but recover usage would actually warrant the monte carlo method in the first place, since it's pretty simple to do a closed-form solution for this if all you're using are HP-neutral and HP-subtracting rules.
|
|
|
Post by magic9mushroom on Feb 21, 2013 20:03:35 GMT -8
two starmies, Jaedong and Flash, bravely volunteered for a monte carlo experiment. Jaedong agreed to always bolt, while Flash made sure to use twave first. def alwaysbolt(): def s(p, q): return p.moves[1]
return s
def alwayswave(): def s(p, q): if q.status != PAR: return p.moves[0] else: return p.moves[1]
return s many trials were conducted. all of them were 100% as exciting as the lovely examples below: Jaedong (Starmie) used Thunderbolt (23/24) Flash (Starmie) 323.0 -> 18.0 Flash (Starmie) took Paralysis Flash (Starmie) used Thunder_Wave (31/32) Jaedong (Starmie) took Paralysis Flash (Starmie) fp Jaedong (Starmie) fp Flash (Starmie) fp Jaedong (Starmie) used Thunderbolt (22/24) Flash (Starmie) 18.0 -> 0.0 Flash (Starmie) used Thunder_Wave (31/32) Jaedong (Starmie) took Paralysis Jaedong (Starmie) fp Flash (Starmie) used Thunderbolt (23/24) Jaedong (Starmie) 323.0 -> 168.0 Jaedong (Starmie) used Thunderbolt (23/24) Flash (Starmie) 323.0 -> 163.0 Flash (Starmie) used Thunderbolt (22/24) Jaedong (Starmie) 168.0 -> 0.0 after 200,000 trials, it appears that Jaedong has the upper hand with a winrate of 54%. How dare you get your icky empiricism in my pure mathematics!
|
|
|
Post by lilith on Feb 21, 2013 21:38:30 GMT -8
What if the unparalyzed Starmie can choose recover as well? (when it's below 50% and can't ohko opposing starmie). I think that would turn the odds in Flash's favor. omg, i completely overlooked that coz of some silly assumptions about crits making recover not worth it. meet Flash2! def recoverwave(thresh1, thresh2): def s(p, q): if q.status != PAR: return p.moves[0] elif p.status != PAR and (p.hp < thresh1) and (((p.stat(HP) - p.hp) % 256) != 255) and (q.hp > thresh2): return p.moves[2] else: return p.moves[1]
return s
strategies = [alwaysbolt(), recoverwave(162, 137)] interestingly enough, Jaedong and Flash2 are within a percentage point of each other! but i think Flash2 could use some better values for thresh1 and thresh2 - right now he refuses to take any risks, even though there's a (.75*.223*some_damage_roll_randomness) chance of just dying to a crit. not only that, but recover usage would actually warrant the monte carlo method in the first place, since it's pretty simple to do a closed-form solution for this if all you're using are HP-neutral and HP-subtracting rules. while it's certainly doable, speed ties, thunderbolt's paralysis chance, and the slight chance of a 2hko make it sorta annoying to solve symbolically
|
|
|
Post by jorgen on Feb 21, 2013 23:28:40 GMT -8
I tried working it out myself, and honestly it's the 255s and potential for fps that make it a massive headache. It'd take careful state mapping over a lot of time to converge the tree given all those potential hp-neutral rounds.
|
|
|
Post by lilith on Mar 4, 2013 12:28:40 GMT -8
here is a complete graph of the matchup taken from 100,000 trials: all possible outcomes and their probabilities. HP percentages are rounded to the greatest integer (floor) multiple of 1/12th. if expecting to face a slower, paralyzed thunderbolt user after the mirror, Jaedong's strategy may be preferable as it's around 50% moar likely to win at full hp. (who knows, maybe someday it will come up!)
|
|
|
Post by Agent Syrup on Mar 4, 2013 12:34:39 GMT -8
This is getting out of hand!
|
|
|
Post by t3h Icy on Mar 4, 2013 17:39:38 GMT -8
Awesome stuff!
|
|
|
Post by magic9mushroom on Mar 4, 2013 19:04:59 GMT -8
I tried working it out myself, and honestly it's the 255s and potential for fps that make it a massive headache. It'd take careful state mapping over a lot of time to converge the tree given all those potential hp-neutral rounds. It's only a 394384-state Markov chain.
|
|