/// <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); }); }
internal FunctionNode(EvaluationHandler callback) { Callback = callback; }
internal FunctionNode(EvaluationHandler callback, IEnumerable <IEvaluable> arguments) : this(callback) { Arguments = new List <IEvaluable>(arguments); }
internal FunctionNode(EvaluationHandler callback, params IEvaluable[] arguments) : this(callback, (IEnumerable <IEvaluable>)arguments) { }