Пример #1
0
        private void reset()
        {
            if (_featureMap.EliteMap.Count == 0)
            {
                _mean = LA.Vector <double> .Build.Dense(_numParams);
            }
            else
            {
                _mean = DenseVector.OfArray(_featureMap.GetRandomElite().ParamVector);
            }
            _direction = LA.Vector <double> .Build.Dense(_featureMap.NumFeatures);

            for (int i = 0; i < _featureMap.NumFeatures; i++)
            {
                _direction[i] = Sampler.gaussian() * _featureMap.GetFeatureScalar(i);
            }

            _mutationPower = _params.MutationPower;
            _pc            = LA.Vector <double> .Build.Dense(_numParams);

            _ps = LA.Vector <double> .Build.Dense(_numParams);

            _C = new DecompMatrix(_numParams);

            _individualsEvaluated = 0;
        }
Пример #2
0
        private void reset()
        {
            if (_featureMap.EliteMap.Count == 0)
            {
                _mean = LA.Vector <double> .Build.Dense(_numParams);
            }
            else
            {
                _mean = DenseVector.OfArray(_featureMap.GetRandomElite().ParamVector);
            }

            _mutationPower = _params.MutationPower;
            _pc            = LA.Vector <double> .Build.Dense(_numParams);

            _ps = LA.Vector <double> .Build.Dense(_numParams);

            _C = new DecompMatrix(_numParams);

            _individualsEvaluated = 0;
        }