@Override
	public double[] evaluate(double[] parameters) {
		if(this.numberOfEvaluation <= 0){
			return null;
		}
		this.numberOfEvaluation -= 1;
		
		controllers.singlePlayer.ucbOptimizerAgent.Agent.parameters = parameters;
		
		double[] results = new double[this.getNumberOfObjectives()];
		for(int i=0; i<this.gamePaths.length; i++){
			double totalWins = 0;
			double totalScore = 0;
			for(int j=0; j<this.repetition; j++){
				double[] gameResults = null;
				do{
					gameResults = ArcadeMachine.runOneGame(this.gamePaths[i], this.levelPaths[i], false, 
							"controllers.singlePlayer.ucbOptimizerAgent.Agent", null, new Random().nextInt(), 0);
				}while(gameResults[0] < -10);
				
				totalWins += Math.max(gameResults[0], 0);
				totalScore += gameResults[1];
			}
			results[i] = 1000 * totalWins / this.repetition + totalScore / this.repetition;
		}
		
		return results;
	}