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.
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.