MATLAB Answers

How to give initial observations for RL if multiple ObservationInfo are used?

29 views (last 30 days)
Wing Yin Ng
Wing Yin Ng on 12 Dec 2020
Answered: Madhav Thakker on 9 Feb 2021
Hello everyone, I want to use the RL toolbox in my work. In my custom environment, it has several observations that are in rlNumericSpec, and others are in rlFiniteSetSpec.
I understand that in order to create an ObservationInfo, I can use:
Observation(1) = rlNumericSpec([4 1]);
Observation(2) = rlFiniteSetSpec([1 2 3]);
...
However, in my custom reset (as well as step) function, how should I return the observation, so that the system can recognized it?

Answers (1)

Madhav Thakker
Madhav Thakker on 9 Feb 2021
Hi Wing Yin Ng,
I understand you want to write custom reset & step function. This MATLAB example talks about how to do the same. Note that you'll have to keep these functions in your current working folder or on the MATLAB path as mentioned here.
Hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!