← All work

HydrOS

Research simulation · local

A reinforcement-learning simulation of a multi-stage water-filtration system, validated before hardware.

  • 128-test suite
  • Mass-balance invariants
  • Bounded execution

Stack

  • Python
  • PPO / Stable Baselines3
  • Gymnasium
  • pytest

HydrOS is a reinforcement-learning simulation of a multi-stage water-filtration device that captures microplastics from water, spanning coarse, medium, and fine microporous stages. It models the multi-physics behavior (fluid flow, particle capture, electrostatics) so I can train and evaluate control policies against it before anything reaches hardware.

The discipline is validation: PPO control policies trained with Stable Baselines3 on custom Gymnasium environments, checked by a 128-test suite covering mass-balance and conservation invariants and per-component behavior. The point is a simulation you can trust because it is tested before it is trusted.

It is also where I work out what safe autonomy means outside a web app. A learned policy runs inside bounded execution limits rather than being given the device, reward functions get tested like any other code because a reward you have not tested is a specification you have not read, and the physical state stays inspectable so an operator can see what the policy is doing and why. Conservation invariants are the honest check on all of it: if mass is not conserved, the simulation is wrong and no result from it counts.

A local research simulation, so I'm glad to walk through the code and the validation approach on request.