termination_condition_base
BaseTerminationCondition
Bases: Registerable
Base TerminationCondition class Condition-specific _step() method is implemented in subclasses
Source code in omnigibson/termination_conditions/termination_condition_base.py
done
property
Returns:
Name | Type | Description |
---|---|---|
bool |
Whether this termination condition has triggered or not |
success
property
Returns:
Name | Type | Description |
---|---|---|
bool |
Whether this termination condition has been evaluated as a success or not |
reset(task, env)
Termination condition-specific reset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task |
BaseTask
|
Task instance |
required |
env |
Environment
|
Environment instance |
required |
step(task, env, action)
Step the termination condition and return whether the episode should terminate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task |
BaseTask
|
Task instance |
required |
env |
Environment
|
Environment instance |
required |
action |
n - array
|
1D flattened array of actions executed by all agents in the environment |
required |
Returns:
Type | Description |
---|---|
2-tuple: - bool: whether environment should terminate or not - bool: whether a success was reached under this termination condition |
Source code in omnigibson/termination_conditions/termination_condition_base.py
FailureCondition
Bases: BaseTerminationCondition
Termination condition corresponding to a failure
Source code in omnigibson/termination_conditions/termination_condition_base.py
SuccessCondition
Bases: BaseTerminationCondition
Termination condition corresponding to a success