ptan
ptan copied to clipboard
Outdated Experience Source
Experience Source asserts when env == gym.Env However, newer gymnasium Env is (same but) diferent from gym.Env.
the solution is just to delete this assertion and include gym.Env typing
class ExperienceSource:
def __init__(self, env:gym.Env, agent, ...): <------------------
"""
···
"""
#assert isinstance(env, (gym.Env, tuple, list)) <-------------------
assert isinstance(agent, BaseAgent)
...