|
|
|
|
|
|
public override void OnActionReceived(float[] vectorAction) |
|
|
|
{ |
|
|
|
|
|
|
|
// Generic gets nothing
|
|
|
|
if (position == Position.Striker) |
|
|
|
if (position == Position.Goalie) |
|
|
|
// Existential penalty for Strikers.
|
|
|
|
AddReward(-1f / 3000f); |
|
|
|
// Existential bonus for Goalies.
|
|
|
|
AddReward(1f / 3000f); |
|
|
|
else if (position == Position.Goalie) |
|
|
|
else |
|
|
|
// Existential bonus for Goalies.
|
|
|
|
AddReward(1f / 3000f); |
|
|
|
// Existential penalty for Strikers/Generic.
|
|
|
|
AddReward(-1f / 3000f); |
|
|
|
} |
|
|
|
MoveAgent(vectorAction); |
|
|
|
} |
|
|
|