Theoretical Foundations of Learning Environments by