We consider full-wave optimizations of photonic crystals (PhCs) involving dielectric rods to obtain desired output patterns for given excitations. Starting from a full grid, each rod is kept or extracted in order to maximize the power density at different output locations. PhCs are modeled as three-dimensional structures, which are analyzed via surface integral equations and the multilevel fast multipole algorithm, in order to investigate realistic problems without resorting to infinite-length assumptions. MLFMA is integrated into genetic algorithms that enable flexible cost functions for the optimizations. Numerical results involving different structures demonstrate the capabilities of the optimization environment.