AI Insulin Dosing in Virtual Diabetes Simulators
ISEF Category: Translational Medical Science
Ready to Turn This Idea Into a Real Project?
This guide was put together with the help of AI research tools to give you a solid starting point. But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.
For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
Subcategory: Disease Treatment and Therapies · Difficulty: Advanced · Setup: University Lab · Time: Full Year
The Hook
A tiny dosing mistake can push blood sugar too high or too low. That is why insulin control is a hard computer problem, not just a medical one. You can study that problem in a simulator before touching any real patient data. The payoff is a project that mixes AI, control systems, and human health.
What Is It?
This project asks whether a reinforcement-learning controller can learn better insulin dosing rules than older control methods. Reinforcement learning means a program learns by trial and error, then gets rewarded for good choices. In your case, the program never touches a person. It trains inside a published virtual patient simulator, which acts like a video game version of type-1 diabetes physiology.
Think of the simulator like a flight simulator for glucose control. The controller sees inputs such as meals, exercise, and glucose trends, then chooses insulin doses. A PID controller reacts to error, and a model predictive controller, or MPC, uses a model to plan ahead. Your job is to test whether the learning-based controller can handle irregular schedules better than those baselines.
Why This Is a Good Topic
This topic works well because you can define clear inputs, outputs, and success metrics. You can compare time-in-range, hypoglycemia risk, and response to surprise meals or exercise. That makes the project testable, quantitative, and grounded in a real health problem. You also learn simulation design, control logic, and basic machine learning without needing a wet lab.
Research Questions
- How does a reinforcement-learning controller change time-in-range compared with a PID baseline under irregular meal timing? ?
- What is the effect of adding unplanned exercise events on glucose stability for reinforcement learning versus MPC? ?
- Does training on one virtual patient profile generalize to other simulator profiles with different insulin sensitivity? ?
- To what extent does reward shaping change hypoglycemia frequency in simulation? ?
- Which controller keeps glucose closest to target when meal size varies unpredictably? ?
- What is the effect of sensor noise on the ranking of reinforcement learning, PID, and MPC? ?
Basic Materials
- Computer with enough memory to run simulation software.
- Published virtual type-1-diabetes simulator or open-source glucose control environment.
- Python installed with data and machine learning libraries.
- Spreadsheet software for tracking outcomes.
- Graphing tool for plotting glucose traces and summary metrics.
- Version control tool such as Git for saving code changes.
Advanced Materials
- High-performance workstation or cloud compute access.
- Published virtual patient simulator with multiple patient parameter sets.
- Python environment with reinforcement-learning and control libraries.
- Statistical analysis package for comparing controllers across trials.
- Data visualization software for trajectory plots and confidence intervals.
- Git repository for experiment tracking and reproducibility.
Software & Tools
- Python: Runs the simulator wrapper, controller code, and analysis scripts.
- Jupyter Notebook: Lets you test controller ideas and inspect glucose traces step by step.
- pandas: Organizes simulation runs, outcomes, and patient profiles into tables.
- matplotlib: Plots glucose curves, rewards, and comparison charts.
- Git: Tracks code versions so you can reproduce each simulation run.
Experiment Steps
- Define the exact simulator, patient profiles, and outcome metrics you will compare.
- Choose one controller architecture and one baseline set so your comparison stays fair.
- Build a training plan that separates learning data from final test scenarios.
- Design stress tests for irregular meals, exercise, and sensor noise.
- Decide how you will score success using time-in-range, lows, highs, and variability.
- Plan statistical comparisons across repeated simulation runs, not just one lucky trial.
Common Pitfalls
- Training only on one virtual patient, which makes the controller look strong but leaves it brittle on new profiles.
- Comparing controllers on different random seeds, which turns seed luck into fake performance gains.
- Rewarding glucose values too aggressively, which can hide dangerous hypoglycemia behind a high average score.
- Forgetting to separate training scenarios from test scenarios, which causes data leakage in simulation.
- Judging success by mean glucose alone, which misses time spent in dangerous low or high ranges.
What Makes This Competitive
A strong version of this project does more than say that one controller won. It tests several patient profiles, irregular schedules, and noise settings, then uses the same evaluation rules for every method. You can also add ablation tests, which means removing one design choice at a time to see what really helped. That kind of careful comparison makes the work feel like research, not just coding.
Project Variations
- Test whether the controller still works when meals arrive at random times instead of fixed times.
- Compare a reinforcement-learning policy with PID and MPC across several virtual patient phenotypes.
- Analyze whether sensor noise changes which controller is safest under exercise-heavy schedules.
Learn More
- PubMed: Search review articles on closed-loop insulin delivery, reinforcement learning, and glucose control to see how researchers evaluate controllers.
- NIH: Look for diabetes technology and artificial pancreas resources in the National Institute of Diabetes and Digestive and Kidney Diseases section.
- OpenSim or published diabetes simulator papers: Search journal articles that describe virtual patient models and their validation methods.
- MIT OpenCourseWare: Find control systems and machine learning lecture notes to build your understanding of feedback and policy learning.
- IEEE Transactions on Biomedical Engineering: Search for papers on automated insulin delivery, MPC, and learning-based control.
Translational Medical Science Category Guide
How to Do Real Translational Medical Science Research at Home: A High School Student’s Guide to Free Tools, Affordable Kits, and Public Databases →For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
To discover more projects, visit the MehtA+ Science Fair Project Discovery Hub →
