public static void main(String[] args)
    {
        final CmdLineOptions cmdLineOptions = new CmdLineOptions(args);

        int levelLength = cmdLineOptions.getLevelLength();

        final int[] timeLimits = new int[]{/*levelLength / 10,
                                           levelLength*2 / 10,*/
                                           levelLength*4 / 10};

        final int[] levelDifficulties = new int[]{0, 1, 2, 3, 4, 5, 6, 12, 16, 20};
        final int[] levelTypes = new int[]{0, /*1, 2*/};
        final int[] levelLengths = new int[]{320/*, 320, 320, 320, 320, 320*/};
        final boolean[] creaturesEnables = new boolean[]{true};
        int levelSeed = cmdLineOptions.getLevelRandSeed();
//        cmdLineOptions.setVisualization(false);
        cmdLineOptions.setFPS(80);  //100
        //cmdLineOptions.setLevelRandSeed(6189642);
        cmdLineOptions.setLevelRandSeed(0);

//        final Environment environment = new MarioEnvironment();
        //final Agent agent = new ForwardJumpingAgent();
        final Agent agent = cmdLineOptions.getAgent();
//        final Agent agent = (SimpleCNAgent) Easy.load("sergeypolikarpov.xml");
//        System.out.println("agent = " + agent);

        //((grammaticalbehaviors.GEBT_Mario.GEBT_MarioAgent)agent).loadBehaviorTree("pathFollower.xml");

        if(args[1].equalsIgnoreCase("grammaticalbehaviorsNoAstar.GEBT_Mario.GEBT_MarioAgent"))
        {
            //((grammaticalbehaviorsNoAstar.GEBT_Mario.GEBT_MarioAgent)agent).loadBehaviorTree("bestIndividual_GEBT_MarioAgent_NoAstar.xml");
            ((grammaticalbehaviorsNoAstar.GEBT_Mario.GEBT_MarioAgent)agent).loadBehaviorTree("RunRightSafe.xml");

        }else if(args[1].equalsIgnoreCase("grammaticalbehaviors.GEBT_Mario.GEBT_MarioAgent")){
            ((grammaticalbehaviors.GEBT_Mario.GEBT_MarioAgent)agent).loadBehaviorTree("bestIndividual_GEBT_MarioAgent.xml");
            //((grammaticalbehaviors.GEBT_Mario.GEBT_MarioAgent)agent).loadBehaviorTree("pathFollower.xml");
        }

        cmdLineOptions.setAgent(agent);
        final BasicTask basicTask = new BasicTask(cmdLineOptions);
        float fitness = 0;
        boolean verbose = false;
        int trials = 0;
        int disqualifications = 0;


        // todo: include level lengths.

        for (int ll : levelLengths)

        for (int levelDifficulty : levelDifficulties)
        {
            for (int levelType : levelTypes)
            {
                for (boolean creaturesEnable : creaturesEnables)
                {
                    for (int timeLimit : timeLimits)
                    {
                        trials ++;
                        cmdLineOptions.setLevelLength(ll);
                        cmdLineOptions.setLevelDifficulty(levelDifficulty);
                        cmdLineOptions.setLevelType(levelType);
                        cmdLineOptions.setPauseWorld(!creaturesEnable);
                        cmdLineOptions.setTimeLimit(timeLimit);
                        basicTask.reset(cmdLineOptions);
                        if (!basicTask.runOneEpisode())
                        {
                            System.out.println("MarioAI: out of computational time per action!");
                            disqualifications++;
                            continue;
                        }
                        EvaluationInfo evaluationInfo = basicTask.getEnvironment().getEvaluationInfo();
                        float f = evaluationInfo.computeMultiObjectiveFitness();
                        if (verbose)
                        {
                            System.out.println("LEVEL OPTIONS: -ld " + levelDifficulty + " -lt " + levelType + " -pw " + !creaturesEnable +
                                " -tl " + timeLimit);
                            System.out.println("Intermediate SCORE = " + f + "; Details: " + evaluationInfo.toStringSingleLine());
                        }
                        fitness += f;
                    }
                }
            }
        }

        System.out.println("trials = " + trials);
        System.out.println("disqualifications = " + disqualifications);
        System.out.println("GamePlayEvaluation final score = " + fitness);

//        EvaluationInfo evaluationInfo = new EvaluationInfo(environment.getEvaluationInfoAsFloats());
//        System.out.println("evaluationInfo = " + evaluationInfo);
        System.exit(0);
    }