Beispiel #1
0
        public static Hashtable generateEmptyGenome(int amount)
        {
            Hashtable genome = new Hashtable();

            float[] joints = new float[amount];
            TREEUtils.fillArray(6, joints);
            genome.Add("joints", joints);
            float[] divs = new float[amount];
            TREEUtils.fillArray(1, divs);
            genome.Add("divs", divs);
            genome.Add("rads", new float[amount]);
            float[] length = new float[amount];
            TREEUtils.fillArray(1, length);
            genome.Add("length", length);
            float[] angles = new float[amount];
            TREEUtils.fillArray(30, angles);
            genome.Add("angles", angles);
            genome.Add("start", new float[amount]);
            genome.Add("width", new float[amount]);
            float[] end = new float[amount];
            TREEUtils.fillArray(-1, end);
            genome.Add("end", end);
            return(genome);
        }