The engines that power AI – how they learn, decide, and create.
Welcome to Module Three! In the first two modules, we learned what AI is and how data feeds it. Now we will look at the engines that make AI work – the algorithms and tools that do the learning.
An algorithm is like a recipe. It tells the computer step‑by‑step what to do. AI tools are like the pots and pans you use to cook that recipe.
In this module, you will learn about different types of AI algorithms – like supervised learning, unsupervised learning, and reinforcement learning. You will also learn about popular tools like ChatGPT, TensorFlow, and simple no‑code platforms. By the end, you will know which tool to choose for different problems.
We will use short sentences, simple words, fun stories, and lots of examples from Nigeria and everyday life. Let's dive in!
After this module, you will be able to:
In a busy kitchen in Enugu, there was a magical spice machine. You could put in any ingredient, and it would tell you which spice would make it taste best.
But the machine needed to learn first. The chef, Mrs. Ngozi, put in hundreds of ingredients and the correct spice. The machine studied these examples. It learned that tomatoes go with thyme, fish with ginger, and yam with pepper.
Soon, whenever you put in a new ingredient, the machine would predict the perfect spice. That is exactly how AI algorithms work – they learn from examples to make predictions.
In this module, you will learn about the different "recipes" that AI uses to learn – from simple to very complex. Let's explore!
Definition: An algorithm is a step‑by‑step set of instructions to solve a problem or do a task.
Why important? Algorithms are the brain of AI – they tell the computer what to do with data.
Simple explanation: Think of a recipe for making pancakes. You follow steps: mix flour and eggs, add milk, cook on a pan. That is an algorithm.
Real-life example: A recipe for jollof rice – steps: fry onions, add tomatoes, add rice, cook – that's an algorithm.
School example: The steps to solve a maths problem – read, calculate, write answer – that's an algorithm.
Home example: Your bedtime routine – brush teeth, put on pyjamas, read a book – that's an algorithm.
Nigerian example: The process of preparing ogbono soup – blend ogbono, add water, cook with meat – that's an algorithm.
📝 ALGORITHM = RECIPE ----------------------- Step 1: Collect data Step 2: Clean data Step 3: Choose model Step 4: Train model Step 5: Test model Step 6: Deploy
Mini summary: An algorithm is a series of steps that tell a computer how to solve a problem.
Definition: An AI tool is a software program or platform that helps you build, train, and use AI models.
Why important? You don't need to build everything from scratch – tools make it easier.
Simple: If an algorithm is a recipe, an AI tool is the kitchen with all the pots, pans, and ovens.
Real: TensorFlow is a tool that helps programmers build AI. ChatGPT is a tool that you can talk to.
School: Your teacher might use a quiz‑making tool to create tests.
Home: You might use a photo‑editing tool to make pictures look nicer.
Nigeria: Some Nigerian startups use tools like Google Cloud AI to build solutions.
🛠️ POPULAR AI TOOLS --------------------- • ChatGPT – chat and text • TensorFlow – build models • PyTorch – research • Scikit‑learn – simple ML • Canva AI – design • Google AutoML – no‑code
Mini summary: AI tools are software that make it easier to build and use AI.
Definition: Supervised learning is when an AI learns from labelled examples – like having a teacher who gives the correct answers.
Why important? It is the most common type of AI learning. It is used for predictions.
Simple: Imagine you are learning to identify animals. Your teacher shows you a picture of a cat and says "cat". You learn to recognise cats. That is supervised learning.
Real: An AI that learns to tell if an email is spam or not – it is trained with emails already labelled "spam" or "not spam".
School: Your teacher gives you practice questions with answers – you learn from them.
Home: Your parents show you what a ripe mango looks like – you learn to pick ripe ones.
Nigeria: An AI system that detects crop diseases – it is trained with photos labelled "healthy" or "diseased".
🏫 SUPERVISED LEARNING ---------------------- Input (Data) → Output (Label) Picture of cat → "Cat" Picture of dog → "Dog" Email text → "Spam" or "Not Spam"
Mini summary: Supervised learning uses labelled examples to teach AI.
Definition: Unsupervised learning is when AI finds patterns in data without any labels – like a student exploring a new subject on their own.
Why important? It helps discover hidden groups or patterns.
Simple: Imagine you have a box of mixed toys – you group them by type (cars, balls, dolls) without anyone telling you. That is unsupervised learning.
Real: A supermarket groups customers by shopping habits without knowing their names.
School: You look at a list of words and group them by starting letter – without a teacher's help.
Home: You sort your wardrobe into colours – without anyone telling you.
Nigeria: An AI can group phone users by their data usage patterns to offer better plans.
🔍 UNSUPERVISED LEARNING ------------------------ Data → AI finds patterns Examples: - Group customers by behaviour - Cluster news articles by topic - Segment images by features
Mini summary: Unsupervised learning finds patterns without labelled examples.
Definition: Reinforcement learning is when AI learns by trying actions and getting rewards or punishments – like training a dog.
Why important? It helps AI learn to make sequences of decisions, like playing games or driving cars.
Simple: Imagine you are learning to ride a bicycle. You try, you fall (bad), you try again, you balance (good). You learn from rewards and mistakes.
Real: AI that plays chess learns by winning (reward) or losing (punishment).
School: You learn that if you study hard, you get good grades (reward) – so you study more.
Home: You learn that if you clean your room, you get a treat – so you clean.
Nigeria: AI can learn to manage traffic lights – if cars move faster, it gets a reward.
🎮 REINFORCEMENT LEARNING ------------------------- Agent (AI) → Action → Reward/Punishment Goal: Maximise total reward Examples: - Game playing (AlphaGo) - Robot navigation - Traffic control
Mini summary: Reinforcement learning uses rewards and punishments to teach AI.
Definition: Classification is a type of supervised learning where the output is a category or class.
Why important? It is used to label things – like "spam or not spam".
Simple: Like sorting marbles into colours – red, blue, green.
Real: An AI that classifies news articles as "sports", "politics", or "entertainment".
School: Your teacher classifies students as "passed" or "failed".
Home: You classify clothes as "winter" or "summer".
Nigeria: AI can classify plant leaves as "healthy" or "diseased" for farmers.
🏷️ CLASSIFICATION ------------------ Input → Model → Category Example: Email → "Spam" or "Not Spam" Photo → "Cat" or "Dog" Fruit → "Mango" or "Orange"
Mini summary: Classification puts things into categories.
Definition: Regression is a type of supervised learning where the output is a number.
Why important? It helps predict quantities – like prices, temperatures, or sales.
Simple: Like guessing how many sweets are in a jar based on its size.
Real: An AI that predicts house prices based on size and location.
School: Your teacher predicts your final exam score based on your test scores.
Home: You predict how much water your plant needs based on the weather.
Nigeria: AI can predict the amount of yam harvested based on rainfall.
📈 REGRESSION ------------- Input → Model → Number Example: House size → Price Rainfall → Crop yield Study hours → Exam score
Mini summary: Regression predicts numbers.
Definition: Clustering is an unsupervised learning method that groups similar data points together.
Why important? It helps discover natural groupings in data.
Simple: Like putting all your toy cars in one box and dolls in another – without labels.
Real: A streaming service groups users by their viewing habits to recommend shows.
School: You group your class notes by subject – without anyone telling you.
Home: You organise your shoes by type – sneakers, sandals, slippers.
Nigeria: AI can cluster customers by their buying patterns to target ads.
🔗 CLUSTERING ------------- Data points → Groups (clusters) Example: Customers → Group A (young buyers), Group B (family buyers) Photos → Group by style
Mini summary: Clustering finds groups in data automatically.
Definition: A neural network is a type of AI algorithm inspired by the human brain. It has layers of "neurons" that process information.
Why important? Neural networks are very powerful and can learn complex patterns.
Simple: Like a team of workers – each worker does a small job, and together they solve a big problem.
Real: Neural networks power voice assistants like Siri and Google Assistant.
School: Many students working together on a project – each contributes a bit.
Home: Your family members each do a task to prepare a meal.
Nigeria: Neural networks are used to recognise Yoruba, Hausa, and Igbo speech.
🧠 NEURAL NETWORK ----------------- Input → [Layer] → [Layer] → Output Example: Image pixels → Hidden layers → "Cat" Each layer extracts features.
Mini summary: Neural networks are powerful AI models inspired by the brain.
Definition: Deep learning is a type of neural network with many layers. It learns very complex patterns.
Why important? Deep learning powers advanced AI like self‑driving cars and image generation.
Simple: Like a deep book – you read chapter by chapter, each one deeper than the last.
Real: Deep learning is used in facial recognition on your phone.
School: You learn a subject step by step – from basics to advanced.
Home: You learn to cook – first eggs, then stew, then full meals.
Nigeria: Deep learning can analyse satellite images to map illegal mining.
📚 DEEP LEARNING ---------------- Input → Layer1 → Layer2 → ... → LayerN → Output Many layers allow learning of complex features. Used for: image recognition, speech, language.
Mini summary: Deep learning uses many layers in neural networks.
Definition: Generative AI creates new content – text, images, music, or videos – based on what it has learned.
Why important? It can create art, write stories, and help with design.
Simple: Like an artist who looks at many paintings and then creates their own.
Real: ChatGPT generates text; DALL‑E generates images.
School: You write a story after reading many stories.
Home: You invent a new recipe after tasting many dishes.
Nigeria: Generative AI can create educational content in local languages.
🎨 GENERATIVE AI ---------------- Learns from examples → Creates new examples Text: ChatGPT, Gemini Images: DALL‑E, Midjourney Music: Suno AI
Mini summary: Generative AI creates new content like text, images, or music.
Definition: No‑code AI platforms allow you to build AI models without writing code – using drag‑and‑drop interfaces.
Why important? It lets non‑programmers build AI solutions.
Simple: Like using building blocks to make a house – no need for tools.
Real: Google AutoML and Teachable Machine are no‑code tools.
School: You can use a no‑code tool to build a simple AI that recognises your drawings.
Home: You can use a no‑code app to teach AI to recognise your family members.
Nigeria: No‑code AI helps small business owners analyse customer feedback without hiring experts.
🖱️ NO-CODE AI --------------- Drag and drop No programming needed Examples: Teachable Machine, Lobe, AutoML Great for beginners and quick prototypes
Mini summary: No‑code AI lets you build AI without coding.
Definition: Training is showing the AI many examples so it learns. Testing is checking if it works with new, unseen examples.
Why important? You need to know if the AI has learned well before you trust it.
Simple: Like studying for a test (training) and then taking the test (testing).
Real: An AI is trained on 90% of photos and tested on the remaining 10%.
School: You practise maths problems (training) and then do a quiz (testing).
Home: You practise cooking (training) and then cook for guests (testing).
Nigeria: An AI that predicts harvest is trained on past data and tested on current data.
🏋️ TRAINING & TESTING ---------------------- Data split: 70-80% → Training (learning) 20-30% → Testing (evaluation) Goal: Model works well on new data.
Mini summary: Training teaches AI; testing checks if it learned well.
Definition: Overfitting is when AI memorises the training data but fails on new data. Underfitting is when AI is too simple and fails on both.
Why important? We want a model that works well on new data – not just memorised examples.
Simple: Overfitting is like memorising answers to a quiz but not understanding the topic. Underfitting is like not studying at all.
Real: An AI that recognises only the exact cats it was trained on – but not new cats.
School: You memorise the textbook but can't answer new questions – overfitting.
Home: You learn one recipe but can't cook anything else – overfitting.
Nigeria: An AI trained only on Lagos weather might not work in Kano – overfitting.
⚠️ OVERFITTING vs UNDERFITTING ------------------------------- Overfitting: Too complex, memorised training. Underfitting: Too simple, didn't learn. Goal: Balance – good on training AND test.
Mini summary: Overfitting is memorising; underfitting is not learning enough.
Definition: Choosing the right algorithm depends on the problem, data size, and type of output needed.
Why important? Using the wrong algorithm leads to poor results.
Simple: Like choosing a bicycle for a short trip and a car for a long journey – different tools for different needs.
Real: For small data, a simple algorithm like linear regression works well. For images, deep learning is better.
School: For a small project, you might use a simple rule. For a big project, you need a detailed plan.
Home: Use a small pot for tea, a large pot for stew.
Nigeria: For predicting maize yield, a regression model might be enough. For identifying plant diseases, a neural network is better.
⚖️ CHOOSING ALGORITHM ---------------------- +-------------------+-------------------+ | Problem Type | Recommended | +-------------------+-------------------+ | Classification | Decision Tree, | | (categories) | SVM, Neural Net | | Regression | Linear Regression,| | (numbers) | Random Forest | | Clustering | K-Means | | (groups) | | | Text/Images | Deep Learning | +-------------------+-------------------+
Mini summary: Pick the algorithm that fits your problem, data, and goal.
SUPERVISED UNSUPERVISED REINFORCEMENT
(with teacher) (no teacher) (trial & error)
+--------+ +--------+ +--------+
|Data | |Data | |Agent |
|+Labels | |No | |Action |
+---.----+ +---.----+ +---.----+
| | |
V V V
PREDICTION PATTERNS REWARDS
PROBLEM TYPE
|
V
+------------+
| Is output |
| a category?|──Yes──> CLASSIFICATION
+------------+
|
No
V
+------------+
| Is output |
| a number? |──Yes──> REGRESSION
+------------+
|
No
V
+------------+
| Are we |
| finding |──Yes──> CLUSTERING
| groups? |
+------------+
INPUT LAYER HIDDEN LAYER OUTPUT LAYER +---------+ +---------+ +---------+ | Neuron |───▶| Neuron |───▶| Neuron | | Neuron |───▶| Neuron |───▶| | | Neuron |───▶| Neuron | +---------+ +---------+ +---------+
| Type | Has Labels? | Goal | Example |
|---|---|---|---|
| Supervised | Yes | Predict output | Spam detection |
| Unsupervised | No | Find patterns | Customer grouping |
| Reinforcement | No | Maximise reward | Game playing |
In this module, we explored the engines of AI – the algorithms and tools that make AI work. We learned that algorithms are like recipes – step‑by‑step instructions. We discovered three main types of learning: supervised (with labels), unsupervised (no labels), and reinforcement (trial and error).
We also covered specific methods: classification (categories), regression (numbers), and clustering (groups). We explored neural networks and deep learning – powerful models inspired by the brain. We learned about generative AI that creates new content and no‑code tools that let anyone build AI.
We discussed training and testing, and the dangers of overfitting and underfitting. We saw many examples from Nigeria and everyday life. Now you know the different "engines" and can choose the right one for your problem.
1. What is an algorithm in simple words?
A step‑by‑step recipe for solving a problem.
2. What is the difference between supervised and unsupervised learning?
Supervised uses labels; unsupervised does not.
3. What is classification?
Sorting things into categories, like "spam" or "not spam".
4. What is regression?
Predicting a number, like a price or temperature.
5. What is a neural network?
A brain‑like model with layers of neurons.
6. What is deep learning?
A neural network with many layers.
7. What is generative AI?
AI that creates new content like text or images.
8. What is a no‑code AI tool?
A tool that lets you build AI without programming.
9. What is overfitting?
When AI memorises training data but fails on new data.
10. How do I choose an algorithm?
It depends on your problem – categories, numbers, or groups.
Match the term with its definition:
| Term | Definition |
|---|---|
| 1. Supervised | A. No labels |
| 2. Unsupervised | B. With labels |
| 3. Classification | C. Predicts numbers |
| 4. Regression | D. Sorts categories |
| 5. Clustering | E. Finds groups |
Answers: 1-B, 2-A, 3-D, 4-C, 5-E
Scenario 1: A hospital wants to predict if a patient has malaria based on symptoms and test results. What type of learning and algorithm would you use?
Scenario 2: A supermarket wants to group customers by their shopping habits to send targeted offers. What type of learning is this?
Scenario 3: A game company wants to build an AI that learns to play a new game by playing against itself. What type of learning is this?
In groups of 4, choose a problem (e.g., predicting football match winners, sorting books by genre). Decide which type of learning and algorithm you would use. Present your reasoning to the class.
Draw a flowchart showing how you would choose an algorithm for a problem of your choice. Include at least three decision points (e.g., "Is it a category?").
Build a simple AI using a no‑code tool. Use Teachable Machine or Google AutoML to train a model that recognises three objects (e.g., a pen, a book, a phone). Take photos, train the model, and test it. Write a short report on your experience.
Research one AI tool (e.g., ChatGPT, TensorFlow, or a no‑code platform). Write a one‑page summary: what it does, what type of algorithm it uses, and how it can be used in Nigeria.
Design a reinforcement learning system for managing traffic lights in Lagos. Describe: what is the reward, what actions the AI can take, and what data it would need.
In Module Four, we will learn about AI Strategy and Governance – how leaders plan, manage, and oversee AI projects. We will explore frameworks, ethics, and how to align AI with organisational goals. For homework, think about how you would govern an AI project in your school or community.
Homework: Write three rules that you would set for using AI in your school. Bring them to class for discussion.
🎉 Congratulations! You have completed Module Three. You now understand the engines of AI!