0% found this document useful (0 votes)
12 views20 pages

Artificial Intelligence Notes

The document provides an introduction to Artificial Intelligence (AI), detailing its definitions, comparisons with Machine Learning and Deep Learning, and various applications. It also discusses AI techniques, intelligent agents, problem-solving frameworks, and search strategies, including classic problems used to illustrate these concepts. Key components include the PEAS framework for agents, production systems, and the characteristics of problems that influence search strategies.

Uploaded by

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

Artificial Intelligence Notes

The document provides an introduction to Artificial Intelligence (AI), detailing its definitions, comparisons with Machine Learning and Deep Learning, and various applications. It also discusses AI techniques, intelligent agents, problem-solving frameworks, and search strategies, including classic problems used to illustrate these concepts. Key components include the PEAS framework for agents, production systems, and the characteristics of problems that influence search strategies.

Uploaded by

harishgore552
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Introduction to Artificial Intelligence (AI)

This section covers the fundamental concepts of Artificial Intelligence, its relationship with related
fields like Machine Learning and Deep Learning, various techniques, and its applications.

1.1 Introduction to AI

Concept

Artificial Intelligence (AI) is a broad field of computer science concerned with building machines
capable of performing tasks that typically require human intelligence.

The key focus is on creating systems that can reason, learn, perceive, problem-solve, and make
decisions under varying circumstances.

Definitions of AI (Focusing on four approaches)

Focus
Approach Description
Area

Systems that think like


Aims to build systems that think similarly to the human mind (e.g.,
Thinking humans (Cognitive
in terms of beliefs, desires, and intentions).
Modeling)

Systems that think


Aims to use formal logic to create programs that can reason
rationally (Laws of
correctly and reach provable conclusions.
Thought)

Systems that act like Aims to build systems that can pass the Turing Test—a test of a
Acting humans (Turing Test machine's ability to exhibit intelligent behavior equivalent to, or
Approach) indistinguishable from, that of a human.

Systems that act Aims to build a rational agent—one that acts so as to achieve the
rationally (Rational best outcome or, when there is uncertainty, the best expected
Agent Approach) outcome. (This is the most widely accepted view in modern AI).

Export to Sheets

1.2 Comparison of AI, Machine Learning, Deep Learning

These terms are often confused, but they represent a hierarchy:

 AI (Artificial Intelligence): The broadest concept. The goal of building intelligent machines.
Any technique that enables computers to mimic human intelligence.

 Machine Learning (ML): A subset of AI. It involves the use of statistical methods to enable
machines to improve at a task with data, without being explicitly programmed. ML
algorithms learn patterns from data and make predictions or decisions based on those
patterns.

 Deep Learning (DL): A subset of ML. It is based on Artificial Neural Networks (ANNs) with
multiple hidden layers (hence, "deep"). DL excels at processing complex, unstructured data
like images, sound, and text, and is responsible for many recent breakthroughs in AI.
Feature AI Machine Learning (ML) Deep Learning (DL)

Scope Broadest concept Subset of AI Subset of ML

Statistical methods, algorithms (e.g.,


Logic, rule-based Multi-layered Artificial
Technique linear regression, decision trees,
systems, search, ML, DL Neural Networks
clustering)

Less dependent (can


Data Highly dependent on Highly dependent on
use explicit
Dependence structured/labelled data vast amounts of data
programming)

Features are hand- Features are


Features engineered or Features are often hand-engineered automatically learned
programmed from data

Export to Sheets

1.3 Applications of AI

AI is ubiquitous. Key application areas include:

1. Natural Language Processing (NLP): Understanding and generating human language. (e.g.,
Siri, Google Translate, sentiment analysis).

2. Computer Vision: Enabling machines to "see" and interpret visual information. (e.g., facial
recognition, object detection in self-driving cars, medical image analysis).

3. Robotics: Creating machines that can perform physical tasks. (e.g., industrial robots,
autonomous drones).

4. Expert Systems: Programs designed to emulate the decision-making ability of a human


expert. (e.g., medical diagnosis systems).

