Delineating the well number and trajectory is an important step of any field development project. Drilling a well is an expensive undertaking and if done right, has the potential to tip the NPV of the project from a marginal venture to a liquid gold mine. This book presents a computer-assisted approach of determining the optimal well trajectory using an adjoint-based optimization technique. The algorithm is based on surrounding the wells with dummy wells. The sum of the gradients of the objective function with respect to the flowrate in each dummy well over the life-time of the reservoir is used to define an improved well trajectory. The whole process is repeated to achieve the maximum NPV. To ensure drillability of well trajectories, a boundary condition is also implemented. In addition, this book also presents an approach to optimize well numbers. This algorithm is based on drilling a dense quasi-well configuration to get an initial knowledge of the reservoir and utilizing thisknowledge along with dummy well gradients to reduce the well count. Packed with several illustrations, the book is a valuable reference to maximize the NPV of a field by optimizing various well parameters.