|
|
|
|
|
|
if (hasState) |
|
|
|
{ |
|
|
|
int stateLength = 1; |
|
|
|
if (brain.brainParameters.vectorObservationSpaceType == StateType.continuous) |
|
|
|
if (brain.brainParameters.vectorObservationSpaceType == SpaceType.continuous) |
|
|
|
{ |
|
|
|
stateLength = brain.brainParameters.vectorObservationSize; |
|
|
|
} |
|
|
|
|
|
|
// Create the state tensor
|
|
|
|
if (hasState) |
|
|
|
{ |
|
|
|
if (brain.brainParameters.vectorObservationSpaceType == StateType.discrete) |
|
|
|
if (brain.brainParameters.vectorObservationSpaceType == SpaceType.discrete) |
|
|
|
{ |
|
|
|
var discreteInputState = new int[currentBatchSize, 1]; |
|
|
|
for (int i = 0; i < currentBatchSize; i++) |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (brain.brainParameters.vectorActionSpaceType == StateType.continuous) |
|
|
|
if (brain.brainParameters.vectorActionSpaceType == SpaceType.continuous) |
|
|
|
{ |
|
|
|
var output = networkOutput[0].GetValue() as float[,]; |
|
|
|
var i = 0; |
|
|
|
|
|
|
i++; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (brain.brainParameters.vectorActionSpaceType == StateType.discrete) |
|
|
|
else if (brain.brainParameters.vectorActionSpaceType == SpaceType.discrete) |
|
|
|
{ |
|
|
|
long[,] output = networkOutput[0].GetValue() as long[,]; |
|
|
|
var i = 0; |
|
|
|