public CTRNNNetworkEvaluator(uint inputs, uint outputs, uint hidden) { substrate = new CTRNNSubstrate(inputs, outputs, hidden, HyperNEATParameters.substrateActivationFunction); noveltyArchive = new NoveltyArchive(); }
public void showMovie(string genomeFile, int type) { if (true) // set to false to use hardcoded output values from a file { XmlDocument doc = new XmlDocument(); doc.Load(genomeFile); NeatGenome genome = XmlNeatGenomeReaderStatic.Read(doc); INetwork tempNet = null; INetwork cppn = null; NeatGenome tempGenome = null; Substrate substrate; if (type == 0) { substrate = new CTRNNSubstrate(4, 12, 8, HyperNEATParameters.substrateActivationFunction); } else if (type == 1) { substrate = new SUPGSubstrate(4, 12, 12, HyperNEATParameters.substrateActivationFunction); } else { doClune = true; substrate = new CluneSubstrate(20, 20, 20, HyperNEATParameters.substrateActivationFunction); } cppn = genome.Decode(null); tempGenome = substrate.generateGenome(cppn); tempNet = tempGenome.Decode(null); Controller controller; if (type == 0) { controller = new Controller(tempNet); } else if (type == 1) { controller = new Controller(tempNet, true, tempGenome, cppn, ((SUPGSubstrate)substrate).getSUPGMap()); } else { controller = new Controller(tempNet); } using (var domain = new Domain()) { domain.Initialize(controller); domain.RunDraw(); } } else { using (var domain = new Domain()) { domain.Initialize(); domain.RunDraw(); } } }