Machine learning for dynamic incentive problems