The document provides an introduction to artificial intelligence including definitions of intelligence and AI. It discusses approaches to AI such as the Turing test and cognitive modeling. It also covers search algorithms like breadth-first search, depth-first search, uniform cost search, iterative deepening, informed searches using heuristics like A* search, and hill climbing search. Potential issues with methods like hill climbing getting stuck in local maxima are also addressed.
3. Some Aspect Of Intelligence
• Searching a Path
• Next Number in the Sequence(1,3,7,13,21,..)
• Solving Problem Everyday
• Planning(Example-Timetable)
• Memory and Information Processing(ex-Doctor)
• Amiguity
• Understanding and Perception
• Recognition and Learning
4. What is Intilligence
1. Ability to solve the problem
2. Ability to plan and schedule
3. Ability to memorize and solve the problem
4. Ability to learn
5. Ability to recognize
6. Ability to understand
5. What Is AI
Turing Test(1950)
• The Computer is Interrogated by a human via a
teletype
• It passes if the human cannot tell if there is computer
or human at the other end
Sufficency:Chinese Room Argument
6. Formal Definition Of AI
• Thought process/reasoning vs. behaviour
• Human-like performance vs. ideal
Performance
7. Approaches to AI
1. Acting humanly:The Turing Test Approach
2. Thinking humanly:Cognitive modeling
approach
3. Thinking rationaly:”Law of thought ”
approach
4. Acting rationally:The rational Agent Approach
8. ASSIGNMENT
1. History Of AI
2. Comparison between computer and Human
brain(on basis of computational)
3. Difference Between AI and OmniScience
4. Watch movie based on Artificial Intelligence
9. BFS AND DFS Complexity
b: branching factor d; depth of the goal
Breadth-First Search:
Time: 1+b+b2+b3+…..+bd= O(bd)
space: O(bd)
Depth First Search
Time=O(bm), where m is depth space treee
space= O(bm)
10. Question
• Imagine searching a tree with branching factor
8 and depth 10. Assume a node requires just 8
bytes of storage. The breadth first search
might require up to
11. Uniform Cost Search
• Uniform cost search can be used if the cost of
travelling from one node to another is available
• Uinform cost search always expands the lowest
cost node on the fringe(the collection od nodes
that are waiting to be expanded)
Disadvantage: Does not care about the no of path
has but only about their cost.Hence it might get
stuck in an infinite loof if it expands a node that
has a zero cost action leading back to same state
12. Iterative Deepening DFS and Depth-
Limited Search
• Depth Limited search
Perform depth first search but only to a pre-specified
depth limit L.
No node on a path that is more than L steps from the
initial state is placed on the frontier.
We truncate the search by looking only at paths of
length L or les
13. Informed Search(Heuristic Search)
• Informed search methods use problem
specific knowledge , are more efficient
• In informed search heuristic are used to
identify most promising search path
• Heuristic means “rule of thumb”
• Heuristic are criteria, method or principle for
deciding which among several alternative
course of action promise to be the most
effective in order to achieve goal
14. Example of heuristic function
• Want path from kathmandu to saptari
– Heuristic(kathmandu)=EuclideanDistance(kathma
ndu,saptari)
Heuristic function at a node n ia an estimate of the
optimum cost from the current node to a goal
It is demoted by h(n).
h(n)=Estimate cost of the cheapest path from node
n to a goal node
h(goal)=0
15. Best First Search
• Best first search algorithm almost same as depth/breadth. But we use a
priority queue, where nodes with best score are taken off the queue first
• While queue not empty and not found do:
• Remove the best node N from queue
• If n is a goal state , then found=true.
• Find all the successor nodes , assign them a score and put them on
the queue
• One important heuristic function is h(n)
• h(n) is the cheapest path from node to the goal node
• Types
• Greedy Best First Search
• A* search
16. Greedy best-first-search
• It tries to get as close as it can to the goal
• It expands the node that appears to be closet
of the goal
• It evaluates the node by using heuristic
function only
• Evaluation function f(n)=h(n)
• (heuristic)=(estimate of cost fron n to goal)
• h(n)=0 for goal node
17. • Complete? No – can get stuck in loops.
• Time? O(bm), but a good heuristic can give
dramatic improvement
• Space? O(bm) - keeps all nodes in memory
• Optimal? No
e.g. AradSibiuRimnicu
VireaPitestiBucharest is shorter!
18. A* search
• Greedy Best search analyses nodes with the
lowest cost of node n to reach goal.And it may
get stuck in search of goal.
• Idea: Avoid expanding paths that are already
expensive
f(n)=g(n) + h(n)
Where f(n)=cost total cost of path through n to goal
h(n)=estimate cost from n to goal
g(n)=cost so far to reach n
19. Hill climbing Search
• Hill climbing search initiates a loop that
continuosly moves in the direction of
increasing value
• Terminates when it reaches a “peak” where no
neighbor has a higher value
• Doesnot maintain a search tree so that
current node data structure needs only record
the state and its objective function value.
20. • Hill climbing doesnot look ahead beyond the
immediate neighbour of the current state.
• Hill climbing is also greedy local search
sometimes because it grabs a good neighbour
state without thinking ahead about where to
go next
• One move is selected and all other nodes are
rejected and are never considered
• Halts if there is no sucessor
• Problem: depending on initial state, can get
stuck in local maxima
21. Algorithm
• Determine successors of current state
• Choose successor of maximum goodness
• If goodness of best successor is less than
current state’s goodness, stop
• Otherwise make best successor the current
state and go to step1
Local maxima: a local maxima is a peak
that is higher than each of neighbour state but
lower than the global maximum
22. Drawback of Hill Climbing Search
• Local Maxima
• Plateaus
• Ridge
• Solution to above given problem
• Backtrack to some earlier node and try going to
different direction(for local maxima)
• Make a big jump in some direction to try to get a new
section of the search space(for plateau)
• Apply two or more rules such as bi-direction search
before doing the test(for ridge)
» Moving in several direction at once