hsahovic / poke-env

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

Rewrite the examples? #317

Open SomeRandomGuy009 opened 2 years ago

SomeRandomGuy009 commented 2 years ago

People coming across this project are mostly beginners or people who don't know how to code. But, they want to test out the agents and battle them. Most of the example code doesn't work , one of which is stated in https://github.com/hsahovic/poke-env/issues/314

mancho2000 commented 2 years ago

Thanks for this. Being one of them, I would also appreciate if there could be more examples. Like using other libraries, self play, etc would be very nice

akashsara commented 2 years ago

I've submitted a new version of selfplay on #322 but I'm curious as to which other example code doesn't work. I could take a look at it if you can point it out

SomeRandomGuy009 commented 2 years ago

I've submitted a new version of selfplay on #322 but I'm curious as to which other example code doesn't work. I could take a look at it if you can point it out

pretty sure openai ones don't work too

akashsara commented 2 years ago

If you pip installed poke-env, rl_with_open_ai_gym_wrapper.py should work. If you installed it directly from Github, rl_with_new_open_ai_gym_wrapper.py. Could you confirm which version of poke-env you have and which script you tried?

Edit: A new release went out a couple of hours ago, so the pip installed version and the Github version should be the same. Do a pip install poke-env and try running rl_with_new_open_ai_gym_wrapper.py?

SomeRandomGuy009 commented 1 year ago

ill try and let you know soon

SomeRandomGuy009 commented 1 year ago

If you pip installed poke-env, rl_with_open_ai_gym_wrapper.py should work. If you installed it directly from Github, rl_with_new_open_ai_gym_wrapper.py. Could you confirm which version of poke-env you have and which script you tried?

Edit: A new release went out a couple of hours ago, so the pip installed version and the Github version should be the same. Do a pip install poke-env and try running rl_with_new_open_ai_gym_wrapper.py?

i did try the new open ai gym wrapper agent but:

ModuleNotFoundError: No module named 'poke_env.abstract_battle'

poke-env version: 0.5.0 Operating System: Ubuntu 20.04 and Ubuntu 18.04

akashsara commented 1 year ago

Oh I think I see the issue. Try using from poke_env.environment import AbstractBattle instead of from poke_env.abstract_battle import AbstractBattle.

SomeRandomGuy009 commented 1 year ago

Oh I think I see the issue. Try using from poke_env.environment import AbstractBattle instead of from poke_env.abstract_battle import AbstractBattle.

yep, did that yesterday and started working