Skip to content

Validating MDPSolver

Anders Reenberg Andersen edited this page Mar 22, 2025 · 12 revisions

This section briefly describes how to test and ensure that MPDSolver 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. Clone the MDPSolver repository (git clone https://github.com/areenberg/mdpsolver.git).
  2. Navigate to Python/tests.
  3. Install NumPy with pip install numpy.
  4. Run the two tests, python test1.py and python test2.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