Beispiel #1
0
        /// <summary>
        ///     Construct the EA worker.
        /// </summary>
        /// <param name="theTrain">The trainer.</param>
        /// <param name="theSpecies">The species.</param>
        public EAWorker(BasicEA theTrain, ISpecies theSpecies)
        {
            _train   = theTrain;
            _species = theSpecies;
            _rnd     = _train.RandomNumberFactory.Factor();

            _parents  = new IGenome[_train.Operators.MaxParents()];
            _children = new IGenome[_train.Operators.MaxOffspring()];
        }
        /// <summary>
        ///     Construct the EA worker.
        /// </summary>
        /// <param name="theTrain">The trainer.</param>
        /// <param name="theSpecies">The species.</param>
        public EAWorker(BasicEA theTrain, ISpecies theSpecies)
        {
            _train = theTrain;
            _species = theSpecies;
            _rnd = _train.RandomNumberFactory.Factor();

            _parents = new IGenome[_train.Operators.MaxParents()];
            _children = new IGenome[_train.Operators.MaxOffspring()];
        }