After a growing season is completed, gym-DSSAT provides a visualization interface both for raw state variables or rewards.


To vizualise the time of state variables of a trajectory, you can call:

env.render(type='ts',  # time series mode
        feature_name_1='nstres',  # mandatory first raw state variable, here the nitrogen stress factor (unitless)
        feature_name_2='grnwt')  # optional second raw state variable, here the grain weight (kg/ha)

Nitrogen stress (unitless) and grain yield (kg/ha) against Day Of Year (DOY)#


All variables in env._state are available for rendering. You can find the list and agronomical meaning in gym environment’s yaml configuration file in the state key.


Raw reward#

For quick reward inspection, you can use:

env.render(type='reward')  # plot reward time series (DOY for Day Of Year)

Reward for a single trajectory against Day Of Year (DOY)#

Cumulated reward#

Simply adding the cumsum=True argument, you can visualize the (undiscounted) cumulated reward.

env.render(type='reward', cumsum=True)  # if you want cumulated rewards

Cumulated reward for a single trajectory against Day Of Year (DOY)#