private void ActivationFunctionMutation() { string debugMsg = "ActivationFunctionMutation"; int nodeRoll = Random.Range(0, Nodes.Count); NodeGene ng = Nodes[nodeRoll]; if (ng == null) { throw new System.Exception("Node not found! " + nodeRoll); } FTYPE fTYPERoll = ActivationFunctions.RandomFTYPE(); if (fTYPERoll != ng.fTYPE) { debugMsg += " - Changing node " + nodeRoll + " from " + ng.GetFTYPE() + " to " + fTYPERoll; ng.SetFTYPE(fTYPERoll); } else { debugMsg += " - Not changing node. Random node selection was same as previous function type"; } if (ArtGallery.DEBUG_LEVEL > ArtGallery.DEBUG.NONE) { Debug.Log(debugMsg); } }
private void GenerateCPPN() { foreach (NodeGene node in geno.Nodes) { node.fTYPE = ActivationFunctions.RandomFTYPE(); } }
void GenerateCPPN() { foreach (NodeGene node in cppnTest.Nodes) { node.fTYPE = ActivationFunctions.RandomFTYPE(); } cppn = new TWEANN(cppnTest); }
public void SpliceMutation() { //HACK just doing random ftypes for now (selected from active functions) we may want this to optionally use the parent function SpliceMutation(ActivationFunctions.RandomFTYPE()); }