5. Game Playing: AI systems that can play complex games at a superhuman level. (e.g.,
DeepMind's AlphaGo).

6. Autonomous Vehicles: Self-driving cars and aircraft that navigate without human input.

7. Recommendation Systems: Predicting user preferences to suggest products, movies, or


music. (e.g., Netflix, Amazon).

1.4 AI Techniques

AI techniques are the methods and approaches used to solve problems in the field. They generally
fall into two categories:

1. Knowledge Representation and Reasoning (Traditional/Symbolic AI)

 Search Algorithms: Used to find a solution path from a starting state to a goal state.
(Detailed in your next section: Uninformed/Informed Search).
 Logic: Using formal systems (like Propositional Logic and Predicate Logic) to represent
knowledge and deduce new facts.

 Rule-Based Systems (Expert Systems): Using IF-THEN rules to store and process knowledge.

2. Machine Learning

 Statistical Models: Algorithms that learn relationships and patterns from data.

 Neural Networks: Computational models inspired by the human brain, used for complex
pattern recognition.

 Evolutionary Computation: Algorithms (like Genetic Algorithms) that use concepts inspired
by biological evolution (mutation, selection, crossover) to find solutions.

1.5 Intelligent Agents, Agents and Environments, Structure of Agents

Agent Concept

An Agent is anything that can be viewed as perceiving its environment through sensors and acting
upon that environment through actuators.

 Sensors: Devices that gather information about the environment (e.g., cameras,
microphones, keyboard inputs).

 Actuators: Devices that effect changes in the environment (e.g., motors, display screens,
speakers).

Rational Agent

A Rational Agent is one that acts correctly—it performs actions that cause it to achieve the best
outcome or, when there is uncertainty, the best expected outcome.

PEAS Description of an Agent

To characterize an agent, the PEAS (Performance measure, Environment, Actuators, Sensors)


framework is used:

Component Description Example (Self-Driving Car)

Performance Safety, speed, comfort, obeying traffic


The criteria for success.
measure laws.

Roads, traffic, pedestrians, weather, other


Environment The world the agent operates in.
drivers.

Steering wheel, accelerator, brake, signal


Actuators The mechanisms for taking action.
lights.

The means of perceiving the


Sensors Cameras, radar, LiDAR, GPS, odometer.
environment.

Export to Sheets

Structure of Agents
The Agent Program (the function that implements the agent's behavior) is executed on the Agent
Architecture (the computing device with sensors and actuators).

There are four basic types of agent programs:

1. Simple Reflex Agents:

o Action: Choose action based only on the current percept (if-then-rule).

o Limitation: Operates without knowledge of the past; only works if the environment
is fully observable.

o Structure: if condition then action

2. Model-Based Reflex Agents:

o Action: Maintains an internal state (a memory of the past) to handle partially


observable environments.

o Structure: Requires information about "how the world evolves" (transition model)
and "what my actions do" (effect model) to update the state.

3. Goal-Based Agents:

o Action: Use the goal information along with the current state to choose the action
that will lead to the goal.

o Structure: Requires search and planning to find action sequences that achieve the
goal.

4. Utility-Based Agents:

o Action: Chooses the action that maximizes the agent's utility (a measure of its
performance/preference). Used when multiple goals are possible or there's a trade-
off.

o Structure: A utility function maps a state (or sequence of states) onto a real number,
providing a measure of "goodness."

2. Problems, Problem Spaces and Search

This section establishes the framework for how AI systems (specifically Goal-Based Agents) formalize
real-world challenges and use search algorithms to find solutions.

2.1 Defining Problem as a State Space Search

The most common way for an AI system to solve a problem is by representing it as a search through a
State Space.

Key Concepts

1. State: A complete description of the world at any given time.

o Example (Chess): A state is the arrangement of all pieces on the board.


2. Initial State: The starting point or configuration of the problem.

3. Goal State(s): The state(s) that the agent wants to reach, defined by a Goal Test.

4. Actions / Operators: Legal moves or operations that an agent can perform to transition from
one state to another.

o Example (8-Puzzle): Moving the blank tile up, down, left, or right.

5. State Space: The set of all possible states reachable from the initial state by any sequence of
actions. The search problem is to find a path through this space.

6. Path: A sequence of states connected by a sequence of actions.

7. Path Cost: A function that assigns a numerical cost to a path. The goal is often to find the
path with the minimum cost.

Formal Problem Definition

A search problem is formally defined by four components:

Problem=(S0,ACTIONS,TRANSITION MODEL,GOAL TEST)

 S0: The initial state.

 ACTIONS: A function that returns the set of legal actions for any given state.

 TRANSITION MODEL: A function that describes the result of performing a given action in a
given state (i.e., the next state).

 GOAL TEST: A function that checks whether a given state is a goal state.

The solution to a search problem is an optimal sequence of actions (a path) that leads from the
initial state to a goal state.

2.2 Production System

A Production System is a foundational model for implementing rule-based AI systems, often used to
define the action and transition models of a state space.

Components of a Production System

1. A Set of Rules (Production Rules): These are the IF-THEN rules that define the available
actions.

o Form: IF⟨condition⟩ THEN⟨action⟩

2. A Working Memory (Global Database): Contains the current state description. The rules
operate on this memory.

3. A Control Strategy: Specifies the procedure for choosing which rule to apply next. This
dictates the order of operation and prevents loops.

Working Cycle

The control strategy cycles through the following steps:


1. Match: Compare the conditions of all production rules against the contents of the working
memory.

2. Conflict Resolution: If multiple rules match (i.e., their conditions are satisfied), select one
rule to execute (based on criteria like specificity, priority, or time of insertion).

3. Execute (Act): Apply the action of the chosen rule, which modifies the working memory
(updates the state).

4. Terminate: Stop when a goal state is reached or no rules match.

2.3 Problem Characteristics

Understanding the nature of the problem is crucial for choosing the right search technique.

Characteristic Description Implications for Search

Can the problem be broken down


Is the problem If YES, use techniques like AND/OR graphs
into smaller, independent
decomposable? and divide-and-conquer.
subproblems?

Can action be Is it possible to backtrack and If NO (e.g., Chess), then path cost and
undone? reverse a bad move? pruning become crucial.

Is the result of every action


Deterministic: Simple search algorithms.
Is the universe guaranteed (Deterministic)? Or is
Non-deterministic: Requires planning for
predictable? the outcome uncertain (Non-
contingencies (Contingency Planning).
deterministic)?

Absolute: Use algorithms that find any


Is any path to the goal fine? solution quickly (e.g., Breadth-First
Is a good solution
(Absolute) Or is the cheapest path Search). Relative: Use algorithms that
absolute or relative?
required? (Relative/Optimal) guarantee an optimal solution (e.g., A*
Search).

Is the current state fully known


Partially Observable: Requires the agent
Is the environment (Fully Observable)? Or is it only
to maintain a belief state (a probability
observable? partially known (Partially
distribution over possible states).
Observable)?

Export to Sheets

2.4 Search and Control Strategies

Control Strategy is the core of the search process. It determines the order in which states are
examined (expanded) in the search space.

Need for Control Strategy

In a large state space, it's impossible to check every state. The control strategy efficiently manages
the search process by:
1. Guiding the search: Deciding which path to explore next.

2. Preventing redundant work: Avoiding searching the same state multiple times.

3. Ensuring termination: Guaranteeing the algorithm stops, either with a solution or after
exhausting possibilities.

Control strategies are generally divided into two main categories:

1. Uninformed (Blind) Search: The strategy has no information about the distance or cost to
the goal—it only distinguishes between goal and non-goal states. (Detailed in Section 3.1)

2. Informed (Heuristic) Search: The strategy uses problem-specific knowledge (a heuristic


function) to estimate the distance to the goal, allowing it to prioritize promising paths.
(Detailed in Section 3.2)

2.5 Problems - Water Jug problem, Missionary Cannibal Problem, Block Worlds

These are classic benchmark problems used to illustrate and test search algorithms.

1. Water Jug Problem

 Problem: Given a 4-gallon jug and a 3-gallon jug, with no measuring marks, and a pump for
unlimited water, how do you get exactly 2 gallons of water in the 4-gallon jug?

 State Representation: (x,y), where x is the amount of water in the 4-gallon jug and y is the
amount in the 3-gallon jug.

 Initial State: (0,0)

 Goal State: (2,n) where n is any amount.

 Operators (Actions): Fill jug 4, Fill jug 3, Empty jug 4, Empty jug 3, Pour water from 4 to 3,
Pour water from 3 to 4.

2. Missionary Cannibal Problem

 Problem: Three missionaries and three cannibals are on one side of a river. They have one
boat that can hold at most two people. If the cannibals ever outnumber the missionaries on
either bank, the missionaries will be eaten. How can they all safely cross the river?

 State Representation: (m,c,b), where:

o m: Number of missionaries on the starting bank.

o c: Number of cannibals on the starting bank.

o b: Position of the boat (1 for starting bank, 0 for destination bank).

 Initial State: (3,3,1)

 Goal State: (0,0,0)

 Constraint: The number of missionaries must not be less than the number of cannibals on
either bank (unless the number of missionaries is zero).
 Operators (Actions): Move 1 missionary, Move 1 cannibal, Move 2 missionaries, Move 2
cannibals, Move 1 missionary and 1 cannibal (boat capacity ≤2).

3. Block Worlds

 Problem: A set of blocks resting on a table or each other needs to be rearranged from an
initial configuration to a desired goal configuration.

 State Representation: Usually a list or symbolic description of which block is on top of which
block, and which blocks are on the table.

 Operators (Actions):

o Move(A, B): Pick up block A and place it on block B (A must be clear, B must be
clear).

o Move(A, Table): Pick up block A and place it on the table (A must be clear).

2.6 Problems - Monkey and Banana problem

 Problem: A monkey is in a room. A bunch of bananas is hanging out of reach from the
ceiling. A box is in the room. The monkey's goal is to get the bananas.

 Key Challenge: This is a classic example of a Strips-like planning problem, where the
sequence of actions is critical and involves multiple preconditions and post-conditions.

 State Representation: A tuple of propositions describing the world: (Monkey location, Box
location, Bananas location, Monkey is/is not on box, Bananas are/are not grasped).

o Example State: (At-A, At-B, At-C, OnBox-No, Has-No)

 Operators (Actions):

1. Go(Location L1 to L2): Monkey walks from L1 to L2.

2. PushBox(Box B, from L1 to L2): Monkey pushes the box.

3. ClimbOn(Box B): Monkey climbs onto the box.

4. Grasp(Bananas): Monkey reaches and takes the bananas.

 Goal State: The state where the proposition Has(Bananas) is true.

3. Searching Algorithms

Search algorithms are the engines of AI problem-solving. They are methods used to find a solution
path from an initial state to a goal state within the defined state space. They are categorized based
on whether they use problem-specific knowledge (heuristics) or not.

3.1 Uninformed Search Algorithms/Blind Search Techniques


Uninformed Search algorithms (also called Blind Search) have no knowledge about the search space
other than how to generate successor states and test if a state is the goal. They explore the search
space systematically without prioritizing promising nodes.

1. Breadth-First Search (BFS)

Concept Evaluation Criteria

Concept: Expands all nodes at a given depth level d before


Completeness: Yes, if the branching
moving to nodes at depth d+1. It uses a FIFO (First-In, First-
factor b is finite.
Out) Queue for storing nodes.

Optimality: Yes, if the cost for every


Strategy: Searches horizontally first. step is uniform (i.e., every edge has the
same cost).

Time Complexity: O(bd) (Exponential),


Use Case: When you need the shortest path (in terms of
where b is branching factor, d is depth of
the number of steps/edges).
solution.

Space Complexity: O(bd) (Can be huge,


as it stores the entire level d in
memory).

Export to Sheets

2. Depth-First Search (DFS)

Concept Evaluation Criteria

Concept: Explores one branch of the tree as deeply Completeness: No, it can get stuck in an
as possible before backtracking. It uses a LIFO (Last- infinite loop or an infinitely deep path if a
In, First-Out) Stack for storing nodes. solution isn't found along that path.

Optimality: No, it may find a deep, expensive


Strategy: Searches vertically first. solution path even if a shallow, cheaper one
exists.

Use Case: When the search space is very wide but Time Complexity: O(bm), where m is the
the solution is known to be deep, or when memory maximum depth of the state space (can be
is limited. infinite).

Space Complexity: O(bm) (Much better than


BFS, linear with respect to depth).

Export to Sheets

3. Depth-Limited Search (DLS)

DLS is DFS with a predetermined limit L on the depth of the search.

 Benefit: Prevents DFS from getting stuck in infinite paths.

 Limitation: If the shallowest solution is deeper than L, the algorithm is incomplete (it won't
find the solution).
4. Iterative Deepening Depth-First Search (IDDFS)

IDDFS combines the benefits of DFS (low memory usage) and BFS (completeness and optimality).

 Strategy: It performs DLS iteratively, increasing the depth limit L by 1 in each iteration
(L=0,1,2,3,…).

 Completeness: Yes, like BFS.

 Optimality: Yes, like BFS (for uniform cost steps).

 Efficiency: Surprisingly efficient. Although it regenerates the nodes at shallow depths


multiple times, most nodes in a search tree are typically at the deepest level, so the
overhead is small. Its time complexity is O(bd), similar to BFS, but with O(bd) space
complexity.

3.2 Informed (Heuristic) Search Techniques

Informed Search algorithms use a heuristic function, h(n), which estimates the cost of the cheapest
path from node n to the goal. This information guides the search, making it much faster than blind
search.

3.2.1 Greedy Best-First Search

Concept Limitation

Strategy: Expands the node that appears closest to the Suboptimal: It prioritizes local improvement
goal, according to the heuristic function h(n). It always and may find a solution quickly but one that
picks the node with the lowest h(n) value. is very expensive globally.

Incomplete: Can get stuck in a path that


Formula: f(n)=h(n) leads away from the goal if h(n) is locally
misleading.

Export to Sheets

3.2.2 Simple Hill Climbing

 Strategy: This is the simplest local search technique. It is like an agent trying to climb a hill.
From the current state, it moves to the best neighbor state (the one that moves closer to the
goal, i.e., has a lower cost h(n)).

 Key Feature: It does not backtrack or maintain a search tree. It only keeps track of the
current state and its neighbors.

 Limitation: Highly prone to getting stuck in local optima (a "hill" that isn't the highest point
in the entire landscape) or plateaus (flat areas where h(n) doesn't change).

3.2.3 Best-First Search

This is a general term encompassing both Greedy Best-First Search and A* Search. It describes any
search where the node to expand is chosen based on an evaluation function f(n).

3.2.4 Constraint Satisfaction


 Concept: A type of problem defined by a set of variables that must be assigned values
subject to a set of constraints. Unlike traditional search, which finds a path, CSP finds a valid
assignment of values.

 Formalization: A CSP is defined by {X,D,C}:

o X: A set of variables X1,X2,…

o D: A set of domains D1,D2,… (possible values for each variable).

o C: A set of constraints (restrictions on the values that can be assigned to variables).

 Example: Sudoku (Variables = cells, Domain = {1−9}, Constraints = uniqueness in


row/column/box).

 Techniques: Backtracking search, constraint propagation (e.g., arc consistency).

3.2.5 Means-Ends Analysis

 Concept: A problem-solving technique used in AI planning, most famously by the General


Problem Solver (GPS). It works by repeatedly reducing the difference between the current
state and the goal state.

 Process:

1. Determine the difference between the current state and the goal state.

2. Find an operator (action) that is relevant to reducing that difference.

3. If the operator cannot be applied (its preconditions are not met), set the
preconditions as a new sub-goal.

4. Repeat the process until the main goal is achieved.

 Example: Goal: Cook dinner. Difference: No ingredients. Relevant Operator: Buy groceries.
Sub-goal: Get to the store.

3.2.6 A* and AO*

These are two of the most powerful and common informed search algorithms.

A* Search

A* (pronounced "A-star") is the most widely used optimal graph search algorithm.

 Evaluation Function: f(n)=g(n)+h(n)

o g(n): The actual cost from the initial state to node n.

o h(n): The estimated cost (heuristic) from node n to the goal.

o f(n): The estimated cost of the cheapest solution path through n.

 Strategy: A* expands the node n with the lowest f(n) value.

 Key Property (Admissibility): A* is optimally complete (guaranteed to find the optimal path)
if the heuristic h(n) is admissible (never overestimates the true cost to the goal, i.e.,
h(n)≤h∗(n)).
AO* Search

AO* is an algorithm designed for searching AND/OR graphs, which are used when a problem can be
decomposed into subproblems (AND nodes) that must all be solved.

 Concept: Used primarily for problems that are decomposable (like the Tower of Hanoi or
logic proofs).

 Strategy: It intelligently searches the graph by focusing only on the most promising part of
the graph (the current best path/solution structure).

Feature A* Search AO* Search

Structure OR Graph (Path search) AND/OR Graph (Subproblem decomposition)

Find an optimal path to the goal Find an optimal solution graph (a set of
Goal
state. steps).

Algorithm Type Best-First Search Depth-First Search with cost revision

Export to Sheets

4. Knowledge Representation

Knowledge Representation (KR) is the area of AI concerned with how to represent knowledge in a
symbolic form so that a computer system can reason about the world and use that knowledge to
solve complex tasks.

4.1 Definition of Knowledge

Knowledge in an AI context is a collection of facts, beliefs, rules, and procedures that an intelligent
agent uses to understand and act in its environment.

Key Characteristics of Knowledge:

 Voluminous: It can be huge.

 Shared: It's often used by many agents or systems.

 Inferential: It allows the derivation of new, implicit facts from existing, explicit facts.

 Dynamic: It changes constantly over time.

4.2 Types of Knowledge (Procedural and Declarative Knowledge)

Knowledge is often broadly categorized based on how it is expressed and used:

Type of
Description Representation Focus Example
Knowledge

Declarative Facts about objects, events, Statements/Propositions (e.g., "The sun is yellow."
Knowledge and their relationships. It Logical sentences, semantic "A car has four
(What) describes what is true in the networks). wheels."
Type of
Description Representation Focus Example
Knowledge

world. It is passive and


independent of its use.

Knowledge about how to do


"To brake, you must
something. It specifies a
Procedural apply pressure to the
sequence of actions or rules to Rules (e.g., IF-THEN rules,
Knowledge pedal." "IF it is
follow to achieve a goal. It is procedures, algorithms).
(How) raining THEN take an
active and depends on its
umbrella."
application.

Export to Sheets

4.3 Approaches to Knowledge Representation

The methods used to structure and formalize knowledge in an AI system:

1. Logical Representation: Uses formal logic (like Propositional and Predicate Logic) to express
knowledge in precise, unambiguous terms. Reasoning is done via formal inference rules (e.g.,
Modus Ponens).

2. Procedural Representation: Knowledge is embedded in the procedures, functions, or


programs that an agent executes (e.g., IF-THEN-ELSE statements).

3. Network Representation: Knowledge is represented as a graph structure where nodes


represent concepts/objects and links/edges represent relationships between them (e.g.,
Semantic Networks, Conceptual Graphs).

4. Structured Representation: Knowledge is represented by complex data structures that


define large, related concepts in a holistic way (e.g., Frames and Scripts).

4.4 Knowledge Representation using Propositional and Predicate Logic

Formal logic provides a precise, mathematical way to represent and reason with knowledge.

Propositional Logic (PL)

 Concept: The simplest form of logic. It deals with declarative sentences (propositions) that
are either True (T) or False (F).

 Syntax:

o Propositions: Atomic sentences (e.g., P, Q).

o Connectives: ¬ (NOT), ∧ (AND), ∨ (OR), ⇒ (IMPLIES), ⇔ (IFF).

 Limitation: PL cannot easily represent generalized statements about objects. For example,
"All men are mortal" requires a separate proposition for every man, which is impractical.

Predicate Logic (First-Order Logic - FOL)

 Concept: An extension of PL that allows us to express relationships between objects, use


variables, and make general statements using quantifiers.
 Syntax:

o Objects: Constants (e.g., John, Table).

o Predicates: Properties or relations (e.g., is_mortal(x), on(x,y)).

o Functions: Mappings from objects to objects (e.g., father(John)).

o Quantifiers:

 Universal Quantifier (∀): "For all" (e.g., ∀x is_man(x)⇒is_mortal(x)).

 Existential Quantifier (∃): "There exists" (e.g., ∃x loves(x,Mary)).

 Advantage: FOL is expressive enough to represent almost all general knowledge concisely.

4.5 Conversion to Clause Form (Clausal Form)

For automated reasoning, especially in resolution systems, knowledge bases (KBs) written in FOL are
often converted into a standardized form called Clausal Form or Conjunctive Normal Form (CNF).

Clausal Form: A conjunction (AND) of clauses, where each clause is a disjunction (OR) of literals.

 Clause=L1∨L2∨…∨Lk

 Literal is an atomic sentence or its negation (e.g., P or ¬P).

Steps for Conversion to CNF (Skolemization):

1. Eliminate ⇔ and ⇒: Replace A⇔B with (A⇒B)∧(B⇒A); replace A⇒B with ¬A∨B.

2. Move ¬ inwards: Apply De Morgan's laws (e.g., ¬(A∧B) becomes ¬A∨¬B).

3. Standardize Variables: Ensure each quantifier uses a unique variable name.

4. Eliminate Existential Quantifiers (∃): This is done using Skolemization, replacing the
existentially quantified variable with a Skolem constant or a Skolem function.

5. Drop Universal Quantifiers (∀): They are implicitly assumed in the clausal form.

6. Distribute ∧ over ∨: Convert to the AND of OR form.

7. Flatten: Convert to a set of clauses.

4.6 Resolution in Propositional Logic

Resolution is a single, powerful inference rule used for automated theorem proving in AI. It is
especially used to prove that a conclusion logically follows from a set of axioms.

The Resolution Rule:

resolventl1∨…∨lk,m1∨…∨mn

If two clauses C1 and C2 contain a complementary literal (e.g., P in C1 and ¬P in C2), the resolvent is
the disjunction of all the literals in C1 and C2, excluding the complementary pair.

A∨BA∨P,¬P∨B

Resolution Refutation (Proof by Contradiction): To prove that a statement α is true:


1. Convert all premises (knowledge base KB) to clausal form.

2. Negate the conclusion α (i.e., add ¬α) and convert it to clausal form.

3. Apply the resolution rule repeatedly to the combined set of clauses.

4. If the resolution process derives the empty clause (□ or NIL), it means a contradiction was
found. Since the original premises were assumed true, the only false statement must be ¬α.
Therefore, α is proven true.

4.7 Resolution in Predicate Logic

The resolution rule is also applied in FOL, but it requires an extra step: Unification.

Unification: The process of finding substitutions for variables in predicate literals so that the literals
become identical (match exactly).

 Example: father(x) and father(John). Substitution θ={x/John} unifies them.

Resolution in FOL Process:

1. Convert all premises and the negated conclusion to Clausal Form (CNF), including
Skolemization.

2. Select two clauses to resolve.

3. Unify a pair of complementary literals (e.g., dog(x) and ¬dog(Fido)) by finding the Most
General Unifier (MGU), which is the simplest substitution.

4. Apply the resolution rule using the MGU, producing a new clause (the resolvent).

5. If the empty clause (□) is produced, the proof is complete.

5. Slot and Filler Structures

Slot and Filler Structures are popular non-logical knowledge representation techniques that organize
knowledge into highly structured, descriptive units. They represent concepts, objects, or events using
a collection of attributes (slots) and their corresponding values (fillers).

5.1 Weak Structures (Semantic Networks and Frame)

These are considered "weak" because they lack the formal semantics and inference guarantees of
logic, but they are highly intuitive and easy to implement.

1. Semantic Networks

 Concept: A graph-based representation where nodes represent objects, concepts, or events,


and links (edges) represent the relationships between them.

 Structure:

o Nodes (Concepts): e.g., Dog, Poodle, Fido, Mammal.

o Links (Relations): e.g., is_a (inheritance), has_part, instance_of.


 Inheritance: The core power of semantic networks is inheritance. Sub-classes (e.g., Poodle)
automatically inherit properties (slots) and values (fillers) from their super-classes (e.g., Dog
and Mammal). This saves space and simplifies reasoning.

o Example: If Dog has the property can_Breathe, then Fido (an instance of Dog) also
has can_Breathe.

 Limitation (Weak Semantics): It can be difficult to precisely define the meaning of all link
types, leading to ambiguity in reasoning.

2. Frames

 Concept: A frame is a data structure for representing a "stereotypical" situation, object, or


concept (like a class or template in object-oriented programming). Frames organize
knowledge about a concept into a collection of slots.

 Structure: A frame is a named entity with multiple slots:

Frame Name:CAR

⎩ ⎨ ⎧Slothas_WheelsColorManufacturerTypeEngine_Type
:Filler:4:Red, Blue, or Green:Default: Toyota:is_a: Vehicle Frame:gas, electric

 Slots and Fillers:

o Slots: Attributes of the concept (e.g., Color).

o Fillers: The values of the attributes (e.g., Red). Fillers can be specific values, another
frame, or a procedure.

 Facets: Slots can have attached procedures (called facets) for more complex behavior:

o Default Value: Used if no specific value is provided.

o If-Needed: A procedure run to compute the filler if the slot is accessed and currently
empty (lazy evaluation).

o If-Added: A procedure run when a value is inserted into the slot (e.g., to check
constraints).

 Benefit: Excellent for modeling complex objects and situations, leveraging defaults and
inheritance for efficiency.

5.2 Strong Structures (Conceptual Dependencies and Script)

These are "stronger" structures because they are specifically designed to represent knowledge about
actions, events, and cause-and-effect sequences, often in natural language understanding.

1. Conceptual Dependency (CD)

 Concept: A theory developed by Roger Schank for representing the meaning of sentences in
a way that is independent of the language used. It aims to reduce all actions to a small set of
primitive actions and actors.
 Goal: To enable inference and common sense reasoning from natural language text.

 Primitive Actions: Schank proposed a set of 11 primitive actions that are sufficient to
represent all human and natural actions. Examples include:

o ATRANS: Transfer of an abstract relationship (e.g., giving, buying).

o PTRANS: Physical transfer of an object (e.g., walking, driving).

o MBUILD: Mental construction/thought (e.g., deciding).

o MOVE: Movement of a body part (e.g., kicking).

 Structure: CD representations use a set of conceptual categories (ACTOR, OBJECT, STATE,


etc.) linked by directed arcs to show the relationships between the primitive actions.

 Benefit: Enables powerful inference. For example, regardless of whether a sentence is "John
gave Mary a book" or "Mary got a book from John," the CD representation is identical (an
ATRANS from John to Mary with the object book).

2. Scripts

 Concept: A specialized type of frame structure that represents knowledge about a


stereotypical sequence of events in a particular context (e.g., going to a restaurant, visiting a
doctor).

 Goal: To help an AI system understand and predict events in structured situations. They allow
the system to fill in missing details from a narrative.

 Structure: A script consists of several fixed components:

o Props: Objects normally involved (e.g., Table, Money, Food).

o Roles: People involved (e.g., Customer, Waitress, Chef).

o Entry Conditions: Must be true before the script can run (e.g., Customer is hungry,
Customer has money).

o Results: Conditions true after the script runs (e.g., Customer is full,
Customer has less money).

o Scenes: The actual sequence of events (e.g., Entering, Ordering, Eating, Paying,
Exiting).

 Benefit: Provides robust understanding for predictable, routine situations, making language
processing much more efficient.

6. Recent Trends in AI and Applications

This section covers the shift towards data-driven AI, the three main learning paradigms, and specific,
high-impact applications.

6.1 Introduction to Machine Learning


Machine Learning (ML) is the dominant paradigm in modern AI. It's the study of algorithms that
allow computer programs to automatically improve through experience and data.

 Goal: To learn a function f that maps inputs X to outputs Y, often written as Y=f(X).

 Key Concept: Generalization. The algorithm must perform well not just on the training data,
but on new, unseen data.

 Need: ML is necessary when:

o Human expertise is lacking (e.g., deep space exploration).

o Humans can't explain their expertise (e.g., driving a car).

o The problem is constantly changing (e.g., stock market prediction).

o Solutions need to be customized for individuals (e.g., recommendation systems).

6.2 Types of Learning (Supervised, Unsupervised and Reinforcement Learning)

The three primary categories define how the algorithm interacts with the data and the environment.

1. Supervised Learning

 Concept: The algorithm learns from a set of labeled examples—data where the desired
output (the "supervision") is already known.

 Data: Input data X is paired with corresponding correct output labels Y.

o Example: (Image of a dog, Label: "Dog"), (House features, Label: $300,000).

 Tasks:

o Classification: Predicting a discrete category (e.g., spam/not spam, disease/no


disease).

o Regression: Predicting a continuous value (e.g., house price, temperature).

2. Unsupervised Learning

 Concept: The algorithm learns from unlabeled data, aiming to find hidden patterns,
structure, or relationships within the data on its own. There is no predefined output.

 Data: Only input data X is provided, without corresponding output labels Y.

o Example: A set of customer purchase histories with no predefined groups.

 Tasks:

o Clustering: Grouping similar data points together (e.g., market segmentation).

o Dimensionality Reduction: Reducing the number of features while preserving


important information (e.g., principal component analysis).

3. Reinforcement Learning (RL)


 Concept: An agent learns by interacting with an environment to maximize a cumulative
reward. It learns through trial-and-error, without explicit instruction.

 Mechanism: The agent performs an action in a state, and the environment returns a reward
(positive or negative) and the next state.

 Key Components:

o Agent: The learner/decision-maker.

o Environment: The world the agent interacts with.

o State: The current situation.

o Action: The move the agent makes.

o Reward: Feedback from the environment.

o Policy: The strategy the agent uses to map states to actions.

 Applications: Game playing (AlphaGo, chess), robotics, autonomous driving control systems.

6.3 Predictive Analytics (Weather Forecasting)

Predictive Analytics is the use of statistical algorithms and ML techniques to analyze current and
historical data and make predictions about future or unknown events.

 Core Process: Involves collecting data, training an ML model (often time-series models or
deep learning models like LSTMs), and applying the model to new data to forecast
outcomes.

Application: AI in Weather Forecasting

 Traditional numerical weather prediction relies on complex physics models (differential


equations) run on supercomputers.

 AI/ML Approach: ML models are used to:

1. Correct Biases: Learn and correct systematic errors in traditional physics models.

2. Downscaling: Improve the resolution of large-scale model outputs to make localized


predictions.

3. Nowcasting: Make highly accurate, short-term (minutes to hours) forecasts by


processing massive amounts of real-time satellite imagery and radar data (e.g., using
Convolutional Neural Networks (CNNs)).

4. Climate Modeling: Analyze large climate datasets to predict long-term trends and
impacts.

 Benefit: AI significantly speeds up the analysis of vast observational data, enabling faster,
more localized, and potentially more accurate predictions.

6.4 AI-Powered Chatbots (SBI Card Chatbot (ILA))


Chatbots and Conversational AI represent a major application of Natural Language Processing (NLP)
and Machine Learning. They are designed to interact with humans using natural language.

Key Technologies Used:

1. Natural Language Understanding (NLU): The ability to process human language input,
identify the user's intent (e.g., "Check balance," "Pay bill"), and extract relevant entities (e.g.,
"Card number," "Due amount").

2. Dialogue Management: Maintaining the context and history of the conversation, deciding
the next system action.

3. Natural Language Generation (NLG): Formulating a coherent and appropriate response in


human language.

Example: SBI Card Chatbot (ILA)

 ILA (Interactive Learning Assistant) is an AI chatbot used by SBI Card to handle customer
service inquiries.

 Function: It is designed to mimic a human customer service agent by handling a large


volume of routine, repetitive tasks quickly.

 Tasks it handles: Checking credit card statements, finding card benefits, tracking application
status, answering FAQs, and assisting with card usage.

 Benefit: Provides 24/7 support, reduces call center load, and offers instant resolutions,
thereby improving customer experience and operational efficiency.

--------------------------------------------------------------------------------------------------------------------------------------

You might also like