question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with MultiDiscrete spaces

See original GitHub issue

Hi everybody, I run into a weird behaviour in the environment.py file in line: 56.

# total action space
if len(total_action_space) > 1:
    # all action spaces are discrete, so simplify to MultiDiscrete action space
    if all([isinstance(act_space, spaces.Discrete) for act_space in total_action_space]):
         act_space = spaces.MultiDiscrete([[0,act_space.n-1] for act_space in total_action_space])

creates an error in the mulidiscrete space. It says that nvec expects an 1 dimensional vector, but it recieves a 2 dimensional vector.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
HassamSheikhcommented, Apr 4, 2018

Use gym version 0.9.4.

1reaction
ryan-lowecommented, Jul 9, 2018

Latest push should be compatible with newest version of gym.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'MultiDiscrete' object has no attribute 'spaces ...
I created an Custom Environment to connect with my programmed game. The Environment isnt ready yet due to the occuring error. Maybe someone...
Read more >
'MultiDiscrete' object has no attribute 'spaces ...
I created an Custom Environment to connect with my programmed game. The Environment isnt ready yet due to the occuring error. Maybe someone...
Read more >
MultiDiscrete - Code Search
space = MultiDiscrete([[3, 4, 5], [6, 7, 8]]) ... from gym.error import CustomSpaceError; from gym.spaces import Box, Dict, Discrete, ...
Read more >
Action space for MultiDiscrete : r/reinforcementlearning
Hi guys, So I'm currently doing some experiment with RL and stumbled on a problem involving getting action space. (I'm using gym-wrappers ...
Read more >
Action Space Shaping in Deep Reinforcement Learning
the issue lies in the learning algorithm, the observation space, ... MultiDiscrete spaces are often treated as independent. Discrete decisions [22], [24].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found