private static <T> void generateGenerators(GameAIInterface<T> ai,
			GameMapConverter<T> converter, int populationSize, int generations, int mapSampleSize, int numGens) {

		long timeStamp = System.currentTimeMillis();
		for (int i = 0; i < numGens; i++) {
			Generator<T> gen = runGA(ai, converter, populationSize, generations, mapSampleSize);
			if (gen != null) {
				try {
					String filename = "GeneratorsTest" + timeStamp
							+ "/Generator" + i + ".gen";
					File file = new File(filename);
					file.getParentFile().mkdirs();
					FileOutputStream fos = null;
					ObjectOutputStream out = null;
					fos = new FileOutputStream(file);
					out = new ObjectOutputStream(fos);

					System.out.println("Running GA to find generator #"
							+ (i + 1));

					out.writeObject(gen);

					out.close();
				} catch (IOException ex) {
					ex.printStackTrace();
				}
			}
		}

	}