Beispiel #1
0
    private void MutateGenom(NEAT network)
    {
        float currentRate = linkMutateRate;

        if (Random.Range(0, 100) < currentRate)
        {
            network.LinkMutate();
        }

        currentRate = nodeMutateRate;
        if (Random.Range(0, 100) < currentRate)
        {
            network.NodeMutate();
        }

        currentRate = disableEnableMutateRate;
        if (Random.Range(0, 100) < currentRate)
        {
            network.DisableMutate();
        }

        currentRate = pointMutateAmount;
        while (currentRate > 0)
        {
            if (Random.Range(0, 100) < currentRate)
            {
                network.PointMutate(pointMutateAmount);
            }

            currentRate--;
        }
    }
Beispiel #2
0
 public void NodeMutate()
 {
     NEATNetowrk.NodeMutate();
 }