Exemplo n.º 1
0
        private void initMap()
        {
            var mapSizer = new LinearMapSizer(_params.Map.StartSize,
                                              _params.Map.EndSize);

            if (_params.Map.Type.Equals("FixedFeature"))
            {
                _featureMap = new FixedFeatureMap(_params.Search.NumToEvaluate,
                                                  _params.Map, mapSizer);
            }
            else if (_params.Map.Type.Equals("SlidingFeature"))
            {
                _featureMap = new SlidingFeatureMap(_params.Search.NumToEvaluate,
                                                    _params.Map, mapSizer);
            }
            else
            {
                Console.WriteLine("ERROR: No feature map specified in config file.");
            }

            string prefix = "logs/";

            if (_params.Map.SeparateLoggingFolder)
            {
                prefix = "logs/mel";
            }

            string mapName     = string.Format("{0}/map_{1}.csv", prefix, _trialID);
            string summaryName = string.Format("{0}/summary_{1}.csv", prefix, _trialID);

            _map_log     = new FrequentMapLog(mapName, _featureMap);
            _summary_log = new MapSummaryLog(summaryName, _featureMap);
        }
Exemplo n.º 2
0
        private void initMap()
        {
            var mapSizer = new LinearMapSizer(_params.Map.StartSize,
                                              _params.Map.EndSize);

            Console.WriteLine("Map Type: " + _params.Map.Type);
            if (_params.Map.Type.Equals("FixedFeature"))
            {
                _featureMap = new FixedFeatureMap(_params.Search.NumToEvaluate,
                                                  _params.Map, mapSizer);
            }
            else if (_params.Map.Type.Equals("SlidingFeature"))
            {
                _featureMap = new SlidingFeatureMap(_params.Search.NumToEvaluate,
                                                    _params.Map, mapSizer);
            }
            else
            {
                Console.WriteLine("ERROR: No feature map specified in config file.");
            }

            string emitterLabel = "none";

            if (_params.Emitters[0].Type.Equals("Improvement"))
            {
                emitterLabel = "imp";
            }
            else if (_params.Emitters[0].Type.Equals("Optimizing"))
            {
                emitterLabel = "opt";
            }
            else if (_params.Emitters[0].Type.Equals("RandomDirection"))
            {
                emitterLabel = "rd";
            }

            string prefix = "logs/";

            if (_params.Map.SeparateLoggingFolder)
            {
                prefix = string.Format("logs/cma_me_{0}", emitterLabel);
            }

            string mapName     = string.Format("{0}/map_{1}.csv", prefix, _trialID);
            string summaryName = string.Format("{0}/summary_{1}.csv", prefix, _trialID);

            _map_log     = new FrequentMapLog(mapName, _featureMap);
            _summary_log = new MapSummaryLog(summaryName, _featureMap);
        }
Exemplo n.º 3
0
        public MapPopulation(int maxPopulation)
        {
            _maxPopulation   = maxPopulation;
            _populationDeque = new IntervalHeap <Shard>(new ShardComparer());
            _featureMap      = new FeatureMap(NUM_FEATURES, REMAP_FREQUENCY,
                                              NUM_GROUPS_PER_FEATURE);

            _maxWins    = 0;
            _maxFitness = Int32.MinValue;

            _champion_log =
                new RunningIndividualLog(CHAMPION_LOG_FILENAME);
            _fittest_log =
                new RunningIndividualLog(FITTEST_LOG_FILENAME);
            _map_log =
                new FrequentMapLog(ELITE_MAP_FILENAME, _featureMap);
        }
Exemplo n.º 4
0
        private void initMap()
        {
            var mapSizer = new LinearMapSizer(_params.Map.StartSize,
                                              _params.Map.EndSize);

            if (_params.Map.Type.Equals("FixedFeature"))
            {
                _featureMap = new FixedFeatureMap(_params.Search.NumToEvaluate,
                                                  _params.Map, mapSizer);
            }
            else if (_params.Map.Type.Equals("SlidingFeature"))
            {
                _featureMap = new SlidingFeatureMap(_params.Search.NumToEvaluate,
                                                    _params.Map, mapSizer);
            }
            else
            {
                Console.WriteLine("ERROR: No feature map specified in config file.");
            }

            _map_log = new FrequentMapLog("logs/elite_map_log.csv", _featureMap);
        }