BinaryReward
- class coba.primitives.BinaryReward
A reward function with two values.
Constructors
- __init__(argmax: str | Number | Sequence | Mapping, value: float = 1.0) None
Instantiate BinaryReward.
- Parameters:
argmax – The location where reward value 1 is returned. At all other actions a reward value of 0 is returned.
value – The value returned at the argmax.
Methods
- __call__(action: str | Number | Sequence | Mapping) float
Get reward for action.
- Parameters:
action – An action taken.
- Returns:
Reward received for the action.