|
|
|
|
|
|
public enum tensorType |
|
|
|
{ |
|
|
|
Integer, |
|
|
|
FloatingPoint |
|
|
|
}; |
|
|
|
FloatingPoint} |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
public string name; |
|
|
|
public tensorType valueType; |
|
|
|
|
|
|
if (currentBatchSize == 0) |
|
|
|
{ |
|
|
|
|
|
|
|
if (coord!=null) |
|
|
|
if (coord != null) |
|
|
|
{ |
|
|
|
coord.giveBrainInfo(brain); |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (coord!=null) |
|
|
|
if (coord != null) |
|
|
|
{ |
|
|
|
coord.giveBrainInfo(brain); |
|
|
|
} |
|
|
|
|
|
|
// Create the state tensor
|
|
|
|
if (hasState) |
|
|
|
{ |
|
|
|
runner.AddInput(graph[graphScope + StatePlacholderName][0], inputState); |
|
|
|
if (brain.brainParameters.stateSpaceType == StateType.discrete) |
|
|
|
{ |
|
|
|
int[,] discreteInputState = new int[currentBatchSize, 1]; |
|
|
|
for (int i = 0; i < currentBatchSize; i++) |
|
|
|
{ |
|
|
|
discreteInputState[i, 0] = (int)inputState[i, 0]; |
|
|
|
} |
|
|
|
runner.AddInput(graph[graphScope + StatePlacholderName][0], discreteInputState); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
runner.AddInput(graph[graphScope + StatePlacholderName][0], inputState); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Create the observation tensors
|
|
|
|