public void step(Dimensions boundaries, ArrayList<Agent> l) {
    	clearSensors();
    	findCaptain();
        NetworkResults result = c.generateMove(input);
        iterations--;
        if(result.group_id == 0 && captain != null && iterations < -20)
        {
        	// randomly decide if to join another group, if we're not the captain
        	System.out.println("Maybe joining another group.");
        	double r = Math.random();
        	if(r > 0.5){
        		System.out.println("new group for this agent!");
        		// remove this group, add to another
        		j.remove_agent(group_id, this);
        	}
        	iterations = 0;
        }
        if(input[15] == 1 && iterations < -20)
        {
        	j.addToOtherGroup(this);
        	iterations = 0;
        }
        move(result.x_axis, result.y_axis, boundaries);
    }