reward_function_base
BaseRewardFunction
Bases: Registerable
Base RewardFunction class Reward-specific reset and get_reward methods are implemented in subclasses
Source code in omnigibson/reward_functions/reward_function_base.py
info
property
Returns:
Type | Description |
---|---|
dict
|
Current info for this reward function |
reward
property
Returns:
Type | Description |
---|---|
float
|
Current reward for this reward function |
reset(task, env)
Reward function-specific reset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task
|
BaseTask
|
Task instance |
required |
env
|
Environment
|
Environment instance |
required |
Source code in omnigibson/reward_functions/reward_function_base.py
step(task, env, action)
Step the reward function and compute the reward at the current timestep.
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
|
|