mryellow / gym-mazeexplorer

Maze Exploration OpenAIGym environment
MIT License
6 stars 2 forks source link

rendering doesn't work #2

Closed YitzhakSp closed 5 years ago

YitzhakSp commented 6 years ago

env.render() doesn't work. is there any way to fix it ?

mryellow commented 6 years ago

Details?

Tests are passing on my old local install, haven't looked at this environment for awhile. Possible something has changed upstream.

YitzhakSp commented 6 years ago

here's the code

import gym_mazeexplorer
import gym
env = gym.make('MazeExplorerEat-v0')
env.reset()
for i in range(10):
    env.render()
    action = env.action_space.sample()
    observation, reward, done, info = env.step(action)

it runs but there is no window popping up or so. my system is: win10, python 3.6

mryellow commented 6 years ago

Tests pass?

python -m unittest discover

Seems it prefers being run as python foo.py rather than ./foo.py.

See if you can get MazeExplorer itself python standalone.py running.

https://github.com/mryellow/maze_explorer

My readme code is looking for it under an old gym name (without Eat part). Now when I've updated to the correct name it just runs then finishes without error.

Okay spotted it.

https://github.com/mryellow/gym-mazeexplorer/blob/39febd7c179130c39c0f8dcecbfe87e986805a8e/gym_mazeexplorer/envs/mazeexplorer_env.py#L18

That False "invisible".

Passed to cocos.director as visible config in maze_exp https://github.com/mryellow/maze_explorer/blob/master/mazeexp/engine/mazeexp.py#L28

YitzhakSp commented 6 years ago

nice, now it works !