public static void localMinPointsXOR(String filename, int reps, int epochsPerRep, double maxError,
			ANN ann, double[][] inputs, double[][] outputs) throws IOException {

		double[][] pinputs = Arrays.copyOf(inputs, inputs.length);
		double[][] poutputs = Arrays.copyOf(outputs, outputs.length);
		File file = new File(filename); //new File("omg_ann_or.txt");
		FileWriter f = new FileWriter(file.getAbsolutePath());
		f.write("0\t");
		for (int i = 1; i <= outputs.length; i++) {
			f.write(i + "\t");
		}
		for (int i = 1; i <= outputs.length; i++) {
			f.write(i + "\t");
		}
		f.write("\n");
		for (int q = 0; q < reps; q++) {
			ann.reset();
			for (int i = 0; i < epochsPerRep; i++) {
				ANN.permute(pinputs, poutputs);
				for (int j = 0; j < inputs.length; j++) {
					Pattern trial = new Pattern(inputs[j], outputs[j]);
					ann.pass(trial);
					ann.updateAllWeights(trial);
				}
			}
			double[][] outs = ann.outputs(inputs);
			double err = ANN.populationError(outs, outputs);
			if (err > maxError) {
				if (err > 0.075) {
					f.write("MIN1\t");
					for (double[] out : outs) {
						f.write("\t");
					}
				} else {
					f.write("MIN2\t");
				}
				for (double[] out : outs) {
					f.write(out[0] + "\t");
				}
				f.write("\n");
			}
		}
		f.close();
	}