🎓 Basic Concepts
MDP Components: Markov Decision Process – a mathematical framework for modeling sequential decision-making problems.
States: The current state of the environment.
Actions: The actions that an agent can perform.
Rewards: The reward received for performing an action.
Policy: The strategy used to select actions.
Value Functions: Estimate the expected cumulative reward from a given state or state-action pair.
V(s): State value – the expected return from a state.
Q(s,a): Action value – the expected return from taking action 'a' in state 's'.
Goal: To find an optimal policy.
Exploration vs Exploitation: The balance between trying new actions and using existing knowledge to maximize reward.
🔧 Algorithms
Q-Learning: A model-free reinforcement learning algorithm that learns the optimal Q-function.
Concept: Learning the Q-function through the Bellman equation.
Formula: Q(s,a) ← Q(s,a) + α[r + γ max Q(s',a') - Q(s,a)].
Advantages: Off-policy, simple.
Policy Gradient: A method for learning policies by maximizing the expected reward.
Methods: REINFORCE, Actor-Critic, PPO.
Advantages: Suitable for continuous actions and complex policies.
Deep Q-Network (DQN): A Q-Learning algorithm using a deep neural network to approximate the Q-function.
Techniques: Experience replay, target network.
Advantages: Effective for large state spaces.
📚 Practical Examples
Example 1: Q-Learning for Grid World: Create a grid world environment. Initialize a Q-table. Train the agent using Q-Learning. Use the learned policy for navigation.
Example 2: DQN for Atari: Prepare an Atari environment. Train a DQN with experience replay. Evaluate performance on test episodes.
▶ Try it live
Everything above runs in your browser — open Dimensionality Reduction: PCA, t-SNE & UMAP and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.