test_algorithm_api

Some general checks about expected algorithm behavior.

Module Contents

Functions

test_time_horizon_kept(algorithm_class: Type[duelpy.algorithms.Algorithm], time_horizon: int) → None

Test that all algorithm keep to the time horizon if given.

test_time_horizon_kept(algorithm_class: Type[duelpy.algorithms.Algorithm], time_horizon: int)None

Test that all algorithm keep to the time horizon if given.

Executes the algorithms with a given time horizon (a small selection is tested, to make sure that no algorithm just happens to keep to one value) and then checks that the number of duels exactly matches the time horizon.