Lessons of the Vergangenheit: optimal policy learning of innovation subsidies