- Home /
Question by
Icaro-Lima-TFG · May 25, 2019 at 11:23 PM ·
agentrocketland
Problem on Landing a 2D Rocket with ML-Agents
I'm trying to land a rocket, and the simplest thing I thought of doing was putting it to stand. I am not currently worrying about how strong it will hit the ground.
Here's how I am collecting observations:
public override void CollectObservations()
{
AddVectorObs(Mathf.Sin(_rigidbody2D.rotation * Mathf.PI / 180));
AddVectorObs(Mathf.Cos(_rigidbody2D.rotation * Mathf.PI / 180));
AddVectorObs(_rigidbody2D.angularVelocity);
}
Here's how I treat the actions and give rewards:
public override void AgentAction(float[] vectorAction, string textAction)
{
_service.SetLeft(vectorAction[0] > 0);
_service.SetRight(vectorAction[1] > 0);
Cos = Mathf.Cos(_rigidbody2D.rotation * Mathf.PI / 180);
AddReward(Cos);
if (_collided || _rigidbody2D.position.y <= -12)
{
Done();
}
}
Already training a lot of time and does not seem to be stabilizing. Assuming that _service.SetLeft
and _service.SetRight
adds torque, and them are correct, what i'm doing wrong?
Comment