<looks at all the AI hype>
Seems it's just you and me that think that way...
This is probably also why apps like LibreLink don't provide predictions but only show historical data - easier to not get sued if you don't give the user advice that could kill them?
Re models, differential equations and finding minima: I do agree genetic algo is a bit wonky, and the greedy random walk at the bottom was able to get similar results. Do you have some resources for optimizing a N_51 x N_51 x N_51 x N_51 -> R+ unknown black-box function? My googling led me to eg. Metropolis-Hastings algorithm, but I don't currently get it (the translation to the probability domain escapes me). You're mentioning shooting method and bisection, I'll take a look at those.
Maybe Bayesian optimization? That's often how hyperparameter optimization is done in machine learning, but that has the additional constraint that each computation of the loss function is very expensive.
In general the term "black-box optimization" is the right search term, or "derivative-free optimization" which is what Wikipedia calls it.
What I was saying is I don't think N_51 is the right way to model a dose. I would model it as a real number in the interval [0,50]. I would still round whatever the model gave to what I could actually measure out decently, but within the model I would not use discrete numbers.
> Especially, a diabetic patient is warned that unauthorized use of this software may result into severe injury, including death.
I like the idea of the post - I have actually been thinking about including some biophysical models for medications in my app - but I do think that if you don't understand what a system of differential equations is, maybe trying to use a software library as a black box is a bad idea. For example... genetic algorithms... really? Like use a shooting method or bisection or something. If you have 3 doses you have 3 variables and it is all continuous so searching the space of inputs should be much easier than examining 51^4 discrete possibilities.