Skip to content

Can RL dose anaesthesia better than a tuned PID?

Reinforcement learning against a tuned PID for anaesthetic dosing, tested on unseen simulated patients.

Year
2026
Domain
Robot learning
Role
Solo, coursework rebuilt properly
Stack
Python, PyTorch, Gymnasium, Soft Actor-Critic
Fig. 1One unseen patient. Dots are the noisy, delayed sensor readings.

The problem

Holding a patient at the right anaesthetic depth is hard: the sensor is slow, noisy and delayed, and every patient responds differently.

What I built

Simulated patients with a realistic delayed sensor, and three controllers: a tuned PID, pure RL, and a learned correction on top of the PID. Training, tuning and test patients were kept separate.

How it went

The learned correction matched the PID. Pure RL did worse, after first finding a loophole in the task that I had to close.

Figures

Each point is a test patient: where the learned correction helped and where it didn't.
Fig. 2Each point is a test patient: where the learned correction helped and where it didn't.
Anaesthetic depth over a full case for six test patients.
Fig. 3Anaesthetic depth over a full case for six test patients.