Warm-up: Where Did You Meet AI This Morning?
NO PREVIOUS LECTURE · 5 MIN
Google Maps
YouTube feed
Face unlock
Tells you the fastest road from Burewala to Vehari and the time it will take.
Chooses the next video for you from what you watched before.
Your phone recognises (identifies) your face in less than a second.
Daraz
Google Translate
Chatbots
"Customers who bought this also bought..." suggestions.
Turns English into Urdu, and Urdu speech into text.
Meta AI in WhatsApp, ChatGPT and Gemini answer your questions.
Think: All of these do a job that needed a human brain a few years ago. That is the starting idea of AI.
Today's Plan (90 minutes)
ROADMAP
0-10
Course orientation: outline, marks, labs, rules
S05-S06
10-15
Warm-up: AI around us
S02
15-30
Module 1: What is intelligence? Its five components
S07-S10
30-50
Module 2: What is AI? Definitions, AI vs normal program
S11-S15
50-70
Module 3: The four approaches to AI
S16-S22
70-80
Class activity: classify AI systems
S23
80-87
Common mistakes and recap quiz
S24-S25
87-90
Homework and next lecture
S26
Learning Outcomes (SLOs)
BY THE END OF THIS LECTURE YOU WILL BE ABLE TO
SLO 1.1
Define intelligence and list its five components with an example of each
→ CLO1 · C1 Remember
SLO 1.2
Explain Artificial Intelligence using three standard definitions
→ CLO1 · C2 Understand
SLO 1.3
Differentiate between a normal (conventional) program and an AI program
→ CLO1 · C2 Understand
SLO 1.4
Compare the four approaches to AI and classify real systems under them
→ CLO1 · C2 Understand
- Course Learning Outcome(s) served
- CLO1: Explain the applications of AI and agent-based approach to AI.
CS-511 at a Glance
COURSE ORIENTATION
Foundations
Logic and Prolog
Search and Games
What AI is, history, Turing machine, intelligent agents (L01-L04)
Knowledge, propositional and predicate logic, resolution, Prolog (L05-L09)
BFS, DFS, heuristics, A*, hill climbing, annealing, minimax, CSP (L10-L18)
Uncertainty and Learning
AI Applications
Labs in Python
Expert systems, Bayes, fuzzy logic, machine learning, neural networks, GA (L19-L29)
Natural language, machine vision, face recognition, robotics (L30-L32)
14 practicals: neural networks and fuzzy systems with scikit-learn and scikit-fuzzy
Credit hours 3(2-1): 2 theory + 1 practical → 32 lectures (90 min) and 14 practicals (3 hours).
Marks Distribution (60 Marks)
COURSE ORIENTATION
Already given: Assignment 1 (Gemini AI tool report) is due on 06-10-2026.
Slide 7
MODULE 1
What is Intelligence?
Before we make machines intelligent, we must know what intelligence is
Intelligence: A Simple Definition
MODULE 1 · INTELLIGENCE
Intelligence is the ability to learn from experience, understand, reason (think logically), solve problems and adapt (change) to new situations.
Example: a cotton farmer in Burewala
Non-example: a calculator
Last year pink bollworm (a cotton pest) damaged his crop. This year he checks the flowers early and sprays at the right time. He learned from experience and adapted.
It gives 2 + 2 = 4 perfectly every time, but it never learns, never changes and cannot handle a new kind of problem. It is fast, not intelligent.
Key idea: Being fast or correct is not enough. Intelligence needs learning and adapting.
Five Components of Intelligence
MODULE 1 · INTELLIGENCE
Learning
Reasoning
Problem solving
- Getting better with experience.
- A child learns that a hot tawa (griddle) burns.
- Reaching a conclusion from facts.
- "No light in the whole street, so it is load-shedding, not my fuse."
- Finding steps to reach a goal.
- Planning the cheapest route from Burewala to Lahore by bus and train.
Perception
Language
- Understanding the world through senses (eyes, ears).
- Recognising your friend's voice on the phone.
- Understanding and using words.
- Knowing "kal" means yesterday or tomorrow from the sentence.
Case Study: The Doctor and the Vague Patient
MODULE 1 · INTELLIGENCE
Lesson: Humans handle vague and uncertain information easily. A good AI system must also handle it.
Slide 11
MODULE 2
What is Artificial Intelligence?
Definitions, the father of AI, and how AI differs from a normal program
Artificial Intelligence: A Simple Definition
MODULE 2 · WHAT IS AI
Artificial
Intelligence
- Made by humans, not natural.
- (artificial flowers, artificial rain)
Ability to learn, reason, solve problems and adapt.
AI is the branch of computer science that builds machines and programs that can do tasks which normally need human intelligence.
Example: A Careem or inDrive app matching you to the nearest driver does the job a human dispatcher (controller) used to do.
Three Standard Definitions of AI
MODULE 2 · WHAT IS AI
Agent: anything that senses its surroundings and acts on them. A robot vacuum senses dust and walls, then moves and cleans.
Normal Program vs AI Program
MODULE 2 · WHAT IS AI
Two Founding Names
MODULE 2 · WHAT IS AI
Alan Turing (1950)
John McCarthy (1956)
British mathematician. Asked "Can machines think?" in his paper "Computing Machinery and Intelligence". Proposed the Turing Test (Lecture 3).
Father of AI. Coined (first used) the term "Artificial Intelligence" at the Dartmouth workshop, USA. Later created the LISP language.
Exam tip: Father of AI = John McCarthy. 1956 (Dartmouth) is called the birth year of AI.
Slide 16
MODULE 3
Four Approaches to AI
Should a machine think or act? Like a human, or perfectly logically?
The Four Approaches: A 2 × 2 Grid
MODULE 3 · FOUR APPROACHES
HUMAN-LIKE
RATIONAL (ideal, logical)
THINKING
- Thinking Humanly
- Cognitive modelling: copy how the human mind works
- Thinking Rationally
- Laws of thought: use correct logic
ACTING
- Acting Humanly
- Turing Test: behave so people can't tell it is a machine
- Acting Rationally
- Rational agent: do the best action to reach the goal
1. Acting Humanly: The Turing Test Approach
MODULE 3 · FOUR APPROACHES
Natural language processing
Knowledge representation
Automated reasoning
Machine learning
Talk in a human language (English, Urdu)
Store what it knows and hears
Use stored knowledge to answer and draw conclusions
Adapt to new situations and find patterns
Example: A bank's WhatsApp chatbot that answers so naturally that the customer thinks a human agent is replying.
Weakness: Copying humans is not always useful - we want correct answers, not human mistakes.
2. Thinking Humanly: The Cognitive Modelling Approach
MODULE 3 · FOUR APPROACHES
- Goal: build a program whose thinking steps match the steps a human mind uses.
- How do we learn how humans think?
- Introspection (watching your own thoughts while solving a problem)
- Psychological experiments (observing people as they solve problems)
- Brain imaging (MRI scans that show which part of the brain is active)
- Classic example: General Problem Solver (GPS), Newell and Simon, 1957 - its steps were compared with human steps.
Local example
A program that learns Urdu words the way a child in Burewala does: first nouns (ammi, pani), then verbs, then sentences - and makes the same kinds of mistakes children make.
Weakness: We still don't fully understand the human brain, so it is very hard to copy it exactly.
3. Thinking Rationally: The Laws of Thought Approach
MODULE 3 · FOUR APPROACHES
- Goal: think using correct rules of logic, so conclusions are always right if the facts are right.
- Leads to: propositional logic, predicate logic and Prolog (Lectures 6 - 9).
Weakness: Real knowledge is often uncertain ('wheat usually needs 4-5 waterings') and hard to write as exact logic.
4. Acting Rationally: The Rational Agent Approach
MODULE 3 · FOUR APPROACHES
- Rational agent: an agent that does the action expected to give the best result, based on what it knows.
- Rational ≠ perfect: it chooses the best action with the information it has at that time.
- Why this approach wins: it is more general than logic alone, and it is easy to test - did the agent reach the goal?
- Our course follows it: agents (L04), search (L10-L18), learning (L24-L28).
Example: Google Maps
Road blocked near Burewala bypass? It does not 'think like a human'. It quickly picks the route with the least expected time. That is acting rationally.
Remember: Most modern AI (self-driving cars, recommendation systems) is built as rational agents.
Comparing the Four Approaches
MODULE 3 · FOUR APPROACHES
In one line: Human approaches copy people; rational approaches aim for the right answer.
Activity: Which Approach Is It?
CLASS ACTIVITY · PAIRS · 10 MIN
Work in pairs. For each system, write the approach: Acting Humanly (AH), Thinking Humanly (TH), Thinking Rationally (TR) or Acting Rationally (AR).
Stockfish chess engine picks the move with the best chance to win
A model that copies how children make mistakes while learning words
A chatbot in a contest tries to fool judges into thinking it is human
Careem app chooses the nearest driver and fastest route
A Prolog program proves 'Ali has a reg. no.' from facts and rules
Robot vacuum avoids walls and cleans the dirtiest area first
Common Mistakes
WATCH OUT
WRONG IDEA
CORRECT IDEA
✗ AI means robots only.
✓ Most AI is software: Maps, YouTube, spam filters. Robots are one application.
✗ AI and ChatGPT are the same thing.
✓ ChatGPT is one AI tool (a chatbot). AI is a whole field with search, logic, learning, vision.
✗ Every computer program is AI.
✓ A bill calculator follows fixed steps. AI learns, reasons or searches for answers.
✗ Father of AI is Alan Turing.
✓ Father of AI is John McCarthy (1956). Turing asked 'Can machines think?' (1950).
✗ Rational means human-like.
✓ Rational means doing the best action to reach the goal, not copying humans.
Recap Quiz
CHECK YOUR UNDERSTANDING · 5 MIN
- Q1. Who is known as the father of AI?
- (a) Alan Turing (b) John McCarthy (c) Elaine Rich (d) Aristotle
- Q2. "Study of how to make computers do things which, at the moment, people do better" is by:
- (a) McCarthy (b) Turing (c) Rich (d) Norvig
- Q3. The Turing Test belongs to which approach?
- (a) Thinking humanly (b) Acting humanly (c) Thinking rationally (d) Acting rationally
- Q4. Which is NOT a component of intelligence?
- (a) Learning (b) Perception (c) Fast calculation only (d) Reasoning
- Q5. Aristotle's syllogisms are the base of:
- (a) Laws of thought (b) Turing Test (c) Cognitive modelling (d) Robotics
- Q6. A rational agent tries to:
- (a) Copy human errors (b) Do the best expected action (c) Pass the Turing Test (d) Never use logic
Homework and Next Lecture
BEFORE THE NEXT CLASS
- Task 1: List 5 AI apps you use. For each, write the component of intelligence it shows and its approach (AH/TH/TR/AR).
- Task 2: In your own words (5-6 lines), explain the difference between a normal program and an AI program with one new example.
- Read: Kaplan, Ch 1 and Russell & Norvig, Section 1.1.
- Reminder: Assignment 1 (Gemini AI tool report) is due on 06-10-2026.
NEXT LECTURE
- Lecture 2:
- History, Applications, Types and Ethics of AI