Esempio n. 1
0
        public static GaData ToGaConjOrbitData(
            this IRando randy, uint order,
            uint sorterCount, uint sortableCount, uint stageCount,
            double sorterWinRate, double sortableWinRate)
        {
            var randomSortablePool  = randy.ToRandomSortablePool(order, sortableCount);
            var conjOrbitGenomePool = randy.ToGenomePoolConjOrbits(order, stageCount, sorterCount);

            var d = new Dictionary <string, object>();

            d.SetCurrentStep(0);
            d.SetSeed(randy.NextInt());
            d.SetSorterWinRate(sorterWinRate);
            d.SetSortablePool(randomSortablePool);
            d.SetSortableWinRate(sortableWinRate);
            d.SetConjOrbitGenomePool(conjOrbitGenomePool);

            return(new GaData(d));
        }