social_learning.QLearningAgent.selectRandom C# (CSharp) Method

selectRandom() private method

private selectRandom ( double sensors ) : double[]
sensors double
return double[]
        private double[] selectRandom(double[] sensors)
        {
            double[] results = new double[sensors.Length + 2];
            sensors.CopyTo(results, 0);

            // Randomly select an orientation and a velocity
            results[sensors.Length - 2] = _random.Next(_numOrientationActions) / (double)(_numOrientationActions-1);
            results[sensors.Length - 1] = _random.Next(_numVelocityActions) / (double)(_numVelocityActions-1);

            return results;
        }