diff --git a/src/ReinforcementLearningBase/src/interface.jl b/src/ReinforcementLearningBase/src/interface.jl index ded25de9e..3a46ae00f 100644 --- a/src/ReinforcementLearningBase/src/interface.jl +++ b/src/ReinforcementLearningBase/src/interface.jl @@ -448,6 +448,10 @@ The state can be of any type. However, most neural network based algorithms assume an `AbstractArray` is returned. For environments with many different states provided (inner state, information state, etc), users need to provide `style` to declare which kind of state they want. + +!!! warning + The state **may** be reused and be mutated at each step. Always remember to make a copy + if this is not what you expect. """ @multi_agent_env_api state(env::AbstractEnv) = state(env, DefaultStateStyle(env)) state(env::AbstractEnv, ss::AbstractStateStyle) = state(env, ss, current_player(env))