private double[] selectGreedy(double[] sensors)
{
double[] stateActionPair = new double[sensors.Length + 2], results = new double[sensors.Length + 2];
sensors.CopyTo(stateActionPair, 0);
sensors.CopyTo(results, 0);
double max = -1;
for (int i = 0; i < _numOrientationActions; i++)
for (int j = 0; j < _numVelocityActions; j++)
{
stateActionPair[stateActionPair.Length - 2] = i / (double)(_numOrientationActions-1);
stateActionPair[stateActionPair.Length - 1] = j / (double)(_numVelocityActions-1);
double value = base.activateNetwork(stateActionPair)[0];
if (value > max)
{
max = value;
results[results.Length - 2] = stateActionPair[results.Length - 2];
results[results.Length - 1] = stateActionPair[results.Length - 1];
}
}
return results;
}