Multi-paradigm Dynamic Programming