Git Product home page Git Product logo

vkurenkov / hierarchical-skill-acquisition Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 0.0 56 KB

Implementation of the Hierarchical and Interpretable Skill Acquisition in Multi-task Reinforcement Learning by Tianmin Shu, Caiming Xiong, and Richard Socher

Home Page: https://openreview.net/forum?id=SJJQVZW0b

Python 100.00%
reinforcement-learning iclr2018 language-grounding multi-task-learning hierarchical-reinforcement-learning

hierarchical-skill-acquisition's People

Contributors

vkurenkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hierarchical-skill-acquisition's Issues

Replicating Training

Hi,

I am attempting to simply replicate your work but am having issues getting the code to run correctly. When I first attempt to run the 'train_terminal.py' file, I get the following error back:

Traceback (most recent call last):
File "train_terminal.py", line 84, in
my_mission = env.create_environment(task, seed=SEED+episode_num)
File "C:\Users\kr015\Sync\PhD MineRL\hierarchical-skill-acquisition\env.py", line 115, in create_environment
mission = MalmoPython.MissionSpec(ET.tostring(tree.getroot()), True)
RuntimeError: Caught std::exception: MissionSpec is invalid (namespace)

It seems that line 115 in env.py is not accepting the mission spec input. I can fix this by replacing this line with the following as given in the malmo instruction:

with open(env_file, 'r') as f:
       mission_xml = f.read()
       mission = MalmoPython.MissionSpec(mission_xml, True)

This enable the environment to start but in doing so, returns a new error:

Waiting for the mission to start ....
Waiting for the first observation...
Waiting for the first frame...
The mission has started...
Traceback (most recent call last):
File "train_terminal.py", line 138, in
action_probs = policy.forward(Variable(last_frames.unsqueeze(0)), Variable(instruction))
File "C:\Users\kr015\Sync\PhD MineRL\hierarchical-skill-acquisition\agent\hierarchical\terminal.py", line 53, in forward
time_encoding = self.time.forward(fused)
File "C:\Users\kr015\Sync\PhD MineRL\hierarchical-skill-acquisition\agent\hierarchical\modules.py", line 99, in forward
output, hidden = self.lstm(fused, hidden)
File "C:\Users\kr015\Anaconda3\envs\minecraft_env\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "C:\Users\kr015\Anaconda3\envs\minecraft_env\lib\site-packages\torch\nn\modules\rnn.py", line 564, in forward
return self.forward_tensor(input, hx)
File "C:\Users\kr015\Anaconda3\envs\minecraft_env\lib\site-packages\torch\nn\modules\rnn.py", line 543, in forward_tensor
output, hidden = self.forward_impl(input, hx, batch_sizes, max_batch_size, sorted_indices)
File "C:\Users\kr015\Anaconda3\envs\minecraft_env\lib\site-packages\torch\nn\modules\rnn.py", line 523, in forward_impl
self.check_forward_args(input, hx, batch_sizes)
File "C:\Users\kr015\Anaconda3\envs\minecraft_env\lib\site-packages\torch\nn\modules\rnn.py", line 500, in check_forward_args
'Expected hidden[0] size {}, got {}')
File "C:\Users\kr015\Anaconda3\envs\minecraft_env\lib\site-packages\torch\nn\modules\rnn.py", line 166, in check_hidden_size
raise RuntimeError(msg.format(expected_hidden_size, tuple(hx.size())))
RuntimeError: Expected hidden[0] size (1, 1, 256), got (1, 256)

For which I have not figured out how to fix and assumed that perhaps editing the mission spec caused problems elsewhere. Is there a better fix to the first issue?

Furthermore, when I explore the defined environment manually, I see the perimeter walls as defined in the xml file but there are no coloured blocks anywhere to be seen. Is this correct or should the environment have the coloured blocks initialised?

minecraft_error

Thanks
Phil

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.