hsahovic / poke-env

A python interface for training Reinforcement Learning bots to battle on pokemon showdown
https://poke-env.readthedocs.io/
MIT License
283 stars 93 forks source link

Timer for Fields/Weather/SideConditions? #222

Open akashsara opened 2 years ago

akashsara commented 2 years ago

Hiya, I was wondering if there's any way to access the timer for weather and other effects like reflect etc. On Pokemon Showdown this is usually visible as a small piece of text showing the minimum number of turns the effect lasts as well as the maximum possible turns.

Image for reference: Screenshot_20211024225057

While it's definitely possible to calculate this using the turn number associated with the effect, it's a bit difficult since different moves might have different durations. Is there any build-in way to obtain this information?

hsahovic commented 2 years ago

Hi @akashsara,

Thanks for opening this issue. This is a good idea, but I'm not sure what's the best way to proceed with regards to storing move-based data for different generations.

  1. Would a simple version focusing on weather, screens and terrains be sufficiently useful as a first-order approach?
  2. Are you aware of a place where such a dataset would be stored (maybe in PS's client?)
akashsara commented 2 years ago

For context, I'm essentially trying to create a state that composes of basically all the available battle information. The figure in this paper more or less covers everything I'm looking for.

  1. I think for my purposes it would make more sense to have everything available. For the time being I think I'll just use the current weather and the number of turns since it started in my state.
  2. Unfortunately I'm not too familiar with PS, so I won't be of much help there. This is the codebase for that paper. It might be of some help maybe?