Programming Universal Matchup Simulator

I'm hoping to make an API that will take as inputs two sets, and a strategy for each set, and will output the probability of one set winning over the other.

For example, say we want to evaluate Volcarona versus Blissey. Volcarona's strategy in this case is to use Quiver Dance twice, and then use Bug Buzz on subsequent turns. Blissey will use Toxic until it hits, then will use Seismic Toss unless its HP is below half, in which case it will use Softboiled. The program would (presumably) run 10000 simulations of this one-on-one battle through Showdown, compile the results, and save the percentage likelihood that this set and this strategy for Volcarona will win over that set and that strategy for Blissey, and vice versa.

I see three broad components to this, in order.

1. Running a simulation of a 1v1 with given move inputs through Showdown. This is the part I have the least idea of how to do, and the part I'm most hopeful someone here has already figured out. So far, my attempts to actually use Showdown's program to simulate something like this have been pretty fruitless.

2. The wrapper, that takes as input two sets and two strategies, and runs them through showdown 10000 times. A "strategy" is an entity that may need to take quite a few variables into account (turn number, current HP, opponent's HP, status conditions, opponent status conditions, and relative speed, to name a few), and the program will need to both allow the user to pose a strategy in a somewhat natural way AND turn this strategy into move inputs.

3. A database that stores this information and allows users to either look at the information that already exists or run new simulations to fill in some gaps. I don't have a current plan on how to host this database, but we'll cross that bridge later. The structure of the database will need to allow for connecting sets to strategies and having weighted edges between strategies that indicate the actual win percentages, so I'm leaning towards using MongoDB. I would also like to include something here that determines the monotonicity of a given matchup; that is, given set A and set B, is there or is there not a strategy for set A that will give the best possible win probability no matter which strategy set B chooses, and vice versa.

I plan to start working in gen 1 first, since that reduces the number and complexity of both sets and strategies. It's a way to get the program off the ground in the right general direction, before having to worry about all the wrinkles added to later generations.

Definitely let me know if anybody has any leads on how to run 10000 1v1 matchups through Showdown.
 

Rezzo

(EVIOLITE COMPATIBLE)
is a Pre-Contributor
Hello! I'm currently working on a project named "Abrastat", which does almost exactly as you have described. Like yourself, I ran into issues and roadblocks in the PS simulator, which instead of modifying, I decided to mock-up my own lightweight simulator for calculating these matchups. Currently this project is operational but not fully finished -- it can simulate dummy matchups where both 'players' use a single move against each other and most move effects are implemented to give an accurate result of a matchup.

The project is being written so that it is possible to represent any gamestate between two Pokémon as a heuristic, or, more specifically; a percentage chance of winning based on the available strategies to both players. Of course, this is a massive space in which to simulate every single possible matchup between every Pokémon, and as such I am planning to limit the scope of this data analysis between Pokémon commonly seen in the GSC 6v6, 1v1, and 3v3 Nintendo Cup formats for the time being.

This is all I really want to say until I've produced further results and completed the tool. But if you'd like to discuss any part of your idea in depth or share ideas, I'd be happy to go into it with you as I myself have covered all three areas of what you seek to achieve (this goes for anybody who happens to stumble across my post regarding building a lightweight simulator, etc.)
 
Last edited:

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top