|
|
|
|
|
|
// should stay the previous action before the Done(), so that it is properly recorded.
|
|
|
|
if (m_Action.vectorActions == null) |
|
|
|
{ |
|
|
|
if (param.vectorActionSpaceType == SpaceType.Continuous) |
|
|
|
{ |
|
|
|
m_Action.vectorActions = new float[param.vectorActionSize[0]]; |
|
|
|
m_Info.storedVectorActions = new float[param.vectorActionSize[0]]; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
m_Action.vectorActions = new float[param.vectorActionSize.Length]; |
|
|
|
m_Info.storedVectorActions = new float[param.vectorActionSize.Length]; |
|
|
|
} |
|
|
|
m_Action.vectorActions = new float[param.numActions]; |
|
|
|
m_Info.storedVectorActions = new float[param.numActions]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
Debug.LogWarning("Heuristic method called but not implemented. Returning placeholder actions."); |
|
|
|
var param = m_PolicyFactory.brainParameters; |
|
|
|
var actionSize = param.vectorActionSpaceType == SpaceType.Continuous ? |
|
|
|
param.vectorActionSize[0] : |
|
|
|
param.vectorActionSize.Length; |
|
|
|
return new float[actionSize]; |
|
|
|
return new float[param.numActions]; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|