Reinforcement Learning: First Principles