poke-env icon indicating copy to clipboard operation
poke-env copied to clipboard

Rewrite the examples?

Open SomeRandomGuy009 opened this issue 2 years ago • 8 comments

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

SomeRandomGuy009 avatar Aug 10 '22 15:08 SomeRandomGuy009

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

mancho2000 avatar Aug 13 '22 11:08 mancho2000

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

akashsara avatar Aug 17 '22 05:08 akashsara

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

SomeRandomGuy009 avatar Aug 26 '22 12:08 SomeRandomGuy009

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?

akashsara avatar Aug 26 '22 14:08 akashsara

ill try and let you know soon

SomeRandomGuy009 avatar Aug 28 '22 11:08 SomeRandomGuy009

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

SomeRandomGuy009 avatar Aug 30 '22 11:08 SomeRandomGuy009

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

akashsara avatar Aug 31 '22 21:08 akashsara

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

SomeRandomGuy009 avatar Sep 01 '22 10:09 SomeRandomGuy009