Hi
I have a karting game and my agent receives a vector assigned to acceleration
public override void OnActionReceived(float[ ] vectorAction)
{ acceleration = vectorAction[1];
}
when training I can see that 50% of the time acceleration is less than 0 and 50% of the time it is more than 0, which is to be expected, the result is my kart jiggles a bit but doesn’t move forward
in order to make the kart move forward I added a reward when the acceleration is positive and a penalty when it is negative
public override void OnActionReceived(float[ ] vectorAction)
{ acceleration = vectorAction[1];
if(acceleration > 0)
{
AddReward(1f);
}
else if(acceleration < 0)
{
AddReward(-1f);
}
}
I would expect to see over time the ratio would be in favor of more positive acceleration numbers being produced, however the ratio is still 50/50
Am I fundamentally misunderstanding something here?