Example #1
0
        /// <summary>
        ///     Executes a trial/simulation for all evaluation units (i.e. maze/navigator combinations).
        /// </summary>
        public void RunTrajectoryEvaluations()
        {
            // Check integrtiy of evaluation units
            foreach (var evaluationUnit in EvaluationUnits.Where(evaluationUnit =>
                                                                 evaluationUnit.AgentPhenome == null || evaluationUnit.MazePhenome == null))
            {
                throw new Exception(
                          $"Malformed evaluation unit for agent {evaluationUnit.AgentId} and maze {evaluationUnit.MazeId} - each evaluation unit must contain a decoded maze and agent phenome.");
            }

            // Execute all maze/navigator simulations in parallel
            Parallel.ForEach(EvaluationUnits,
                             delegate(MazeNavigatorEvaluationUnit evaluationUnit)
            {
                EvaluationHandler.EvaluateMazeNavigatorUnit(evaluationUnit, _experimentParameters);
            });
        }
Example #2
0
 internal FunctionNode(EvaluationHandler callback)
 {
     Callback = callback;
 }
Example #3
0
 internal FunctionNode(EvaluationHandler callback, IEnumerable <IEvaluable> arguments) : this(callback)
 {
     Arguments = new List <IEvaluable>(arguments);
 }
Example #4
0
 internal FunctionNode(EvaluationHandler callback, params IEvaluable[] arguments) : this(callback, (IEnumerable <IEvaluable>)arguments)
 {
 }