Skip to content

Validating MDPSolver

Anders Reenberg Andersen edited this page Apr 16, 2025 · 6 revisions

This section briefly describes how to test and ensure that MDPSolver produces the expected results.

How to run the tests

Start by ensuring that MDPSolver has been correctly downloaded and installed (see the section on how to install MDPSolver), e.g. by running pip show mdpsolver in the terminal followed by import mdpsolver in Python.

Now follow these steps to ensure that MDPSolver correctly computes the policy and value vector for a given MDP problem:

  1. Install NumPy with pip install numpy.
  2. Clone the MDPSolver repository (git clone https://github.com/areenberg/mdpsolver.git).
  3. Navigate to Python/tests.
  4. To validate the pip installation of MDPSolver, run python test1_pip.py and python test2_pip.py.
  5. If MDPSolver runs correctly, you will see the messages Test 1 succesfully reproduced output! and Test 2 succesfully reproduced output!. If MDPSolver does not run correctly, the program will abort followed by an indication of the model that failed to reproduce the results (e.g. Model 2a failed!).

Clone this wiki locally