more clear names for methods of Space (#181)
* rename Space.val_matches_space_definition -> contains; Space.is_point_in_space_shape -> valid_index * rename valid_index -> is_valid_index
This commit is contained in:
1 parent
0ccc333d77
commit
cd812b0d25
19 files changed
+77
-62
No files matched your search
@@ -280,7 +280,7 @@ class Environment(EnvironmentInterface):
|
||||
:return: the environment response as returned in get_last_env_response
|
||||
"""
|
||||
action = self.action_space.clip_action_to_space(action)
|
||||
if self.action_space and not self.action_space.val_matches_space_definition(action):
|
||||
if self.action_space and not self.action_space.contains(action):
|
||||
raise ValueError("The given action does not match the action space definition. "
|
||||
"Action = {}, action space definition = {}".format(action, self.action_space))
|
||||
|
||||
|
||||
Reference in new issue
Block a user