Example for policy evaluation in a small gridworld problem

Version 1.2 (3.29 KB) by Panagiotis
The files contain the algorithm to estimate the values of states in finite gridworld using random policy for movements
4 Downloads
Updated 12 Aug 2024

View License

This small problem solution corresponds to Example 4.1 from the book:
"Reinforcement Learning An Introduction"
second edition
by Richard S. Sutton and Andrew G. Barto
ISBN: 978-0-262-19398-6
The code estimates the value of a starting point grid, using randomly selected actions-movements until the exit grid is reached

Cite As

Panagiotis (2025). Example for policy evaluation in a small gridworld problem (https://uk.mathworks.com/matlabcentral/fileexchange/171099-example-for-policy-evaluation-in-a-small-gridworld-problem), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!

grid_world_example_analytical

grid_world_example_expected_value_with_sampling

Version Published Release Notes
1.2

have added both analytical (according to book algorithm) and sampled policy evaluation
Both converge to the same value

1.1.0

added descritpion

1.0.0