diff --git a/example.py b/example.py new file mode 100644 index 0000000..f4b0bb2 --- /dev/null +++ b/example.py @@ -0,0 +1,25 @@ +"""Example of how to use the Aquarium environment.""" + +from marl_aquarium import aquarium_v0 + +env = aquarium_v0.env( + # draw_force_vectors=True, + # draw_action_vectors=True, + # draw_view_cones=True, + # draw_hit_boxes=True, + # draw_death_circles=True, +) +env.reset(seed=42) + +for agent in env.agent_iter(): + observation, reward, termination, truncation, info = env.last() + + if termination or truncation: + action = None + else: + # this is where you would insert your policy + action = env.action_space(agent).sample() + + env.step(action) + env.render() +env.close() diff --git a/setup.py b/setup.py index afdcf98..3735d22 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="marl-aquarium", - version="0.1.8", + version="0.1.9", packages=find_packages(exclude=["examples"]), license="MIT", description="Aquarium: A Comprehensive Framework for Exploring Predator-Prey Dynamics through Multi-Agent Reinforcement Learning Algorithms",