rlberry.utils.check_rl_agent

rlberry.utils.check_rl_agent(agent, env='continuous_state', init_kwargs=None)[source]

Check ExperimentManager compatibility and check reproducibility/seeding. Raises an exception if a check fails.

Parameters:
agent: rlberry agent module

Agent class to test.

env: tuple (env_ctor, env_kwargs) or str in {“continuous_state”, “discrete_state”}, default=”continuous_state”

if tuple, env is the constructor and keywords of the env on which to test. if str in {“continuous_state”, “discrete_state”}, we use a default Benchmark environment.

init_kwargsdict

Arguments required by the agent’s constructor.

Examples

>>> from rlberry_scool.agents import UCBVIAgent
>>> from rlberry.utils import check_rl_agent
>>> check_rl_agent(UCBVIAgent) # which does not return an error.