WOFOSTGym: A Crop Simulator for Learning Annual and Perennial Crop Management Strategies

1Oregon State University

WOFOSTGym simulates annual and perennial crop growth.

Visualize the evolution of seasonal crop and soil features.

Abstract

We introduce WOFOSTGym, a novel crop simulation environment designed to train reinforcement learning (RL) agents to optimize agromanagement decisions for annual and perennial crops in single and multi-farm settings. Effective crop management requires optimizing yield and economic returns while minimizing environmental impact, a complex sequential decision-making problem well suited for RL. However, the lack of simulators for perennial crops in multi-farm contexts has hindered RL applications in this domain. Existing crop simulators also do not support multiple annual crops. WOFOSTGym addresses these gaps by supporting 23 annual crops and two perennial crops, enabling RL agents to learn diverse agromanagement strategies in multi-year, multi-crop, and multi-farm settings. Our simulator offers a suite of challenging tasks for learning under partial observability, non-Markovian dynamics, and delayed feedback. WOFOSTGym's standard RL interface allows researchers without agricultural expertise to explore a wide range of agromanagement problems. Our experiments demonstrate the learned behaviors across various crop varieties and soil types, highlighting WOFOSTGym's potential for advancing RL-driven decision support in agriculture.

Train RL Agents

ag_train

Training

Using WOFOSTGym you can easily train RL agents with a command line argument that supports a wide range of configuration.

Generating Data

WOFOSTGym also allows the user to generate data using RL or open-loop policies across years and locations for use with offline RL.

Configuration Files

All configuration files in WOFOSTGym are easy-to-read YAML files. The agromanagement file defines a crop and site. WOFOSTGym comes with 25 crop and 3 site YAML files, while the agromanagement file is easy to configure and requires no domain expertise for RL researchers.

crop

Agromanagement File

agro

Wheat File

site

Oregon Site File


Compare the Effects of RL and Open-Loop Policies

After training an RL policy, we visualize its actions and effects on crop and soil features. In the top row, we observe the actions (nitrogen, phosphorus, potassium, and water) that the agent took during an episode. In the bottom row, we observe the effects of the actions on the Weight of the Storage Organs (WSO) and the Potassium Available (KAVAIL).

policy_kavail policy_wso

BibTeX

@article{solow_wofostgym_2025,
      title={WOFOSTGym: A Crop Simulator for Learning Annual and Perennial Crop Management Strategies},
      author={William Solow and Sandhya Saisubramanian and Alan Fern},
      year={2025},
      eprint={2502.19308},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2502.19308},
   }