Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed example 3.5 in README + Added example 4.1 with test #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

swag2198
Copy link

I found that the build_SB_example35() function in the README was incomplete since it did not assign -1 reward to actions which took the agent off-grid. The version inside examples/simple.py had the complete reward matrix and I simply copied few lines in the README to avoid any newcomer's confusion.

Also it took me a while to understand the MDP dynamics in presence of terminal states since an extra absorbing state is added in this framework. Thought it will be good to have Example 4.1 from the book completed inside the same simple examples file. Also added a test to verify the analytic solution of V_pi for that example.

The test also highlights the fact that we need to remove the elements corresponding to the added absorbing state to solve for V_pi correctly i.e., without making the matrix I - gamma * P_pi singular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant