Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views58 pages

Class 6AI

The document provides an overview of Artificial Intelligence (AI), covering topics such as knowledge representation, search techniques, probabilistic reasoning, natural language processing, expert systems, and machine learning. It distinguishes between old AI (rule-based) and new AI (data-driven), and discusses the importance and applications of AI in various fields. Additionally, it includes multiple-choice questions to reinforce understanding of the concepts presented.

Uploaded by

abrar niloy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views58 pages

Class 6AI

The document provides an overview of Artificial Intelligence (AI), covering topics such as knowledge representation, search techniques, probabilistic reasoning, natural language processing, expert systems, and machine learning. It distinguishes between old AI (rule-based) and new AI (data-driven), and discusses the importance and applications of AI in various fields. Additionally, it includes multiple-choice questions to reinforce understanding of the concepts presented.

Uploaded by

abrar niloy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

(বিষয়বিবিক অংশ)

ICT
Mentor

Md Ferdos Kabir

General Education(ICT)
38th BCS
Today’s Topic:

Lecture: 6

Artificial Intelligence
Overview
▪ Introduction to AI
▪ Knowledge Representation
▪ Propositional and First-Order Logic
▪ Search Techniques in AI
▪ Probabilistic Reasoning
▪ Natural Language Processing (NLP)
▪ Expert Systems
▪ Introduction to Machine Learning
▪ Practical Applications of Machine
Learning
What is AI?

Science of making computers think and act


like humans
Examples:
Google Maps → shortest route
Playing chess against computer
ChatGPT answering questions

AI = Computer + Human-like Intelligence


Why AI is Important?

Helps humans in decision making Saves


time and effort
Works in complex areas:
• Disease detection
• Self-driving cars
Old AI vs. New AI
Old AI (Symbolic/Rule-based):
Fixed rules: “IF condition THEN action”
Example: MYCIN (Medical Expert System)

New AI (Machine Learning/Deep Learning)


Learns from data
Examples:
• Facebook face recognition
• Siri / Alexa voice assistant

Old AI = Rules | New AI = Data


MCQ
Q1. What does Artificial Intelligence mainly try to do?
a) Make computers faster
b) Make computers think and act like humans
c) Make computers store large data
d) None of the above

Q2. Which of the following is an example of *new AI*?


a) Rule-based expert system
b) Facebook face recognition
c) IF-THEN statement system
d) None of the above
Knowledge Representation

The way information/knowledge is stored in


a computer
Goal: Represent real world in a form that
computer can use

Example:
Human: “All birds can fly. A sparrow is a bird.
→ Sparrow can fly.”
AI stores this as rules/facts
Why Knowledge Representation is
Important?
AI needs facts + reasoning
Without KR, AI is just a program
Helps in decision making and problem
solving
Types of Knowledge

1. Declarative Knowledge → 'What is true'(facts)


Example: Paris is the capital of France

2. Procedural Knowledge → 'How to do


something' (steps)
Example: How to drive a car
Approaches to Knowledge
Representation
1. Semantic Networks → Graph of nodes &
edges
2. Frames → Data structures with slots (e.g.,
Car frame)
3. Rules → IF condition THEN action
4. Ontologies → Defines relationships
between concepts
MCQ
Q1. Which of the following is Declarative
Knowledge?
a) How to cook rice
b) Paris is the capital of France
c) How to ride a bicycle
d) Steps of solving a math problem

Q2. Which method uses graph-like nodes & edges?


a) Frames
b) Semantic Networks
c) Rules
d) Ontologies
What is Logic in AI?

Logic = a way of reasoning


AI uses logic to make decisions and deduce
new facts
Propositional Logic
Deals with simple statements (true/false)
Examples:
• "It is raining." true or false
• "The sky is blue." true
Connectives: AND (∧), OR (∨), NOT (¬), IMPLIES
(→)

Example:
P: It is raining
Q: The ground is wet
Rule: P → Q
First-Order Logic (FOL)
Extends propositional logic with objects,
relations, quantifiers
Predicates: properties (e.g., Human(x))
Quantifiers:
• Universal (∀): "For all"
• Existential (∃): "There exists"

Example:
∀x (Human(x) → Mortal(x))
Human(Socrates) → Mortal(Socrates)
Why Logic is Important in AI?

Helps AI reason like humans


Used in expert systems, NLP, knowledge
bases
MCQs
Q1. Which connective is represented by (¬)?
a) AND
b) OR
c) NOT
d) IMPLIES

Q2. Which quantifier means "For all"?


a) ∀
b) ∃
c) →
d) ¬
What is Search in AI?

AI often needs to find solutions by exploring


possibilities
Examples:
• Solving a maze
• Google Maps finding shortest path
Problem Formulation

Initial state → Where to start


Goal state → What we want to achieve
Operators → Actions that move from one
state to another
Path cost → Measure of efficiency (distance,
time, etc.)
Types of Search – Uninformed

No extra knowledge, just explores


possibilities
Examples:
• Breadth-First Search (BFS): explores level
by level
• Depth-First Search (DFS): goes deep first,
then backtracks
• Uniform Cost Search: chooses least-cost
path
Types of Search – Informed

Uses extra knowledge (heuristics) to guide


search
Examples:
• Greedy Search: chooses path that looks
closest to goal
• A* Search: uses both path cost + heuristic
Why Search is Important in AI?

Many AI problems are search problems


(games, planning, navigation)
Efficient search = faster and smarter AI
MCQ
Q1. Which search explores level by level?
a) DFS
b) BFS
c) Greedy Search
d) A* Search

Q2. Which search algorithm combines path cost +


