For a long time, well pattern optimization mainly relies on human experience, numerical simulations are used to test different development plans and then a preferred program is chosen for field implementation. However, this kind of method cannot provide suitable optimal well pattern layout for different geological reservoirs. In recent years, more attentions have been paid to propose well placement theories combining optimization algorithm with reservoir simulation. But these theories are mostly applied in a situation with a small amount of wells. For numerous wells in a large-scale reservoir, it is of great importance to pursue the optimal well pattern in order to obtain maximum economic benefits. The idea in this paper is originated from the idea presented by Onwunalu and Durlofsky (2011, “A New Well-Pattern-Optimization Procedure for Large-Scale Field Development,” SPE J., 16(3), pp. 594-607), which focuses on well pattern optimization, and the innovations are as follows: (1) Combine well pattern variation with production control to get the optimal overall development plan. (2) Rechoose and simplify the optimization variables, deduce the new generation process of well pattern, and use perturbation gradient to solve mathematical model in order to ensure efficiency and accuracy of final results. (3) Constrain optimization variables by log-transformation method. (4) Boundary wells are reserved by shifting into boundary artificially to avoid abrupt change of objective function which leads to a nonoptimal result due to gradient discontinuity at reservoir edge. The method is illustrated by examples of homogeneous and heterogeneous reservoirs. For homogeneous reservoir, perturbation gradient algorithm yields a quite satisfied result. Meanwhile, heterogeneous reservoir tests realize optimization of various well patterns and indicate that gradient algorithm converges faster than particle swarm optimization (PSO).