GamePress

New Gym SImulator

I've written a gym simulator in Google Sheets and made it publicly available. It is fully updated with Gen 2 stats and pokemon and provides the following features, among others:

Support for dodging both quick moves and charge moves. Allows user to specify likelihood of dodging as well as number of dodge attempts (dodge spamming). Specify attacker and defender pokemon along with moves and IVs for each Follows Gamepress guide for gym rules (including damage formula, dodge effects and energy usage.) Does not use any scripts (100% formula based), so you don't have to allow it to run scripts to use it.

I believe it's accurate (it seems to address a few issues I've seen in other simulators), but then again, it's version 0.000000001, so I'm sure it still has problems. :) It has instructions as well as limitations called out so hopefully it'll make sense, but if anyone has any questions, suggestions, or finds any potential issues, please let me know. I'll be happy to try to improve/fix it!

https://docs.google.com/spreadsheets/d/1TGMj8MK90hMYmvehzCLyEu4roXswLJlIC4h7-pmyj5I/edit?usp=sharing

Asked by TotoroWrangler8 years 2 months ago
Report

Answers

by JHVS 8 years 2 months ago

Thanks man good stuff. I'll give it a run in a bit.

Up
0
Down

by Puppi 8 years 2 months ago

I don't understand how to use this but it might just be my computer. How do you swap pokemon (attacker and defender)?

Up
0
Down

Just type (or select from the drop down list) the Pokémon you want in the white box under the Attacker or Defender label.

You may want to save a copy before trying to change things.

Up
0
Down

I can't seem to type nor can I see a dropdown list lol. Is this functionality supposed to work in the browser version? Do I have to allow changes or something?

I Downloaded it as an xlsx but it was no different in Excel, though mine is dodgy.

Up
0
Down

That seems odd. I obviously have different access so it's hard for me to test, but I can see people making changes to it online.

The only thing I can think is that your excel didn't open it in editable mode. When you open something you've downloaded like this, windows can open it in some sort of protected mode that won't allow you to interact with it until you specifically click the Enable Editing button which shows up at the top of the window.

As for using it in the browser, that should just work. I don't know why it wouldn't, but perhaps you could make a copy and try that. I think there's an option for that in the File menu. That should make a copy of it on google for you, although you may need a google account for that to work.

Hope that helps. I'd really like it to work for everyone.

Up
0
Down

Just reopened it in a New Window and it's working. No idea what happened the first time. TY

Up
0
Down

Excellent. Please let me know how it works for you as you play with it.

Up
0
Down

Did you get the all the answers you were looking for in your last post in regards to odd sim behavior?

Up
0
Down

Unfortunately no. But I decided that I'd publish this anyway and let the wisdom of the crowd guide me. :D

It's hard to be sure if it's working without something to compare it to, but hopefully others will spot any errors in it.

Up
0
Down

If you email celandro at pokebattler I'm sure he will answer your questions. He seems like friendly guy.

Up
0
Down

by Puppi 8 years 2 months ago

You have clearly put a lot of thought and effort into it, I find it quite remarkable. I don't even understand half of the excel functions that you have used so I can't look for errors by looking at the formula's. The only way I can see errors is if the output doesn't match what I expect.

If I put in Vaporeon attacking Exeggutor, same level, same IV's, everything the same.... except I change Vape's charge attack from Hydropump to Blizzard - they both do the same dmg.

I can also put the charge attack as Zap Cannon and Fireblast - they both do the same dmg.

I could be wrong, but shouldn't I get different dmg's for both of those scenarios due to Resist and Super Effectiveness?

I don't have that much time to look at it atm, but it seems like you have included heaps of customization ability to reflect an actual battle.

I am curios though how you set up the dodging functionality, and if a pokemon with a fast move like Water Gun get's more dodges off than a slow move like Bubble, or if the simulation holds off on using Bubble if there is ~0.8 seconds until the defenders next attack but doesn't hold off if using Water Gun. I suppose this will have minimal effect when only dodging charge attacks.

Up
0
Down

Unfortunately I'm going to be out for a while, I'll check back here when I can.

Up
0
Down

