public void Reproduce(GameObject parent1, GameObject parent2) { network = new NeuralNetwork(parent1.GetComponent <CarController>().GetNetwork()); network.Reproduce(parent2.GetComponent <CarController>().GetNetwork()); color.MixColors(parent1.GetComponent <CarController>().GetColor(), parent2.GetComponent <CarController>().GetColor()); color.MutateColor(); color.ModifyColor(); color.V = 1f; }
public void Mutate(GameObject parent) { network = new NeuralNetwork(parent.GetComponent <CarController>().GetNetwork()); network.Mutate(); color = parent.GetComponent <CarController>().GetColor(); color.MutateColor(); color.ModifyColor(); color.V = 1f; }