Setting Observation space at runtime

Hello,

I am creating a maze environment and want to create an array of visited cells which serve as an vector input for the agent. As I want to be able to modify the maze size at runtime, I need a way to change the obeservation size at runtime.
I tried something like:

GetComponent<BehaviorParameters>().BrainParameters.VectorObservationSize += maze_rows * maze_cols;

but I still get the Error that more observations have been made than the observation size.
Any ideas?

Currently changing observation size at run time is not supported. In your case you could probably try sending observation with a fixed size of the size of your maze and change the state of each cell in the maze representation.

If you have a specific case that requires changing the observation size during run time, you can make a feature request on ML-Agents GitHub page.

Thanks I will use that for now!