public NeuralNetwork(int input, int hidden, int output) {
    	this.neuronCnt = input + hidden + output;
    	
        for (int i = 0; i < input; i++) {		// input layer
            Neuron neuron = new Neuron();
            inputLayer.add(neuron);
        }
        
        Neuron bias = new Neuron();
        
        for (int i = 0; i < hidden; i++) {		// hidden layer
        	Neuron neuron = new Neuron();
            neuron.addInConnectionsS(inputLayer);
            neuron.addBiasConnection(bias);
            hiddenLayer.add(neuron);
        }
        
        for (int i = 0; i < output; i++) {		// output layer
        	Neuron neuron = new Neuron();
            neuron.addInConnectionsS(hiddenLayer);
            neuron.addBiasConnection(bias);
            outputLayer.add(neuron);
        }
 
        for (Neuron neuron : hiddenLayer) {					// initialize random weights
            ArrayList<Connection> connections = neuron.getAllInConnections();
            for (Connection conn : connections) {
                double newWeight = getRandom();
                conn.setWeight(newWeight);
            }
        }
        for (Neuron neuron : outputLayer) {
            ArrayList<Connection> connections = neuron.getAllInConnections();
            for (Connection conn : connections) {
                double newWeight = getRandom();
                conn.setWeight(newWeight);
            }
        }
 
        Neuron.counter = 0;						// reset id counters
    }