showdown icon indicating copy to clipboard operation
showdown copied to clipboard

Is there a wrapper/helper class to run full battles in the simulator stand-alone?

Open phinate opened this issue 2 years ago • 2 comments

Hi! Really nice project, found it when searching for something to run bot v bot battles in a team optimisation setting.

To that effect, I was wondering if you intended for the simulator code to run full battles? It seems from my initial scan that the code was only inteded to be used alongside the official PS battle system as a guide for the bot itself.

This would be pretty nice for my use case (mass-simulaton of battles in the context of genetic algorithms), so if this doesn't exist and you see a roadmap for that feature, I'd be happy to help with the implementation.

(also just a side query -- do you have any strong limitations for py36 being your only supported version? happy to investigate if otherwise to port to more modern versions since py36 is officially deprecated by numpy etc.)

phinate avatar Jul 31 '22 15:07 phinate

I was wondering if you intended for the simulator code to run full battles? It seems from my initial scan that the code was only inteded to be used alongside the official PS battle system as a guide for the bot itself.

The engine code can run full battles. There are some examples of how to use the engine in ENGINE.md (might be a tad out of date).

However, if you want to mass simulate battles you may want to consider using the official PokemonShowdown simulator as it is a much more complete engine. The engine in my project was written to be a "best-effort" implementation for only competitive singles: Lots of interactions are not present. The only reason you should use this engine over the PS engine (and the reason I wrote it in the first place) is if you want to be able to determine all of the possible transpositions that may occur when two moves are selected from a certain state. If you just want to simulate battles you should use the PS engine.

(also just a side query -- do you have any strong limitations for py36 being your only supported version? happy to investigate if otherwise to port to more modern versions since py36 is officially deprecated by numpy etc.)

I'm almost certain this code will work with anything 3.6+ due to the backwards compatibility of Python. I'll update the README & the Github Actions runner to use a more recent version when I get a chance.

pmariglia avatar Jul 31 '22 16:07 pmariglia

Python version changed to 3.8 with dcd7fb821116d389a2f7c953f0dc81def8a96922 and 1374a05cddd2f0868ca21da9a33f12c1f9385344

pmariglia avatar Jul 31 '22 18:07 pmariglia

Closing this for lack of activity.

Feel free to reopen if you have any further questions

pmariglia avatar Oct 15 '22 19:10 pmariglia