safe-autonomous-systems/ppo-CylinderRot2D-medium-v0
018
PPO on CylinderRot2D-medium-v0 (FluidGym)
This repository is part of the FluidGym benchmark results. It contains trained Stable Baselines3 agents for the specialized CylinderRot2D-medium-v0 environment.
Evaluation Results
Global Performance (Aggregated across 5 seeds)
Mean Reward: 0.31 ± 0.03
Per-Seed Statistics
About FluidGym
FluidGym is a benchmark for reinforcement learning in active flow control.
Usage
Each seed is contained in its own subdirectory. You can load a model using:
from stable_baselines3 import PPO
model = PPO.load("0/ckpt_latest.zip")Important: The models were trained using ``fluidgym==0.0.2`. In order to use them with newer versions of FluidGym, you need to wrap the environment with a FlattenObservation` wrapper as shown below:
import fluidgym
from fluidgym.wrappers import FlattenObservation
from stable_baselines3 import PPO
env = fluidgym.make("CylinderRot2D-medium-v0")
env = FlattenObservation(env)
model = PPO.load("path_to_model/ckpt_latest.zip")
obs, info = env.reset(seed=42)
action, _ = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(action)