private void setupSubstrate() { if (isMulti) { substrate = new SkirmishSubstrate(25, 15, 25, HyperNEATParameters.substrateActivationFunction); network = substrate.generateMultiGenomeModulus(seedGenome.Decode(null), 5).Decode(null); } else { substrate = new SkirmishSubstrate(5, 3, 5, HyperNEATParameters.substrateActivationFunction); network = substrate.generateGenome(seedGenome.Decode(null)).Decode(null); } }
private void loadCCEAGenomesToolStripMenuItem_Click(object sender, EventArgs e) { using (var dlg = new OpenFileDialog()) { dlg.Multiselect = true; dlg.Filter = "*.xml|*.xml"; if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } var fileNames = dlg.FileNames; if (fileNames.Length != 5) { MessageBox.Show("You must select 5 files!"); return; } Array.Sort(fileNames); INetwork[] predNetworks = new INetwork[5]; for (int i = 0; i < predNetworks.Length; i++) { try { XmlDocument doc = new XmlDocument(); doc.Load(fileNames[i]); var genome = XmlNeatGenomeReaderStatic.Read(doc); var curSubstrate = new SkirmishSubstrate(5, 3, 5, HyperNEATParameters.substrateActivationFunction); predNetworks[i] = curSubstrate.GenerateGenome(genome.Decode(null)).Decode(null); } catch (Exception ex) { MessageBox.Show(ex.ToString()); return; } } this.isMulti = false; SkirmishNetworkEvaluator.NetworkPerPred = predNetworks; } }
public SkirmishCCEANetworkEvaluator(int agentId) { m_agentId = agentId; m_substrate = new SkirmishSubstrate(5, 3, 5, HyperNEATParameters.substrateActivationFunction); }