Welcome to AI Concepts

Artificial Intelligence (AI) might seem like magic, but it's actually just math and logic working together to solve problems. This guide breaks down complex topics into simple explanations with interactive demos.

How to use this guide:

  • Read the simple explanation.
  • Relate it to the real-world example.
  • Play with the interactive demo to see it in action.

Select a topic from the menu to get started! Each topic also has a full simulation in the AI Simulations tab.

K-Means Clustering

What is it? K-Means is an algorithm used to group data into categories (clusters) without being told what the categories are. It finds the "center" of groups automatically.

Real World Example: Imagine you have a pile of mixed T-shirts (Small, Medium, Large) but no labels. You throw them into 3 piles based on size. You keep adjusting the piles until all the Small ones are together, Mediums together, etc.

Demo: Grouping the Dots

Click "Step" to see how the computer finds the centers (X) of the colored groups.


Status: Random Centers

🎮 Try the full simulation

K-Nearest Neighbors (k-NN)

What is it? k-NN is a classification method. It assumes that similar things exist in close proximity. To predict what a new data point is, it looks at its closest neighbors.

Real World Example: If you move to a new neighborhood and your 5 nearest neighbors all love gardening, the computer predicts you will probably like gardening too. "Tell me who your friends are, and I'll tell you who you are."

Demo: Classify the Mystery Point

The is a mystery. Look at its 5 nearest neighbors.

Neighbors:

🎮 Try the full simulation

Neural Networks

What is it? Inspired by the human brain, a neural network consists of layers of "neurons". Each connection has a "weight" (importance). Inputs are multiplied by weights to produce an output.

Real World Example: Deciding to wear a jacket.
Input 1: Is it cold? (High weight/importance)
Input 2: Is it sunny? (Low weight/importance)
If the total score crosses a threshold, the "Wear Jacket" neuron fires.

Demo: Single Neuron

Adjust the Weight. If Input × Weight > 50, the neuron fires!

Input: 10
⚡
×
Weight: 1.0
=
Output: 10
(Threshold: 50)
💡
🎮 Try the full simulation

A* Pathfinding

What is it? A* (A-Star) is an algorithm used to find the shortest path between two points. It is smart because it uses a "heuristic" (an educated guess) to prioritize paths that move towards the goal, rather than exploring blindly.

Real World Example: GPS Navigation (Google Maps). When finding a route from your house to school, it doesn't check every single road in the world. It prioritizes roads that generally head towards the school.

Demo: Blind Search vs. A* Search

Imagine searching for a key in a dark room.

Blind Search (Dijkstra)

Checks every direction equally.

Slow

A* Search

Guesses direction towards Goal.

Fast ->
🎮 Try the full simulation

Logic Gates

What is it? Logic gates are the building blocks of computers. They take binary inputs (On/Off, 1/0) and produce a single output based on a rule.

Real World Example:
AND Gate: Security Box. You need Key A AND Key B to open it.
OR Gate: Doorbell. Front button OR Back button rings the bell.

Demo: Circuit Builder


Switch A
+
Switch B
=
Output
💡
🎮 Try the full simulation

Reinforcement Learning (Q-Learning)

What is it? A type of Machine Learning where an agent learns by trial and error. It gets a "Reward" for doing something good and a "Penalty" for doing something bad.

Real World Example: Training a dog.
Dog sits → Give Treat (+ Reward). Dog learns to sit.
Dog chews shoe → Say "No!" (- Penalty). Dog learns not to chew shoes.

Demo: Train the Robot

The robot wants to reach the Battery 🔋.

🤖 ... 🔋

Robot Action: Waiting

Robot Confidence: 0%

🎮 Try the full simulation