Skip to content

Commit

Permalink
Add study MDP example comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
YouGuessedMyName committed Jul 1, 2024
1 parent be0793e commit 9df743e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions notebooks/study.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@
"pass_test = mdp.new_state(\"pass test\")\n",
"fail_test = mdp.new_state(\"fail test\")\n",
"\n",
"# From the initial state, you can choose to study, or not to study.\n",
"init.set_transitions([\n",
" (study, studied),\n",
" (not_study, not_studied)\n",
"])\n",
"\n",
"# If you studied, then there is a 90% chance that you pass the test.\n",
"studied.set_transitions([\n",
" (9/10, pass_test),\n",
" (1/10, fail_test)\n",
"])\n",
"\n",
"# If you did not study, then there is only a 40% chance that you pass the test.\n",
"not_studied.set_transitions([\n",
" (4/10, pass_test),\n",
" (6/10, fail_test)\n",
Expand Down

0 comments on commit 9df743e

Please sign in to comment.