public static void GenerateGevaLevel(String[] args, bool isGenSimComp, bool isDirRandomized,
                                             bool isRopesRandomized)
        {
            List <TLEvent> events = TLEventConverter.ConvertToItems(args[1]);
            int            MAXTRY = 40;

            GenSimAgentWrapper agent;

            if (!isGenSimComp)
            {
                List <ActionTimePair> aTPairs = GenSimHelper.ConvertTLEventstoActionTimePair(events);
                agent = new GenSimAgentWrapper(aTPairs, MAXTRY, false);
            }
            else
            {
                List <CATimePair> caTPairs = GenSimHelper.ConvertTLEventstoCATimePair(events);
                agent = new GenSimAgentWrapper(caTPairs, isDirRandomized, isRopesRandomized, MAXTRY, false);
            }
            DateTime d1 = DateTime.Now;

            agent.ScatterComps();
            DateTime d2 = DateTime.Now;

            float fitness = GetFitness(agent.WAgent);

            PrintToFile(args, isGenSimComp, agent.WAgent, fitness, d1, d2);
        }
        public static void TestGevaLevelCAAll(String[] args, bool isTestingOn, bool isGenSimComp)
        {
            List <TLEvent>     events = TLEventConverter.ConvertToItems(args[1]);
            GenSimAgentWrapper agent;

            if (!isGenSimComp)
            {
                List <ActionTimePair> aTPairs = GenSimHelper.ConvertTLEventstoActionTimePair(events);
                agent = new GenSimAgentWrapper(aTPairs, 20, isTestingOn);
            }
            else
            {
                List <CATimePair> caTPairs = GenSimHelper.ConvertTLEventstoCATimePair(events);
                agent = new GenSimAgentWrapper(caTPairs, true, true, 20, isTestingOn);
            }

            //List<CATimePair> caTPairs = GenSimHelper.ConvertTLEventstoCATimePair(events);
            //GenSimAgent agent = new GenSimAgent(caTPairs, true, true)
            agent.ScatterComps();

            if (isGenSimComp)
            {
                if (agent.WAgent.Actions.Count > 0)
                {
                    SimulateOnWindow(agent.WAgent);
                }
            }

            float fitness = GetFitness(agent.WAgent);

            PrintToFile(args, isGenSimComp, agent.WAgent, fitness, DateTime.Now, DateTime.Now);


            //new EngineShotsManager().TakeEngineShot();

            if (isGenSimComp)
            {
                if (agent.WAgent.Actions.Count > 0)
                {
                    StreamWriter sw = new StreamWriter(@"C:\CTREngine\GenSimLevelsTest.txt", true);
                    sw.WriteLine(GetListString(agent.WAgent.Simulator.CookiePosList));
                    sw.WriteLine(GetListString(ActionsExecuterGenSim.CookiePosList));
                    sw.Flush();
                    sw.Close();
                }
            }
        }