A possible way to improve the user experience in games is to create intelligent tutoring systems. That are serious games which have an educational approach. The Artificial Intelligence in that games is controlling the non-player-characters but with the idea to teach the human. A typical example is a simulated driver school in which the human learns everything about correct behavior in traffic situations.
Intelligent tutoring systems are organized in lessons. That means it's an interactive story in which the human has to show, that he has understood the instructor. Each lesson ends with a quiz which is often practical. That means, the human is cruising in the city, some autonomous bots are driving also in the street and the human must pass the test. That means, he must stop at the red light and has to be limit his maximum speed. In the background, an artificial instructor is observing the human and he give tips how to improve the driving.
From a technical perspective such educational enriched AI-driven games are created with normal game engines like Unity plus some extra features for modeling the knowledge in the game. Often the protege ontology editor is in charge for building the lessons.