mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 19:20:19 +01:00
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:
@@ -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