GithubHelp home page GithubHelp logo

malmo_rl's People

Contributors

phantomb avatar tesslerc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

malmo_rl's Issues

Memory consumption and learning issues

Tested as well with the unaltered codebase and the training example given in the readme. Over time, memory consumed grows to using up all available ram (nearly 16GBs), at which point either: - Python throws an error and stops the execution, or - Malmo becomes unreachable, throwing a specific error message every step (I can't recall which one, will edit when it occurs again).

I believe this wasn't the case for earlier versions of the codebase as I was previously able to run for days on end without issue.

I'm curious if you recognise this behaviour, and what part of the code might be responsible.

Agent Walking Sideways to the right on command `move 1`

Another thing I just noticed (specifically in my subskill_pickup domain) is that relatively often, the agent seems to strafe to the right, even when only issuing move 1 commands. This seems very strange. Might it have to do with Malmo not getting time to properly finish executing the command?

Have you encountered something like this?

DQN throws unexpected keyword argument 'dim'

On the latest version, I get the following error:

> python main.py dqn single_room --double_dqn --normalize_reward --malmo_ports 10001
2018-01-16 15:57:36 INFO: To view results, run 'python -m visdom.server'
2018-01-16 15:57:36 INFO: then head over to http://localhost:8097
Traceback (most recent call last):
  File "main.py", line 79, in <module>
    True)
  File "C:\Github_Repos\tessler_Malmo\utilities\helpers.py", line 52, in play_full_episode
    action = policy.get_action(states, is_train)
  File "C:\Github_Repos\tessler_Malmo\policies\dqn.py", line 125, in get_action
    self.previous_states = np.expand_dims(self.previous_states, dim=0)
TypeError: expand_dims() got an unexpected keyword argument 'dim'

The relevant commit is 9866be5.

Did you mean to use 'axis' in place of dim?

Running with interactive agent causes null reference from missing parameter

Helpers.py throws an exception at line 52 when used with the interactive agent because that agent is missing the learn_start parameter:

PS C:\Github_Repos\tessler_Malmo> python main.py interactive single_room
INFO: To view results, run 'python -m visdom.server'
INFO: then head over to http://localhost:8097
INFO: Starting Malmo:
INFO: Malmo loaded!
Traceback (most recent call last):
  File "main.py", line 55, in <module>
    viz)
  File "C:\Github_Repos\tessler_Malmo\utilities\helpers.py", line 52, in play_full_episode
    if step > params.learn_start and is_train:
AttributeError: 'Namespace' object has no attribute 'learn_start'
PS C:\Github_Repos\tessler_Malmo>

A simple check if that parameter exists might suffice, but I'm not sure if you would maybe rather want to check for / catch that error in some other way.

Running with DQN agent is visually slow and hangs without throwing an exception

After executing the agent with the standard parameters as such: python main.py dqn single_room --double_dqn --normalize_reward, the world is built as normal and the agent starts acting in the world.

However, the minecraft client seems visually very slow, laggy or missing frames. The visdom window in the browser however shows more visual frames being captured than that the client shows.

After ~10 seconds of acting, both the minecraft client and the terminal seem to hang indefinitely and are unresponsive. The terminal does not produce any further logged or printed messages, nor does the visdom window produce any frames. After forcibly closing the minecraft client, the terminal continues reporting the following exceptions every few seconds:

--- Logging error ---
Traceback (most recent call last):
  File "C:\Github_Repos\tessler_Malmo\agents\agent.py", line 116, in _load_mission_from_xml
    self.agent_host.startMission(mission, self.client_pool, mission_record, 0, str(self.experiment_id))
agents.malmo_dependencies.MalmoPython.MissionException: Failed to find an available client for this mission - tried all the clients in the supplied client pool.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Anaconda3\lib\logging\__init__.py", line 992, in emit
    msg = self.format(record)
  File "C:\Program Files\Anaconda3\lib\logging\__init__.py", line 838, in format
    return fmt.format(record)
  File "C:\Program Files\Anaconda3\lib\logging\__init__.py", line 575, in format
    record.message = record.getMessage()
  File "C:\Program Files\Anaconda3\lib\logging\__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "C:\Program Files\Anaconda3\lib\threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "C:\Program Files\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Anaconda3\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Github_Repos\tessler_Malmo\utilities\parallel_agents_wrapper.py", line 54, in agent_perform_action
    reward, terminal, state, terminal_due_to_timeout = agent.perform_action(action)
  File "C:\Github_Repos\tessler_Malmo\agents\agent.py", line 142, in perform_action
    self._restart_world()
  File "C:\Github_Repos\tessler_Malmo\agents\single_room.py", line 31, in _restart_world
    self._load_mission_from_xml(mission_xml)
  File "C:\Github_Repos\tessler_Malmo\agents\agent.py", line 121, in _load_mission_from_xml
    logging.critical('_load_mission_from_xml, Error starting mission', e)
Message: '_load_mission_from_xml, Error starting mission'
Arguments: (MissionException('Failed to find an available client for this mission - tried all the clients in the supplied client pool.',),)

But I expect that all these exceptions are due to the client no longer running.

I cannot forcibly interrupt the process in the terminal other than closing the window.

For completeness, you can see the full behaviour recorded here: https://youtu.be/tzDqEF1s2wk . Around 1:20, the world finished building and the agent starts interacting. Around 1:30, the windows become unresponsive and start to hang indefinitely.

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.