Windows 8.1 x64
Card: GTX960
Python 3.79
[from command line with unity logo]
Version information:
ml-agents: 0.24.0,
ml-agents-envs: 0.24.0,
Communicator API: 1.4.0,
PyTorch: 1.7.1+cu110
Below
OnActionReceived not firing
I tried this will build 12 and got a basic setup to work, though I would like to get this newer version with ActionBuffers working.
Just using Debug.Log for now.
using Unity.MLAgents;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Sensors;
using UnityEngine;
public class AI_NPC_Warrior : Agent
{
public override void OnEpisodeBegin()
{
Debug.Log("OnEpisodeBegin");
}
public override void CollectObservations(VectorSensor sensor)
{
sensor.AddObservation(transform.position);
for (int i = 1; i <= 5; i++)
{
sensor.AddObservation(0);
Debug.Log("CollectObservations : " + i);
}
}
public override void OnActionReceived(ActionBuffers actionBuffers)
{
Debug.Log("OnActionReceived");
Debug.Log(actionBuffers.DiscreteActions[0]);
}
}
Any ideas would be great.