AddOneHotGoal
m_Script: {fileID: 11500000, guid: 163dac4bcbb2f4d8499db2cdcb22a89e, type: 3}
m_Name:
m_EditorClassIdentifier:
observationSize: 1
observationSize: 2
--- !u!1 &1625008366184734
GameObject:
m_ObjectHideFlags: 0
--- !u!1 &260425459
Array values = Enum.GetValues(typeof(GridGoal));
int goalNum = (int)gridGoal;
goalSensor = this.GetComponent<GoalSensorComponent>();
goalSensor.AddGoal(goalNum);
goalSensor.AddOneHotGoal(goalNum, values.Length);
}
public override void WriteDiscreteActionMask(IDiscreteActionMask actionMask)
goalSensor.AddObservation(goal);
public void AddOneHotGoal(int goal, int range)
{
if (goalSensor != null)
goalSensor.AddOneHotObservation(goal, range);
public class GoalSensor : VectorSensor