Using UE for training AI

Hi, is it even possible to use UE for training AI? The problems I see:

  • Create whole game procedurally based on some training engine.
  • Redirect main window to AI agent.
  • Somehow process input (image, sound, physics …) and put it all together to send some actions to virtual world

Enough for now.
Where do i start?