Professional Documents
Culture Documents
Unit 2: 1 A Jeyanthi Asp/Cse Mnmjec
Unit 2: 1 A Jeyanthi Asp/Cse Mnmjec
UNINFORMED Search
Only pbm defn is given.
Search tech uses the info in pbm defn and generates new set of states
from the initial state and differentiates goal state from non goal state.
• Time complexity
• Consider search tree where every node has b successors.
• The root node generates ‘b’ nodes at the first level
• each of which generates b more nodes, for a total of b^2 at the second level.
• Each of these generates b more nodes, yielding b^3 nodes at the third level, and so
on.
• Now suppose that the solution is the last node at depth d.
• Then the total number of nodes generated is
• = 1 +b + b^2 + . . . . . . . + b^d
• = O(b^d)
• The space complexity
• For breadth-first graph search in particular, every node generated remains in
• memory. There will be O(b^d−1) nodes in the explored set and O(b^d) nodes in the
frontier,
• So Space complexity O(b^d)
• SMA∗— is simpler
• SMA∗ proceeds just like A∗, expanding the best leaf until memory is full.
• At this point, it cannot add a new node to the search tree without dropping an old
one.
• SMA∗ always drops the worst leaf node—the one with the highest f-value.
• Like RBFS, SMA∗ then backs up the value of the forgotten node to its parent. In this
way, the ancestor of a forgotten subtree knows the quality of the best path in that
subtree.
• With this information, SMA∗ regenerates the subtree only when all other paths have
been shown to look worse than the path it has forgotten.
• Another way of saying this is that, if all the descendants of a node n are forgotten,
then we will not know which way to go from n, but we will still have an idea of how
worthwhile it is to go anywhere from n.
• Example: In shortest path problem, the goal state and the path followed is also important
• but for some problems only the goal state is important; and path to reach the goal state is irrelevant
• Ex:In 8 Queen’s problem; only the final board configuration(8 Queens in non attacking manner ) is important
• And the order in which the Queens are added to the board is not important
• In such pbms; Local Search Algorithm can be used
• Utility function
• Win = 1 Draw =0 Loss = -1
• Utility value of terminal state indicates the utility value from the point of view of
MAX
• Even a simple game like tic-tac-toe is too complex for us to draw the
entire game tree.So we will switch to the trivial game in Figure 5.2.
• Alpha - Beta pruning : The Alpha and Beta values are applied to a minimax
tree
• Alpha - Beta pruning returns the same move as minimax, but prunes away
branches that cannot
possibly influence the final decision
Consider again the two-ply game tree from
• Finite domains
• The simplest kind of CSP involves variables that are discrete and have finite domains.
• Map coloring problems are of this kind. The 8-queens problem can also be viewed as finite-
domain CSP, where the variables Q1,Q2,…..Q8 are the positions each queen in columns 1,….8
and each variable has the domain {1,2,3,4,5,6,7,8}.
• If the maximum domain size of any variable in a CSP is d, then the number of possible
complete assignments is O(dn) – that is, exponential in the number of variables.
• Finite domain CSPs include Boolean CSPs, whose variables can be either true or false.
• Infinite domains
• Discrete variables can also have infinite domains – for example, the set of integers or the
set of strings. With infinite domains, it is no longer possible to describe constraints by
enumerating all allowed combination of values. For example, if Jobl, which takes five
days, must precede Jobs, then we would need a constraint language of algebraic
inequalities such as
A Jeyanthi ASP/CSE MNMJEC 113
• Startjob1 + 5 <= Startjob3.
Continuous variable
• CSPs with continuous domains are very common in
real world. For example, in operation research field, the
scheduling of experiments on the Hubble Telescope
requires very precise timing of observations; the start
and finish of each observation and maneuver are
continuous-valued variables that must obey a variety of
astronomical, precedence and power constraints.
• The best known category of continuous-domain CSPs
is that of linear programming problems, where the
constraints must be linear inequalities forming a
convex region. Linear programming problems can be
solved in time polynomial in the number of variables.
• After assigning WA=R,NT=G ;there is only one possible value for SA ; where Q has
2 possible vale and the remaining variables have 3 possible values
• The idea is choose SA rather than Q(ie choose the variable with the fewest legal
values)
• This heuristic picks a variable with less legal values ;which will cause failure as
soon as possible, avoiding pointless search through other variables which always
fail
• allowing the tree to be pruned.
• 1.Assign WA=R