matrix_algorithms.py#

This file contains the two versions of the SM-SPSA algorithm: a “normal” version and a “memory optimised” version. The latter is especially useful for large network instances.

run_matrix_algorithm(M, C, ...)

Runs SM-SPSA on a transition matrix and binary matrix C.

run_matrix_algorithm_improved_memory(M, C, ...)

Runs SM-SPSA "memory optimised" on a transition matrix and binary matrix C.