heuristic?
a) BFS
b) DFS
c) A*
d) Uniform Cost Search
Probabilistic Reasoning

AI often faces uncertainty


Probabilistic reasoning helps make decisions
with incomplete info

Example:
Person coughs → Possible flu (70% chance)
AI uses probability to guess the most likely
cause
Basics of Probability in AI

Probability (P) = likelihood of event


Range: 0 ≤ P(Event) ≤ 1
• 0 = Impossible
• 1 = Certain

Example:
Tossing coin → P(Heads) = 0.5, P(Tails) = 0.5
Bayes' Theorem

Formula:
P(A|B) = [P(B|A) * P(A)] / P(B)

Meaning: Probability of A given B

Example:
Disease probability after test result
Helps update belief with new evidence
Bayesian Networks

Graphical models showing variables &


dependencies

Example:
Weather affects Sprinkler & Rain
Rain + Sprinkler affect Wet Grass
Why Probabilistic Reasoning?

Handles real-life uncertainty Used in:


• Medical diagnosis
• Spam filters
• Speech recognition
• Self-driving cars
MCQ
Q1. Probability values always lie between:
a) -1 and 1
b) 0 and 1
c) 1 and 100
d) None of the above

Q2. Which tool is used in AI to reason under


uncertainty?
a) DFS
b) Bayes' Theorem
c) Semantic Networks
d) Frames
What is NLP?

Teaching computers to understand and


process human language
Bridge between human language and
computer language

Examples:
Google Translate
Siri / Alexa voice assistants
Chatbots
Why is NLP Important?

Enables computers to communicate directly


with humans
Used in:
• Search engines
• Voice assistants
• Customer support
• Healthcare
Main Tasks in NLP
Syntax Analysis (Parsing): Grammar &
structure
Example: "The cat sat on the mat."

Semantics Analysis: Meaning of


words/sentences
Example: Bank = river bank vs. money bank

Pragmatics & Context: Meaning in context


Example: "I’m feeling blue" = sad
Applications of NLP

Machine Translation (Google Translate)


Sentiment Analysis (Positive/Negative)
Chatbots (Customer support)
Speech Recognition (Siri, Alexa)
MCQ
Q1. Which of the following is an application of NLP?
a) Google Translate
b) DFS
c) Sorting algorithms
d) Page replacement

Q2. In NLP, which task deals with meaning of sentences?


a) Syntax Analysis
b) Semantic Analysis
c) Sorting
d) Pathfinding
What is an Expert System?

A computer program that mimics human


expert decision-making
Works using:
• Knowledge base (facts + rules)
• Inference engine (reasoning)

Examples:
MYCIN (medical diagnosis)
DENDRAL (chemical analysis)
Components of Expert Systems

1. Knowledge Base: Stores facts & rules


2. Inference Engine: Applies rules to facts for
conclusions
3. User Interface: Communicates with user
Advantages of Expert Systems

Consistency in decisions
Works 24/7
Useful in medicine, engineering,
troubleshooting
Limitations of Expert Systems

Cannot learn by themselves


Limited to stored knowledge
Expensive to build & maintain
MCQ
Q1. Which is a famous medical expert system?
a) DENDRAL
b) MYCIN
c) Siri
d) Google Translate

Q2. Which component applies rules to facts?


a) Knowledge Base
b) User Interface
c) Inference Engine
d) Database
What is Machine Learning?

A branch of AI where computers learn from


data
Goal: Systems improve automatically with
experience

Examples:
Email spam filter
Netflix recommendations
AI vs ML

AI: Broad field → Making machines


intelligent
ML: Subfield of AI → Machines learn from
data

All ML is AI, but not all AI is ML


Types of Machine Learning –
Supervised
Learns from labeled data (input + output)
Example: Predicting house prices from
size/location
Types of Machine Learning –
Unsupervised
Learns from unlabeled data (no correct
answers)
Example: Grouping customers into clusters
Types of Machine Learning –
Reinforcement
Learns by trial and error using rewards
Example: Training robots, AlphaGo game AI
Applications of ML

Healthcare: Disease prediction


Finance: Fraud detection
Education: Personalized learning
Self-driving cars
Recommendation systems
MCQ
Q1. Which best describes ML?
a) Writing fixed rules
b) Learning from data and improving
c) Using logic only
d) None of the above

Q2. Which ML type learns from labeled data?


a) Supervised Learning
b) Unsupervised Learning
c) Reinforcement Learning
d) None of the above
Why Applications of ML Matter?

ML is powerful because it solves real-world


problems
Helps automate tasks, make predictions,
improve decisions
Applications in Healthcare

Disease prediction (e.g., cancer detection)


Personalized medicine
Applications in Finance

Fraud detection in banking


Stock market predictions
Applications in Education

Personalized learning tools


Student performance prediction
Applications in Transportation

Self-driving cars (Tesla, Waymo)


Traffic prediction (Google Maps)
Applications in Entertainment

Netflix / YouTube recommendations


Music and movie suggestions
Applications in Security

Face recognition systems


Spam filtering in emails
Why Important for Students

ML is used in almost every industry


Opens career opportunities in Data Science,
AI, Robotics, etc.
MCQ
Q1. Which of the following is an application of ML in
finance?
a) Spam filtering
b) Fraud detection
c) Grammar checking
d) Movie recommendation

Q2. Self-driving cars are an example of ML in:


a) Security
b) Entertainment
c) Transportation
d) Education
References
Rich & Knight – Artificial Intelligence (McGraw-Hill)
Standard reference, with conceptual summaries useful for MCQ prep.

R.B. Patel – Artificial Intelligence and Soft Computing


Contains direct MCQs with answers for practice.
Thank You

You might also like