Пример #1
0
 public EvolutionStrategy()
 {
     this._random      = new Random();
     this._tpdict      = null;
     this._chromosomes = null;
     this._tp_size     = 2;
     this._iteration   = 0;
     this._warp        = null;
     this._borders     = null;
 }
Пример #2
0
        public void InitializePatternDictionary(List <int[, ]> input_samples, int tp_size, WarpOptions warp, BorderOptions borders)
        {
            List <int> sizes = new List <int>();

            for (int i = 1; i <= tp_size; i++)
            {
                sizes.Add(i);
            }
            this._tpdict  = new TPDict(input_samples, sizes, warp, borders);
            this._tp_size = tp_size;
            this._warp    = warp;
            this._borders = borders;
        }
Пример #3
0
        public Chromosome(TPDict tpdict, Random random, int width, int height)
        {
            this._tpdict = tpdict;
            this._random = random;

            this._epsilon    = 1e-6;
            this._first      = -1e6;
            this._second     = -1e6;
            this._fitness    = -1e6;
            this._calculated = false;

            this._width  = width;
            this._height = height;
            this._map    = new int[height, width];
            this._locked = new bool[height, width];
        }