예제 #1
0
        public IPDDomain(IGenomeDecoder <NeatGenome, IBlackBox> genomeDecoder, ref IPDExperiment.Info info)
        {
            InitializeComponent();

            try
            {
                _genomeDecoder = genomeDecoder;
                _info          = info;

                _players    = new IPDPlayer[info.OpponentPool.Length + 1];
                _players[0] = new Players.IPDPlayerPhenome(null);
                Array.Copy(info.OpponentPool, 0, _players, 1, info.OpponentPool.Length);
                _games = new IPDGame[info.OpponentPool.Length + 1, info.OpponentPool.Length + 1];
                for (int i = 1; i < _players.Length; i++)
                {
                    for (int j = 1; j < _players.Length; j++)
                    {
                        _games[i, j] = info.OpponentPoolGames[i - 1, j - 1];
                    }
                }


                SuspendLayout();
                CreateTable();
                CreateArchiveGraph();
                CreateInfoLabel();
                CreateSSButtons();
                ResumeLayout();
            }
            catch
            {
            }
        }
예제 #2
0
 public IPDEvaluator(ref IPDExperiment.Info info)
 {
     _info = info;
     _info.BestNoveltyGenome = () => { var m = _archive.Max(); return(m.Phenome); };
     _info.Archive           = () => { return(_archive); };
     _info.Evaluations       = () => { return(EvaluationCount); };
     PhenomeInfo.Initialize(info);
 }
예제 #3
0
            public static void Initialize(IPDExperiment.Info info)
            {
                _evaluationMode = info.EvaluationMode;
                switch (_metric = info.NoveltyMetric)
                {
                default:
                case IPDExperiment.NoveltyMetric.Score:
                    _distance = (a, b) => { return(Math.Abs(a.Score - b.Score)); }; break;

                case IPDExperiment.NoveltyMetric.Choice:
                case IPDExperiment.NoveltyMetric.Past:
                    _distance = (a, b) => { return(MathNet.Numerics.Distance.SSD(a._pc, b._pc)); }; break;
                }
            }