Exemple #1
0
    // Use this for initialization
    protected override void initializeAgent()
    {
        numInputs = 4;
        numOutputs = 2;
        numLayers = 1;
        numNeuronsPerLayer = 6;

        targetsEnabled = true;
        mouseIsTarget = false;

        userControl = false;

        //Create sensors
        feelers = new Feelers(this, radius*3); 		//TODO add perpendicular feelers to allow agent to know when it's moving along a wall.
        adjAgents = new AdjacentAgents(this, radius*3, grid);
        pieSlices = new PieSlices(this, adjAgents);

        //Create brain and genetic algorithm
        brain = new NeuralNet(numInputs, numOutputs, numLayers, numNeuronsPerLayer);
        setGeneticAlgorithm( new GeneticAlgorithmOld(40, numInputs, numOutputs, numLayers, numNeuronsPerLayer));

        startLocation = transform.position;
        startRotation = transform.rotation;

        createFourTargets();

        reset ();
    }
Exemple #2
0
    // Use this for initialization
    protected override void initializeAgent()
    {
        seekMouse = false;

        //Sensors
        feelers = new Feelers(this, radius*3);
        adjAgents = new AdjacentAgents(this, radius*3, grid);
        pieSlices = new PieSlices(this, adjAgents);
    }