Efficient Online Learning And Adaptive Decision-Making In Artificial And Biological Agents