In my Project, I use SetReward and to set agent reward to 0 when there is a draw, but I found SetReward has the same effect with AddReward, Why?
public override void OnActionReceived(float[ ] vectorAction)
{
if (StepCount == 1000)
{
AddReward(1f);
print(GetCumulativeReward());
}
if (StepCount == 2000)
{
SetReward(0f);
print(GetCumulativeReward());
return;
}
if(!IsLive) return;
AddReward(-1f/MaxStep);
MoveAgent(vectorAction);
}