This is my agent class, i call AddComponent() to active it.
When I call the function Academy.Instance.EnvironmentStep(), CollectDiscreteActionMasks() and OnActionReceived() is not executed.How can I perform the training process manually.
class MyAgent :Agent
{
private void Awake()
{
Academy.Instance.AutomaticSteppingEnabled = false;
BehaviorParameters bp = gameObject.GetComponent<BehaviorParameters>();
bp.BehaviorName = "Cha Behavior";
bp.BrainParameters.VectorObservationSize = 19 * 19 + 6;
bp.BrainParameters.NumStackedVectorObservations = 2;
bp.BrainParameters.VectorActionSize = new int[2] { 19 * 19 + 1, 19 * 19 + 1 };
MaxStep = 150;
}
public override void CollectObservations(VectorSensor sensor){...}
public override void CollectDiscreteActionMasks(DiscreteActionMasker actionMasker){...}
public override void OnActionReceived(float[] vectorAction){...}
}