k-NN is a method used to predict the value of a new data point based on the values of its 'k' nearest neighbors. It is a simple and effective way to make predictions without needing to learn a complex model. For example, if you have a list of fruits and you want to predict if a new fruit is a banana or an apple, you would look at the fruits that are closest to the new fruit and see if the majority are bananas or apples.
How it Works:
1. When you label a point, it acts as a reference point.
2. Every unlabeled (grey) point looks at its "5 nearest labeled neighbors" (k=5).
3. It takes the "majority vote" (e.g., 3 Blue, 2 Red = Predict Blue).
4. Your goal: Achieve 100% accuracy with minimum number of clicks.
Goal: Select the best heuristic to find the shortest path from Start (Green) to Goal (Red). Then, analyze the trade-off between path length and the number of cells explored.
What This Game Teaches:
A* Algorithm: It is a smart way to find the shortest path between two points in a graph. It uses two parts: one part tells us how far we are from the starting point, and the other part tells us how far we are from the goal.
Cost Function (f(n)): The balance between Actual Cost (g(n)) and Heuristic Cost (h(n)).
g(n) (Actual Cost): The distance traveled from the start point to the current cell.
h(n) (Heuristic): The estimated distance from the current cell to the goal. A good heuristic guides the search efficiently.
Heuristic Comparison:
Manhattan: Only counts horizontal/vertical steps. Faster exploration, guaranteed shortest path on a grid without diagonal movement.
Euclidean: Straight-line distance. Often less efficient on a grid but common in robotics.
Zero (Dijkstra's): Ignores h(n). Guaranteed shortest path, but explores the largest number of cells (slowest).
Clustering is a fundamental task in Unsupervised Machine Learning, where the goal is to group similar data points together without prior knowledge of the groups.
The Goal: Find K and Place Centroids
Guess the right K value: Look at the scatter plot on the right and determine the likely number of distinct clusters (the true K value is hidden).
Set the initial Centroids: Click on the map to place K centroids close to the visual center of the clusters you see.
Run K-Means: Press the "Run K-Means" button. K-Means will iteratively refine the centroid positions to minimize the total squared distance (Inertia).
Understanding K-Means
Assignment (E-Step): Each data point is assigned to the nearest centroid.
Update (M-Step): Each centroid is moved to the mean (average) location of all the points assigned to it.
Select the correct Logic Gate (AND, OR, or XOR) that matches the target Truth Table outputs.
Logic Gates (AND, OR, XOR) are the fundamental operations of digital circuits and the core functions that a single perceptron or neuron must learn to model.
Reinforcement Learning involves an agent learning to make decisions by performing actions and receiving rewards or penalties.
Watch the agent explore the grid (randomly at first) and learn the safest path to the Goal (Green) while avoiding Pits (Red).