docs: private String generateSamples() {
  		String output = "";
  
  		tabs = 2;
  
  		Stack<Action> actions = new Stack<>();
  		actions.add(selectNextSample());
  		while( !actions.empty() ) {
  			Action action = actions.peek();
  			System.out.println("Action bit="+action.bit+" up="+action.sampleUp+" n="+action.consider+" TOTAL="+actions.size());
  			debugSampleState();
  
  			if( action.consider == 0 ) {
  				// First time this action is considered assume it's outcome is true
  				output += strSample(tabs++,action);
  				action.consider++;
  				if( action.sampleUp ) {
  					samples[action.bit].add(Sample.UP);
  				} else {
  					samples[action.bit].add(Sample.DOWN);
  				}
  			} else if( action.consider == 1 ){
  				// Second time consider what to do if it's outcome is false
  				output += strElse(tabs++);
  				action.consider++;
  				removeSample(action.bit);
  				System.out.println("removed sample");
  				debugSampleState();
  				updateSamples(action);
  			} else {
  				// Remove consideration of this action and reconsider the previous one
  				removeSample(action.bit);
  				output += strCloseIf(tabs--);
  				actions.pop();
  				continue;
  			}
  
  			// See if a solution has been found.
  			Solution solution = checkSoluton();
  			if( solution != null ) {
  				// If a solution hsa been found return and mark the first bit as being found so that
  				// it won't detect the same corner twice
  				output += strReturn(tabs--,solution.up?1:-1);
  				// Don't add a new action. Instead consider other outcomes from previous action
  			} else {
  				// Wasn't able to find a solution. Sample another bit
  				action = selectNextSample();
  				if( action == null ) {
  					// No need to sample since it has proven that there is no pixel
  					output += strReturn(tabs--,0);
  				} else {
  					actions.add(action);
  				}
  			}
  		}
  
  		return output;
  	}