public ArrayList<Double> run(){
        for(int i = 0; i<connections.size(); i++){
            if(connections.get(i).getGiveNeuron()==null) System.out.println("Error 1:: NeuralNetwork 368");
            if(connections.get(i).getRecieveNeuron()==null) System.out.println("Error 2:: NeuralNetwork 369");
            if(connections.get(i).getGiveNeuron().equals(connections.get(i).getRecieveNeuron()))
                connections.remove(connections.get(i));
        }
        ArrayList<OutputNeuron> outputNs=findOutputs();
        ArrayList<InputNeuron> inpuNs=findInputs();
        if(inpuNs.size()==0){
            System.out.println("there are no input neurons");
            System.exit(0);
        }
        ArrayList<Double> results=new ArrayList<>();
        for(int i=0;i<outputNs.size();i++){
            outputNs.get(i).evaluate();
            results.add(outputNs.get(i).getOutput());
        }
        nextGeneration();
        return results;
    }