Skip to content

0.14.0

Compare
Choose a tag to compare
@jjshoots jjshoots released this 03 Dec 17:01
· 410 commits to master since this release

PettingZoo Support!

AEC ENVIRONMENTS HAVE BEEN DEPRECATED

from PyFlyt.pz_envs import MAQuadXHoverEnv

env = MAQuadXHoverEnv(render_mode="human")
env = wrappers.OrderEnforcingWrapper(env)

env.reset(seed=42)
for agent in env.agent_iter():
    observation, reward, termination, truncation, info = env.last()

    if termination or truncation:
        action = None
    else:
        action = env.action_space(agent).sample()

    env.step(action)