|
|
|
|
|
|
MoveAgent(vectorAction); |
|
|
|
} |
|
|
|
|
|
|
|
public override float[] Heuristic() |
|
|
|
public override void Heuristic(float[] actionsOut) |
|
|
|
var action = new float[5]; |
|
|
|
action[2] = 2f; |
|
|
|
actionsOut[2] = 2f; |
|
|
|
action[0] = 1f; |
|
|
|
actionsOut[0] = 1f; |
|
|
|
action[1] = 1f; |
|
|
|
actionsOut[1] = 1f; |
|
|
|
action[1] = 2f; |
|
|
|
actionsOut[1] = 2f; |
|
|
|
action[2] = 1f; |
|
|
|
actionsOut[2] = 1f; |
|
|
|
action[0] = 2f; |
|
|
|
actionsOut[0] = 2f; |
|
|
|
action[3] = Input.GetKey(KeyCode.Space) ? 1.0f : 0.0f; |
|
|
|
action[4] = Input.GetKey(KeyCode.O) ? 1.0f : 0.0f; |
|
|
|
return action; |
|
|
|
actionsOut[3] = Input.GetKey(KeyCode.Space) ? 1.0f : 0.0f; |
|
|
|
actionsOut[4] = Input.GetKey(KeyCode.O) ? 1.0f : 0.0f; |
|
|
|
} |
|
|
|
|
|
|
|
public override void OnEpisodeBegin() |
|
|
|