CustomRewardWrapper
CustomRewardWrapper
Bases: Wrapper
__init__(env, success_func=None, llm_reward_function=None)
Initialize the custom reward wrapper
Parameters:
Name | Type | Description | Default |
---|---|---|---|
env
|
Env
|
the current environment |
required |
success_func
|
Callable
|
this function should return True if success. Defaults to None. |
None
|
llm_reward_function
|
Callable
|
the generated reward function. Defaults to None. |
None
|
step(action)
Realise the action in the environment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action
|
the action to realise |
required |
Returns:
Type | Description |
---|---|
observation (): the new observation |
|
reward (): the reward of the action |
|
terminated (): True if the episode is terminated |
|
truncated (): True if the episode is truncated |
|
info (): additional information |