  We investigate adaptive protocols for the elimination or reduction of the use
of medications or addictive substances. We formalize this problem as online
optimization, minimizing the cumulative dose subject to constraints on
well-being. We adapt a model of addiction from the psychology literature and
show how it can be described by a class of linear time-invariant systems. For
such systems, the optimal policy amounts to taking the smallest dose that
maintains well-being. We derive a simple protocol based on integral control
that requires no system identification, only needing approximate knowledge of
the instantaneous dose response. This protocol is robust to model
misspecification and is able to maintain an individual's well-being during the
tapering process. Numerical experiments demonstrate that the adaptive protocol
outperforms non-adaptive methods in terms of both maintenance of well-being and
rate of dose reduction.
