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

Improved script for ex. 4.7 #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CorentinJ
Copy link

Hello, I have submitted my code for the exercise 4.7, in place of the current one.

  • It is optimized using vectorization and memoization. It takes under a minute to compute the optimal policy.
  • The code is configurable through global constants
  • The additional constraints from the exercise 4.7 have been implemented
  • The code produces a pretty plot of the policy and of the value function

I also didn't get results exactly equal to that of the book, but they're very close.

Plot of the base problem as presented in example 4.2:
image

After introducing the two nonlinearities:
image

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