You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
Coach version : 1.0.1
Ubuntu version : 19.10
Environment : Discrete Custom Gym-Environment
Algorithm : DQN with Boltzmann Exploration
Hi, I created a custom gym environment which uses a discrete action space with 5 actions. It works with E-Greedy Exploration, but with Boltzmann Exploration it yields this error:
rl_coach/exploration_policies/boltzmann.py", line 61, in get_action
action = np.random.choice(range(self.action_space.shape), p=probabilities)
TypeError: only integer scalar arrays can be converted to a scalar index
It seems to me that discrete action spaces, which are converted from gym environments always have shape 1 (rl_coach/spaces.py):
classDiscreteActionSpace(ActionSpace):
""" A discrete action space with action indices as actions """def__init__(self, num_actions: int, descriptions: Union[None, List, Dict]=None, default_action: np.ndarray=None,
filtered_action_space=None):
super().__init__(1, low=0, high=num_actions-1, descriptions=descriptions)
# the number of actions is mapped to high# default actionifdefault_actionisNone:
self.default_action=0else:
self.default_action=default_actioniffiltered_action_spaceisnotNone:
self.filtered_action_space=filtered_action_space
I don't know the reason, but it seems weird to me.
Coach version : 1.0.1
Ubuntu version : 19.10
Environment : Discrete Custom Gym-Environment
Algorithm : DQN with Boltzmann Exploration
Hi, I created a custom gym environment which uses a discrete action space with 5 actions. It works with E-Greedy Exploration, but with Boltzmann Exploration it yields this error:
It seems to me that discrete action spaces, which are converted from gym environments always have shape 1 (rl_coach/spaces.py):
I don't know the reason, but it seems weird to me.
I use this Preset:
The text was updated successfully, but these errors were encountered: