real-time algorithm adaptation