public void createNextGeneration(ArrayList<BuildOrder> orders) {
		Gson gson = new Gson();

		System.out.println("The following build orders will survive in the gene pool: ");
		for (BuildOrder order : orders) {
			System.out.println(gson.toJson(order));
		}

		try {
			File knowledgeBase = new File(knowledgeBasePath);
			BufferedWriter writer = new BufferedWriter(new FileWriter(
					knowledgeBase, false));
			KnowledgeBaseObject kb = new KnowledgeBaseObject();
			kb.index = 0;
			kb.iterationNum = iterNum + 1;
			kb.readyToMutate = false;
			kb.orders = new ArrayList<BuildOrder>();

			// Keep the original 3 winners, but update their index
			for (BuildOrder order : orders) {
				order.score = -1;
				kb.orders.add(order);
			}

			System.out.println("Cross Breeding...");

			for (BuildOrder first : orders) {
				for (BuildOrder second : orders) {
					if (first == second) {
						continue;
					}
					System.out.println(first + " mating " + second);
					BuildOrder newOrder = new BuildOrder();
					newOrder.score = -1;
					newOrder.order = crossBreed(first.order, second.order);
					kb.orders.add(newOrder);
				}
			}

			BuildOrder one = orders.get(0);
			one.order = mutate(one.order);
			one.score = -1;
			kb.orders.add(one);
			BuildOrder two = orders.get(1);
			two.order = mutate(two.order);
			two.score = -1;
			kb.orders.add(two);
			BuildOrder three = orders.get(2);
			three.order = mutate(two.order);
			three.score = -1;
			kb.orders.add(three);

			// Flip 2 random moves in the original 3 to add some mutation to
			// the mix
			writer.write(gson.toJson(kb));

			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}