A continuous-time algorithm for learning a stable bang-bang regulator is developed. It is assumed that a Liapunov function

is known such that

is negative definite for some bang-bang control The plant may be unstable since a simple condition (that a constant be large enough) on the learning algorithm guarantees stability of the closed-loop system during the learning phase. Derivative computation is required, but a significant time delay and an error are permissible in such computation.