rocket_league.done_conditions
Submodules
Classes
A DoneCondition that is satisfied when all the provided conditions are satisfied. |
|
A DoneCondition that is satisfied when any of the provided conditions are satisfied. |
|
A DoneCondition that is satisfied when a goal is scored. |
|
A DoneCondition that is satisfied when no car has touched the ball for a specified amount of time. |
|
A DoneCondition that is never satisfied. |
|
A termination/truncation condition. This class is responsible for determining when an episode should end for each agent. |
Package Contents
- class rocket_league.done_conditions.AllCondition(*conditions: rlgym.api.DoneCondition)
Bases:
rlgym.api.DoneCondition
[rlgym.api.AgentID
,rlgym.rocket_league.api.GameState
]A DoneCondition that is satisfied when all the provided conditions are satisfied.
- conditions = ()
- reset(agents: List[rlgym.api.AgentID], initial_state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) None
Function to be called each time the environment is reset.
- Parameters:
agents – List of AgentIDs for which this DoneCondition will be evaluated
initial_state – The initial state of the reset environment.
shared_info – A dictionary with shared information across all config objects.
- is_done(agents: List[rlgym.api.AgentID], state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) Dict[rlgym.api.AgentID, bool]
Function to determine if a game state is terminal. This will be called once per step, and must return either True or False if the current episode should be terminated at this state.
- Parameters:
agents – List of AgentIDs for which this DoneCondition should be evaluated
state – The current state of the game.
shared_info – A dictionary with shared information across all config objects.
- Returns:
Dict of bools representing whether the current state meets this done condition for each AgentID in agents.
- class rocket_league.done_conditions.AnyCondition(*conditions: rlgym.api.DoneCondition)
Bases:
rlgym.api.DoneCondition
[rlgym.api.AgentID
,rlgym.rocket_league.api.GameState
]A DoneCondition that is satisfied when any of the provided conditions are satisfied.
- conditions = ()
- reset(agents: List[rlgym.api.AgentID], initial_state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) None
Function to be called each time the environment is reset.
- Parameters:
agents – List of AgentIDs for which this DoneCondition will be evaluated
initial_state – The initial state of the reset environment.
shared_info – A dictionary with shared information across all config objects.
- is_done(agents: List[rlgym.api.AgentID], state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) Dict[rlgym.api.AgentID, bool]
Function to determine if a game state is terminal. This will be called once per step, and must return either True or False if the current episode should be terminated at this state.
- Parameters:
agents – List of AgentIDs for which this DoneCondition should be evaluated
state – The current state of the game.
shared_info – A dictionary with shared information across all config objects.
- Returns:
Dict of bools representing whether the current state meets this done condition for each AgentID in agents.
- class rocket_league.done_conditions.GoalCondition
Bases:
rlgym.api.DoneCondition
[rlgym.api.AgentID
,rlgym.rocket_league.api.GameState
]A DoneCondition that is satisfied when a goal is scored.
- reset(agents: List[rlgym.api.AgentID], initial_state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) None
Function to be called each time the environment is reset.
- Parameters:
agents – List of AgentIDs for which this DoneCondition will be evaluated
initial_state – The initial state of the reset environment.
shared_info – A dictionary with shared information across all config objects.
- is_done(agents: List[rlgym.api.AgentID], state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) Dict[rlgym.api.AgentID, bool]
Function to determine if a game state is terminal. This will be called once per step, and must return either True or False if the current episode should be terminated at this state.
- Parameters:
agents – List of AgentIDs for which this DoneCondition should be evaluated
state – The current state of the game.
shared_info – A dictionary with shared information across all config objects.
- Returns:
Dict of bools representing whether the current state meets this done condition for each AgentID in agents.
- class rocket_league.done_conditions.NoTouchTimeoutCondition(timeout_seconds: float)
Bases:
rlgym.api.DoneCondition
[rlgym.api.AgentID
,rlgym.rocket_league.api.GameState
]A DoneCondition that is satisfied when no car has touched the ball for a specified amount of time.
- timeout_seconds
- last_touch_tick = None
- reset(agents: List[rlgym.api.AgentID], initial_state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) None
Function to be called each time the environment is reset.
- Parameters:
agents – List of AgentIDs for which this DoneCondition will be evaluated
initial_state – The initial state of the reset environment.
shared_info – A dictionary with shared information across all config objects.
- is_done(agents: List[rlgym.api.AgentID], state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) Dict[rlgym.api.AgentID, bool]
Function to determine if a game state is terminal. This will be called once per step, and must return either True or False if the current episode should be terminated at this state.
- Parameters:
agents – List of AgentIDs for which this DoneCondition should be evaluated
state – The current state of the game.
shared_info – A dictionary with shared information across all config objects.
- Returns:
Dict of bools representing whether the current state meets this done condition for each AgentID in agents.
- class rocket_league.done_conditions.NoopCondition
Bases:
rlgym.api.DoneCondition
[rlgym.api.AgentID
,rlgym.rocket_league.api.GameState
]A DoneCondition that is never satisfied.
- reset(agents: List[rlgym.api.AgentID], initial_state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) None
Function to be called each time the environment is reset.
- Parameters:
agents – List of AgentIDs for which this DoneCondition will be evaluated
initial_state – The initial state of the reset environment.
shared_info – A dictionary with shared information across all config objects.
- is_done(agents: List[rlgym.api.AgentID], state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) Dict[rlgym.api.AgentID, bool]
Function to determine if a game state is terminal. This will be called once per step, and must return either True or False if the current episode should be terminated at this state.
- Parameters:
agents – List of AgentIDs for which this DoneCondition should be evaluated
state – The current state of the game.
shared_info – A dictionary with shared information across all config objects.
- Returns:
Dict of bools representing whether the current state meets this done condition for each AgentID in agents.
- class rocket_league.done_conditions.TimeoutCondition(timeout_seconds: float)
Bases:
rlgym.api.DoneCondition
[rlgym.api.AgentID
,rlgym.rocket_league.api.GameState
]A termination/truncation condition. This class is responsible for determining when an episode should end for each agent.
- timeout_seconds
- initial_tick = None
- reset(agents: List[rlgym.api.AgentID], initial_state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) None
Function to be called each time the environment is reset.
- Parameters:
agents – List of AgentIDs for which this DoneCondition will be evaluated
initial_state – The initial state of the reset environment.
shared_info – A dictionary with shared information across all config objects.
- is_done(agents: List[rlgym.api.AgentID], state: rlgym.rocket_league.api.GameState, shared_info: Dict[str, Any]) Dict[rlgym.api.AgentID, bool]
Function to determine if a game state is terminal. This will be called once per step, and must return either True or False if the current episode should be terminated at this state.
- Parameters:
agents – List of AgentIDs for which this DoneCondition should be evaluated
state – The current state of the game.
shared_info – A dictionary with shared information across all config objects.
- Returns:
Dict of bools representing whether the current state meets this done condition for each AgentID in agents.