private CCESpecies CommonFeatsSpecies()
            {
                // Create a species with all the common features
                CCESpecies s = new CCESpecies();

                s.Selection = new StochasticUniversalSamplingSelection();

                // Use SVLC
                s.Crossover = new SVLC(2, 8);


                // Using mutations with relative probabilites as done in SVLC paper
                List <IMutation> muts    = new List <IMutation> ();
                List <float>     relprob = new List <float> ();

                muts.Add(new PointMutationSmall());
                relprob.Add(6);
                muts.Add(new PointMutationLarge());
                relprob.Add(4);
                muts.Add(new DeletionMutation());
                relprob.Add(5);
                muts.Add(new InsertionMutation());
                relprob.Add(1);
                muts.Add(new ReplicationMutation());
                relprob.Add(1);
                muts.Add(new SlipMutation());
                relprob.Add(1);

                s.Mutation = new MultipleMutations(muts, relprob);


                s.Reinsertion = new FitnessBasedReinsertion();

                return(s);
            }
            private CCESpecies CreateMethodSpecies()
            {
                // Add specific actor features to species
                CCESpecies s = CommonFeatsSpecies();

                s.Name = "Methods";
                s.ID   = 3;

                PMGMethodGenome g = new PMGMethodGenome(
                    RandomizationProvider.Current.GetInt(20, PMGGenomeConfigurations.MethodMaxInitLen),
                    Math.Max(UtilityFunctionsCount, Math.Max(ValueFunctionsCount, ChangeFunctionsCount)));

                s.Population = new Population(MethodMinPopSize, MethodMaxPopSize, g.CreateNew());
                s.Population.GenerationStrategy = new PerformanceGenerationStrategy(1);
                s.Reparation = new PMGRepairFunction(s.ID);
                return(s);
            }
            private CCESpecies CreateActorLocSpecies()
            {
                // Add specific actor features to species
                CCESpecies s = CommonFeatsSpecies();

                s.Name = "Actor Locations";
                s.ID   = 1;

                PMGActorLocationGenome g = new PMGActorLocationGenome(
                    RandomizationProvider.Current.GetInt(20, PMGGenomeConfigurations.ActorLocMaxInitLen),
                    Math.Max(MapH, MapW));

                s.Population = new Population(ActorLocMinPopSize, ActorLocMaxPopSize, g.CreateNew());
                s.Population.GenerationStrategy = new PerformanceGenerationStrategy(1);
                s.Reparation = new PMGRepairFunction(s.ID);
                return(s);
            }
            private CCESpecies CreateEventSpecies()
            {
                // Add specific actor features to species
                CCESpecies s = CommonFeatsSpecies();

                s.Name = "Events";
                s.ID   = 2;

                PMGDynamicEventGenome g = new PMGDynamicEventGenome(
                    RandomizationProvider.Current.GetInt(20, PMGGenomeConfigurations.EventMaxInitLen),
                    Math.Max(ValueFunctionsCount, Math.Max(UtilityFunctionsCount, ConditionFunctionsCount)));

                s.Population = new Population(EventMinPopSize, EventMaxPopSize, g.CreateNew());
                s.Population.GenerationStrategy = new PerformanceGenerationStrategy(1);
                s.Reparation = new PMGRepairFunction(s.ID);
                return(s);
            }
            private CCESpecies CreateActorSpecies()
            {
                // Add specific actor features to species
                CCESpecies s = CommonFeatsSpecies();

                s.Name = "Actors";
                s.ID   = 0;

                PMGActorGenome g = new PMGActorGenome(
                    RandomizationProvider.Current.GetInt(
                        20, PMGGenomeConfigurations.ActorMaxInitLen), PMGGenomeConfigurations.ActorMaxValue);

                // Add a population of actor genomes
                s.Population = new Population(ActorMinPopSize, ActorMaxPopSize, g.CreateNew());
                s.Population.GenerationStrategy = new PerformanceGenerationStrategy(1);
                s.Reparation = new PMGRepairFunction(s.ID);
                return(s);
            }