Foundations of AI-Driven and Immersive Learning Environments