Thanks very much for the kind words and for the time spent trying it out. As it turns out you have quite correctly pointed out a typo in the Charge Move Damage calculation. I had copy and pasted and I failed to change the STAB and Effectiveness variables from the Quick Move to the Charge Move, which explains why they didn't seem to change when the Charge Move changed.

I've corrected the error there and reviewed the other formulas for similar errors and it seems to be ok now.

Your question regarding dodging is an excellent one--it's one of the weaker areas of the simulation. To answer your question, if you look at each row of the battle, you'll see that it calculates the next time that the attacker and defender can take an action. In the next row, whichever actor is ready to move first will do so.

If the Defender is the actor, the simulation does three things. First, it checks to see if the attacker is trying to dodge and, if so, what type of dodging is configured. Based on that check, it lowers the damage of the attack appropriately. It also adds time to the attacker appropriately based on the Dodge CD. So, if the attacker was going to be attacking at 85.4, and then the at 85.8 the Defender attacks with a Charge Move, the attackers next attack will be updated to be 84.9 (assuming a single dodge with a 0.5 second delay).

So, to answer your question more directly, the relative slowness of bubble versus water gun is reflected in the time the attacker can next take an action, but is not reflected in when/if the attacker can dodge. This weakness probably has a minimal effect when the defender is using a Charge Move, since those typically take long enough that the attacker would have been able to complete its prior attack and still be able to dodge, but against Quick Attacks it would be less a accurate representation (since it's fairly easy to not have enough time to dodge a Quick Attack).

Long story short, it isn't perfect in regards to dodging, but my guess is that it generally has a fairly minor effect on the outcome. The worst case exception would likely be if you assume you dodge all the Quick Moves.

Thanks again for the feedback! I'm happy to be able to fix errors that you and others find!

Up
0
Down

Ok, I think I understand what you're saying. x)

Seem's acceptable to me, especially when used with Dodge Charge Moves only, which most of us will be 'trying' to do anyway.

I think you have built a very comprehensive simulator. You should contact the guy from the other website (mentioned above) and see what he says about the oddities that you have noticed with his Battle Sim. I think he could learn a lot from your's and ultimately provide more accurate information to the common mug like me.

The other alternative is to get your own website running and somehow get people to come to your simulator instead of the others which wouldn't work because only 2% of the population would be capable of judging which Sim is good and which one is bad lol.

Thanks for making this public mate.

Up
0
Down

by razvan 8 years 2 months ago

I like it, but I have problem beliving it's corectness when used second time. Why?
Duel: Vap with HP vs. Blissey with ZH/DG
Lvl Vap: 34.5, 15/14/13 (my highest Vape)
Lvl Blissey: 34.5 15/14/13 (my Blissey)
Qm Dodge: 0%
CM dodge: 75% realistic
Dodge attempts: 3

Winner, Vaporeon with 12.5 seconds.

Second try: change the VAp level to 30
Winner, Vaporeon, with 14 seconds left (so quickest than previous one)

Third try: change Vape lvl to 25: Vape wins with 5.2 seconds. So slower than 34.5, but I would expect to loose.
Anyway, if there is a logicl explanation for the anomaly with lvl 30 Vap being quicker than 34.5, I would like to hear it :). Maybe he lost HO quicker and was able to unleash HP sooner?

Up
0
Down

so lvl 30 one unleashed 6 HydroPumps during the fight. Similar 34.5 one, so I find strange that lvl 30 one is quicker and HP left is similar: 63 HP for lvl 34.5 and 62 for lvl 30 one.

Up
0
Down

I don't have an answer for you just yet, but I'm looking (it'll have to wait until I get back from work today, unfortunately).

I did fix a bug in the Charge Move Damage calculation, so that's been corrected, but I'm not positive that there isn't anything else. I'll review some more tonight and see if I can find any other issues related to what you've found.

Thanks very much for taking a look and providing feedback!

Up
0
Down

I bookmarked this thread in my work laptop so I might read it again only tomorrow :). Is hard here to keep an ongoing discussion due to lack of forum facilities :(.
I gave you as much details as I could so that you can replicate my scenario and maybe even discover that I did something wrong :).

Up
0
Down

Looking at the details, water gun does the same damage at 25 as at lvl 40; I guess that is right due to rounding (good to know this :))
While HP damage increase with level, 71 at lvl 30, 74 at lvl 3 and 77 at lvl 40.
That is a good info, shows that we need to power defenders, attackers being quite close in damage even between 5 lvls. Except HP increase maybe :), worth for glass cannons (not so much for HP vapes :) ).
One more time, good play tool :).

