Comments (7)
you will need to manually add the env to your init file.
add
register(
id='meta-SuperMarioBros-Tiles-v0',
entry_point='gym.envs.gym_super_mario:MetaSuperMarioBrosEnv',
kwargs={ 'draw_tiles': 1},
reward_threshold=(3266 - 40),
nondeterministic=True,
)
to ~/.local/lib/python3.5/site-packages/gym/envs/init.py
I have much experience with this env so please ask if you have any questions.
from gym-super-mario.
@17760875908 what does your code look like? Specifically the env = gym.make()
from gym-super-mario.
import gym
import gym_pull
gym_pull.pull('github.com/ppaquette/gym-super-mario')
env = gym.make('ppaquette/SuperMarioBros-1-1-v0')
for i_episode in range(100):
observation = env.reset()
while True:
env.render()
action = env.action_space.sample()
observation, reward, done, info = env.step(action)
print(observation, reward, done, info)
if done:
break
MadeByGod:etc zw.Zhao$ sudo python3 /Users/zzw/PycharmProjects/TensorFlow/MARIO.py
Password:
The directory '/Users/zzw/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
[2017-07-14 11:34:06,019] Installing pip package from "https://github.com/ppaquette/gym-super-mario.git"
The directory '/Users/zzw/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/zzw/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/zzw/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting git+https://github.com/ppaquette/gym-super-mario.git
Cloning https://github.com/ppaquette/gym-super-mario.git to /private/tmp/pip-0qwv_30h-build
Requirement already up-to-date: gym>=0.8.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: six in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: pyglet>=1.2.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: requests>=2.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: numpy>=1.10.4 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.0->gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: urllib3<1.22,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.0->gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: idna<2.6,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.0->gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Requirement already up-to-date: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.0->gym>=0.8.0->ppaquette-gym-super-mario==0.0.7)
Installing collected packages: ppaquette-gym-super-mario
Found existing installation: ppaquette-gym-super-mario 0.0.7
Uninstalling ppaquette-gym-super-mario-0.0.7:
Successfully uninstalled ppaquette-gym-super-mario-0.0.7
Running setup.py install for ppaquette-gym-super-mario ... done
Successfully installed ppaquette-gym-super-mario-0.0.7
The directory '/Users/zzw/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
[2017-07-14 11:34:16,101] The user environments for "github.com/ppaquette/gym-super-mario" are already up-to-date (no new version detected).
[2017-07-14 11:34:16,101] Making new env: ppaquette/SuperMarioBros-1-1-v0
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 137, in spec
return self.env_specs[id]
KeyError: 'ppaquette/SuperMarioBros-1-1-v0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/zzw/PycharmProjects/TensorFlow/MARIO.py", line 5, in <module>
env = gym.make('ppaquette/SuperMarioBros-1-1-v0')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 161, in make
return registry.make(id)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 118, in make
spec = self.spec(id)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs/registration.py", line 147, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: ppaquette/SuperMarioBros-1-1-v0
this is my code and log @Zoltar-The-Goat
from gym-super-mario.
@koltafrickenfer your comment did not solve the issue for me.
If anyone is running into this issue, see this related thread for solutions.
from gym-super-mario.
you have to register each environment desperately with a different id and entry point. I am sorry I did not make this more clear.
from gym-super-mario.
How do you perform the env = gym.make.... step after you register the environment manually?
env = gym.make('ppaquette/SuperMarioBros-1-1-v0') or env = gym.make('meta-SuperMarioBros-Tiles-v0') ??
from gym-super-mario.
you will need to manually add the env to your init file.
add
register( id='meta-SuperMarioBros-Tiles-v0', entry_point='gym.envs.gym_super_mario:MetaSuperMarioBrosEnv', kwargs={ 'draw_tiles': 1}, reward_threshold=(3266 - 40), nondeterministic=True, )
to ~/.local/lib/python3.5/site-packages/gym/envs/init.py
I have much experience with this env so please ask if you have any questions.
Hello. Can you help me with installing and running up this env?
from gym-super-mario.
Related Issues (20)
- Error UnregisteredEnv('No registered env with id: {}'.format(id)) HOT 1
- Env fails when creating temp lua file
- Emulator freeze HOT 2
- How about adding a function to move mario to a specified position?
- Training time of openai gym is too long, what is the good way to accelerate it? HOT 2
- How train Mario game with OpenAI gym in the cloud, and download this agent, and run this agent on myself computer ? HOT 3
- Modifications required to fit latest gym version HOT 4
- gym (0.9.3),,ImportError: No module named client, from gym.scoreboard.client HOT 5
- will it compatable gym latest version? HOT 1
- Install Without `gym-pull` HOT 3
- Mario Distance HOT 1
- NotImplementedError HOT 1
- Type Error 'int object is not subscriptable' HOT 1
- AttributeError: 'MetaSuperMarioBrosEnv' object has no attribute 'disable_out_pipe'
- Unusually large reward on first step
- Run on windows HOT 1
- Action Space doesn't allow sampling for random starts
- Error in gym-super-mario-bros package
- Only returning pixel data not Tile Data
- Cannot disable GUI for FCEUX HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gym-super-mario.