CODE PATH
PRO ACCOUNT

Master Code
On The Go

Learn. Practice. Build.

Quest 1 • Lesson 1

🤖 What is Artificial Intelligence?

Artificial Intelligence (AI) is about creating machines that can think, learn, and make decisions. Today, AI powers everything from voice assistants to self-driving cars.

"AI is not one technology – it's a set of methods. The three main branches are: Machine Learning (ML), Deep Learning (DL), and Symbolic AI."
📈

Machine Learning

Algorithms learn patterns from data. Example: spam filter, recommendation engine.

🧠

Deep Learning

Neural networks with many layers. Used for image recognition, language translation.

🧩

Symbolic AI

Uses rules and logic. Expert systems, chess engines (early AI).

🚀 Live Demo: Your First Pattern Recogniser

This tiny neural network learns the XOR pattern (exclusive OR). Press "Train" – the model will learn the relationship between inputs (0,0 → 0 ; 0,1 → 1 ; 1,0 → 1 ; 1,1 → 0).

Click "Train" to start. After training, click "Test".
📘 How it works (TensorFlow.js)
// A simple neural network with one hidden layer
const model = tf.sequential();
model.add(tf.layers.dense({units: 4, activation: 'sigmoid', inputShape: [2]}));
model.add(tf.layers.dense({units: 1, activation: 'sigmoid'}));
model.compile({optimizer: 'sgd', loss: 'meanSquaredError'});

// Train on XOR data
const xs = tf.tensor2d([[0,0],[0,1],[1,0],[1,1]]);
const ys = tf.tensor2d([[0],[1],[1],[0]]);
await model.fit(xs, ys, {epochs: 500});

✨ Challenge: Change the Training Data

Modify the code inside the demo to learn a different pattern, e.g., AND (0,0→0 ; 0,1→0 ; 1,0→0 ; 1,1→1).

❤️ Support Free Education

This course is 100% free. If it helps you, consider buying me a coffee.

☕ Buy Me a Coffee

➡️ Ready for more?

Next lesson: Machine Learning Basics – supervised vs unsupervised learning.

Continue to Lesson 1.2 →

(Coming soon – check back or buy Pro Pack for instant access)