Commit 5515df52 authored by Steven Cordwell's avatar Steven Cordwell

Update README.rst

Use Python code block directive for the example usage. Link to the license file.
parent 6ad0c1a6
......@@ -98,12 +98,13 @@ import the module, set up an example Markov decision problem using a discount
value of 0.9, solve it using the value iteration algorithm, and then check the
optimal policy.
>>> import mdptoolbox.example
>>> P, R = mdptoolbox.example.forest()
>>> vi = mdptoolbox.mdp.ValueIteration(P, R, 0.9)
>>> vi.run()
>>> vi.policy
(0, 0, 0)
.. code:: python
import mdptoolbox.example
P, R = mdptoolbox.example.forest()
vi = mdptoolbox.mdp.ValueIteration(P, R, 0.9)
vi.run()
vi.policy # result is (0, 0, 0)
Contribute
----------
......@@ -117,5 +118,5 @@ Use the issue tracker.
License
-------
The project is licensed under the BSD license. See LICENSE.txt for details.
The project is licensed under the BSD license. See `<LICENSE.txt>`_ for details.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment