Algorithmic and knowledge-based techniques for adaptive control