Insect behavior has been demonstrated to be influenced by the presence of certain chemicals in herbaceous plants. In particular, host plant choice by insect herbivores has been shown to depend on the the presence and odor of chemical in the plant. Thus, if the chemical plume reaches far enough, allocation to defense may also be influenced by defense strategies employed by other plants in the environment. We incorporate a neighborhood defense effect by applying spatial evolutionary game theory to optimal resource allocation in plants where cooperators are plants investing in defense and defectors are plants that do not. We use a stochastic dynamic programming model, along with ideas from game theory, to examine how defense strategies in individual plants influence population outcomes in herbaceous plants. We incorporate an individual-based model for the herbivore population and allow the herbivores to move between plants. In this case, defense is only a neighborhood benefit, and this approach yields the possibility of a population evolving to consist of only cooperators or only defectors (pure stable strategy), as well as the possibility of a mixed stable strategy. We show that our model offers a theoretical explanation for the neighborhood effect seen in empirical evidence. This research was done as part of MC's thesis. Data was obtained entirely through simulation and modeling. All code was written by MC, and all analysis, data visualization, and simulation was completed by MC. See the `steps to reproduce' for usage instructions.