// Use this for initialization void Start () { //Get sensor info for printing commit = GameObject.Find ("Commit"); pie = commit.GetComponent<PieSliceSensor>(); wall = commit.GetComponent<WallSensor>(); adj = commit.GetComponent<AdjacentSensor>(); ai = commit.GetComponent<AI> (); }
// Use this for initialization void Start () { pos = transform.position; player = GameObject.Find ("Commit"); outputs = new double[2]; net = new NeuralNetwork (9, 2, 6); net.readWeights (); ctrl = player.GetComponent<CommitController> (); wall = player.GetComponent<WallSensor> (); adj = player.GetComponent<AdjacentSensor> (); pie = player.GetComponent<PieSliceSensor> (); }
public NeuralNetworkTrainer(GameObject player) { this.player = player; target = GameObject.Find ("timmoc"); wall = this.player.GetComponent<WallSensor> (); //pie = GetComponent<PieSliceSensor> (); adj = this.player.GetComponent<AdjacentSensor> (); ctrl = this.player.GetComponent<CommitController> (); numWeights = (input * hidden) + (hidden * output) + (hidden + output); readWeights (); nn = new NeuralNetwork (input, output, hidden); nn.setWeights (weights); generation = 0; }