Git Product home page Git Product logo

Comments (7)

koltafrickenfer avatar koltafrickenfer commented on July 19, 2024 1

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.

Zoltar-The-Goat avatar Zoltar-The-Goat commented on July 19, 2024

@17760875908 what does your code look like? Specifically the env = gym.make()

from gym-super-mario.

kdldbq avatar kdldbq commented on July 19, 2024
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.

zhanwenchen avatar zhanwenchen commented on July 19, 2024

@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.

koltafrickenfer avatar koltafrickenfer commented on July 19, 2024

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.

MBoaretto25 avatar MBoaretto25 commented on July 19, 2024

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.

atomikcircus3 avatar atomikcircus3 commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.