- Home /
Question by
Bhanuka_Dassanayake · Jan 29 at 09:42 AM ·
learningmachine
How to use both Continuousous and Discrete Actions in ML Agent?
This is how I control my Car with ML Agent,
public override void OnActionReceived(ActionBuffers actions)
{
float h = actions.ContinuousActions[0];
float v = actions.ContinuousActions[1];
float handbrake = actions.ContinuousActions[2];
m_Car.Move(h, v, v, handbrake);
}
public override void Heuristic(in ActionBuffers actionsOut)
{
ActionSegment<float> continuousActions = actionsOut.ContinuousActions;
continuousActions[0] = CrossPlatformInputManager.GetAxis("Horizontal");
continuousActions[1] = CrossPlatformInputManager.GetAxis("Vertical");
continuousActions[2] = CrossPlatformInputManager.GetAxis("Jump");
}
and this work fine, but I need to add both continuous and Discrete values, how should I do it?
Comment
Your answer
Follow this Question
Related Questions
Machine Learn (Pattern Recognition) using Accelerometer... (Unity/C#). 0 Answers
Help setting up ml-agents-dodgeball-env project 0 Answers
Machine Learning with AMD Radeon? 0 Answers
How do i create a SVM in unity using tensorflow? 0 Answers
Is the python part of ML agent supposed to be reinstalled everytime? 1 Answer