Up
0
Down

I got to the bottom of it! :).Not an error, but just the beauty of real case scenarios with multiple actions with consequences as opposed to talking just numbers:).
1. lvl 30 line before last hit of battle:
135 Defender 14.1 QM Zen Headbutt 64 100 14 47 58 11
Blissey has 47 HP left with 14 seconds to go; lvl 30 Vap will lunch a deadly Hp

  1. lvl 34.5 line before last hit:
    136 Attacker 12.5 CM Hydro Pump 65 0 9.2 0 47 8.6
    Blissey has 29 HP left with 14 seconds to go, but lvl 34.5 Vap has to dodge DG :); lvl 34.5 Vap will lunch a deadly Hp.

So is circumstantial, all the way into battle lvl 34.5 one has the lead, but it has one more dodge at the end and due to huge power of HP it does not matter that in the case of lvl 30 Blissey had more HO before final HP.

Now I trust your tool, besides liking it a lot :).

Up
0
Down

Oh, that's great! I really appreciate you taking the time to both test it out and to figure out what happened. Thanks so much!

And I'm also happy to hear you like the tool. I'm (obviously) pretty happy with it myself, but I would love to keep improving it. I'm already thinking about ways to improve the way dodging is modeled to account for the issue discussed further up in this thread. :)

Thanks again!

Up
0
Down

Playing with Espeon vs Blissey I think I encounters a dodging problem, not sure if the one discussed ahead.
If I set 2 dodge attempts, I win the battle with a weak move set Espeon, ZH/Psychic.
If I set 1 dodge attempts I loose.
Why?
Because you don't account for the right time of a dodge :), so in the case of 1 dodge the simulator considers that my Espeon takes the hit, while with 2 dodges avoids it.
Test data: Espon lvl 30, 15/14/13 with ZH/Psy vs Blissey ZH/DG lvl 34.5, 15/14/13, QM dodge 75%, CM dodge 75%, Dodge type realistic, Defender delay 2, Dodge attempts 1 - Espeon fails with 60 seconds left
Same as above, Dodge attempts 2, Espeon wins with 9.4 seconds left :).
In reality I expect to have better results if I dodge only once, when needed for DG :).

Up
0
Down

Hmm, interesting, but I think it's working as designed if I understand what you're saying. It may just be that I didn't implement dodging the way that you expect.

If you set it to dodge twice, the effect is that it essentially attempts two dodges for each attack. If either of the dodges succeeds, then the move's damage is reduced by the percentage of the Dodge Effect (set to 75% by default). There is a flaw in the dodge calculation in that it always assumes you have time to attempt the dodge, regardless of when your prior move ended (since I don't have data on the window during which you need to dodge for each move. I may try to fix this though).

So, when you set it to 75% dodge chance and 2 dodges, it means that you will successfully dodge a given attack 93.75% of the time (1- (1- Dodge Chance)^Dodge Attempts). Obviously, when you set the Dodge Attempts to 1, you will only dodge successfully 75% of the time, so you'll be more likely to lose overall.

The next enhancement will likely be to incorporate Damage Windows into the calculations, but I've had some trouble finding reliable data on them. Gamepress doesn't have them (the only reference is when you look at the moves of a pokemon on its page). Assuming I can find something reliable, I'll see if I can incorporate the idea of not having enough time to dodge as a result of the prior attack.

Hope that helps and makes sense! Thanks again.

Up
0
Down

Worth mentioning that the key was the number of dodge attempts. I've set to 3 since I usually dodge more than necessary.
IF a set 1 for dodge attempts, lvl 34.5 finishes with 0.5 secs earlier than lvl 30 with a whooping 10 seconds less than dodging 3 times per DG :).
Did I say I love your tool? :D

BTW, I;m playing with a copy of your file that I made into my google account, not directly into yours.

Up
0
Down

Yeah, the number of dodge attempts matters quite a bit (when coupled with a percentage less than 100%).

And I'm very glad to hear that you like it so much--I enjoy the same sort of comparative analysis that you're doing, so I understand. :D

Up
0
Down