private void generateLookupTable() {
		for (int i = 0; i < 512; i++) {
			boolean[] bits = toBinaryArray(i, 9);
			int liveNeighbors = 0;
			for (int j = 0; j < 9; j++) {
				if (bits[j] && j != 4) {
					liveNeighbors++;
				}
			}
			boolean isLiving = bits[4];
			if (!isLiving && liveNeighbors == 3) {
				lookupTable[i] = true;
			} else if (isLiving && (liveNeighbors == 2 || liveNeighbors == 3)) {
				lookupTable[i] = true;
			} else {
				lookupTable[i] = false;
			}
		}
	}