Reset Terminal States in Grid World example using RL Toolbox

Using the Grid World example in the Reinforcement Learning Toolbox, I would like to reset the Terminal States at the end of each episode as well as the Current State (starting location). Would this be possible using the toolbox and if so, how would I code this?

Answers (1)

Among those three ways, you’re looking either for the second or third option.
Both these examples are written for the cart pole environment. Since your requirement is to modify the reset behaviour in a Grid World environment, you will need to modify the properties accordingly. A list of properties of the Grid World is given at https://www.mathworks.com/help/reinforcement-learning/ug/create-custom-grid-world-environments.html. As you will see on the page, the ‘CurrentState’ and ‘TerminalStates’ property are not Read-Only and can therefore be modified in your custom reset function.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products

Release

R2019b

Tags

Asked:

on 18 Nov 2019

Answered:

on 30 Dec 2019

Community Treasure Hunt

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

Start Hunting!