CH 3
CH 3
Chapter 3
Revision of Definition of AI
AI Techniques used in the problems such as game playing & theorem proving.
Game playing involves both checkers-playing program & chess.
Theorem proving explored in the area of mathematics, as geometry.
Both game playing & theorem proving share the property that people who do
well are considered to be displaying intelligence.
Computers could perform well at those tasks simply by being fast at exploring
a large number of solution paths and then selecting the best one.
This process required little knowledge & programmed easily.
Task Domains of AI:
For e.g. How much is 12,324 times 739817 even though it can answer in
microseconds, it will take several minutes and then respond with wrong
answer.
Computer takes long time to pass the Turing test. No computer can imitate 100%
like a person. So it is necessary to settle at a particular level of imitation.
Rating: We can limit the level of Turing test by setting certain rates to a
program.
For e.g. A Program can acquire classes rating based on rating of players whom it
can beat.
CRITERIA FOR SUCEESS: cont…
3. Isolate and represent the task knowledge that is necessary to solve the problem.
4. Choose the best problem solving technique and apply it to the particular problem
Solving Problems by Searching and
Planning
Searching
The process of systematically exploring a problem's state space (all possible states)
to discover a sequence of actions that leads to a solution.
Example: Finding the shortest route on a map.
Planning
The process of determining a sequence of actions (a plan) that transitions the
system from an initial state to a goal state.
Example: Planning a series of moves to win a chess game or assembling a
product step by step.
Steps in Problem Solving
1. Formulate Problem
Define the problem in terms of:
Initial State: Starting condition.
Goal State: Desired outcome.
Actions/Transitions: Allowed operations to move between states.
Example: In a maze-solving problem:
Initial State: The starting point of the maze.
Goal State: The exit of the maze.
Actions: Moving up, down, left, or right.
Start → Define Problem → Apply Search Algorithm → Identify Solution Path → Take
Actions → Goal Reached → End.
Steps in Problem Solving
3. Execute Solution
Implement the sequence of actions from the solution path in the real environment.
Example: A robot executing movements to navigate a warehouse.
State space Search
State Space
Initial State, Goal State, Actions
Solution Path
Solving Problems by Searching and
Planning
State Space A representation of all possible configurations of a problem.
Includes:
Nodes: Represent specific states.
Edges: Represent transitions (actions) between states.
In both chess and water jug problem explained the first step (“Define the
problem precisely”) towards the design of a program to solve a problem.
For that formal and manipulatable description of the problem is required.
Hence we ill be able to write programs which produces these formal
description into informal.
This process is known as “Operationalization”
CONTROL STRATEGIES
Control Strategies decides which rule to apply during the process of searching
for solution to a problem.
The two types of search algorithms are
Un informed search
Informed Search
Search Algorithms
Search Algorithms
Uninformed Informed(Heuristic)
Uninformed Search
It is also called Blind or Exhaustive search. Search and therefore may not be very
efficient.
Does not use domain-specific knowledge; explores the state space systematically.
Informed Search
Also called heuristic or intelligent search. Uses information about the problem to
guide the search
Types of Uninformed Search:
Breath-First Search
Depth-First Search
Uniform Cost search
Breadth-First Search (BFS)
Explores all states at the current depth before moving to deeper levels.
Pros: Guaranteed to find the shortest path if all actions have equal cost.
Cons: Requires significant memory for large state spaces.
Example: Exploring a maze layer by layer.
Home take project (submission date
Tomorrow)
Blind search is not always possible, because they require too much space &
time.
Heuristics are “Rules of Thumb”. they do not guarantee for a solution to a
problem.
Heuristics are knowledge about domain which help search and reasoning in its
domain.
Heuristics search function estimates cost from current state to goal,
presuming function is efficient.
Heuristic function
f(n) = h(n)
Types of Informed Search:
Prioritizes states that appear closest to the goal based on a heuristic function
(h(n)).
Pros: Often faster than uninformed methods.
Cons: Not guaranteed to find the optimal solution.
Example: Choosing roads that seem to lead directly to a destination on a map.
A Search*
Combines path cost (g(n)) and heuristic cost (h(n)): f(n) = g(n) + h(n).
Pros: Guaranteed to find the optimal solution if the heuristic is admissible.
Cons: Can be slow in complex problems.
Example: Solving puzzles like the 8-puzzle or optimizing robot navigation.
Constraint Satisfaction Problem (CSP)
Sudoku
Variables: Each cell in the grid.
Domains: Numbers 1 to 9.
Constraints: No duplicate numbers in a row, column, or 3x3 subgrid.
Map Coloring
Variables: Each region on a map.
Domains: Colors (e.g., red, blue, green).
Constraints: No two adjacent regions can have the same color.
Scheduling
Variables: Time slots for activities.
Domains: Possible times or locations.
Constraints: No overlap between conflicting activities., Specific resources
(like a room) can be used only once at a time.
Examples of csp
Sudoku
Variables: Each cell in the grid.
Domains: Numbers 1 to 9.
Constraints: No duplicate numbers in a row, column, or 3x3 subgrid.
Map Coloring
Variables: Each region on a map.
Domains: Colors (e.g., red, blue, green).
Constraints: No two adjacent regions can have the same color.
Scheduling
Variables: Time slots for activities.
Domains: Possible times or locations.
Constraints: No overlap between conflicting activities., Specific resources
(like a room) can be used only once at a time.
Q?