tambetm / gym-minecraft

Minecraft environment for Open AI Gym, based on Microsoft's Malmo.
272 stars 29 forks source link

ValueError: (False, 'Unknown discrete action jumpeast') #6

Closed figgybit closed 7 years ago

figgybit commented 7 years ago
import gym
import gym_minecraft
env = gym.make('MinecraftCliffWalking1-v0')

env.init(start_minecraft=True)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jonkowalski/Desktop/MOVEIT/Desktop/Personal/SCHOOL/GATECH/7641/virtual_ml/venv/lib/python2.7/site-packages/gym_minecraft-0.0.2-py2.7.egg/gym_minecraft/envs/minecraft_env.py", line 129, in init
    self._create_action_space()
  File "/Users/jonkowalski/Desktop/MOVEIT/Desktop/Personal/SCHOOL/GATECH/7641/virtual_ml/venv/lib/python2.7/site-packages/gym_minecraft-0.0.2-py2.7.egg/gym_minecraft/envs/minecraft_env.py", line 191, in _create_action_space
    raise ValueError(False, "Unknown discrete action " + cmd)
ValueError: (False, 'Unknown discrete action jumpeast')

when debugging the code there seems to be a large set of discrete actions that are not supported

(Pdb) cmds = self.mission_spec.getAllowedCommands(0, ch)
(Pdb) [x for x in cmds]
['jump', 'jumpeast', 'jumpmove', 'jumpnorth', 'jumpsouth', 'jumpstrafe', 'jumpuse', 'jumpwest', 'look', 'move', 'moveeast', 'movenorth', 'movesouth', 'movewest', 'strafe', 'turn', 'use']

https://github.com/tambetm/gym-minecraft/blob/master/gym_minecraft/envs/minecraft_env.py#L182-L191

tambetm commented 7 years ago

Oh, it seems that newer versions have added jump* actions. I'd be happy to accept PR on this, possibly those new actions just need to be added to line 183.

figgybit commented 7 years ago

OK I will do it.

figgybit commented 7 years ago

I tried to branch your project, commit my change, and create a pull request.

However: fatal: unable to access 'https://github.com/tambetm/gym-minecraft.git/': The requested URL returned error: 403

So I forked your project and committed over here. https://github.com/figgybit/gym-minecraft/commit/467ae4d1a74014a3218340cfe69908aff3c23cdf

Any advice on being able to push my branch would be appreciated. Thanks

tambetm commented 7 years ago

Not sure why you weren't able to create the PR yourself, but I created it myself and merged. Thanks!