Ai 2
Ai 2
An important aspect of intelligence is goal-based problem solving. The solution of many problems
can be described by finding a sequence of actions that lead to a desirable goal. Each action changes
the state and the aim is to find the sequence of actions and states that lead from the initial (start)
state to a final (goal) state. A well-defined problem can be described by:
Initial state
Operator or successor function - for any state x returns s(x), the set of states reachable from x with
one action
State space - all states reachable from initial by any sequence of actions Path - sequence
through state space
Path cost - function that assigns a cost to a path. Cost of a path is the sum of costs of individual
actions along the path
What is Search?
Search is the systematic examination of states to find path from the start/root state to the goal
state. The set of possible states, together with operators defining their connectivity constitute the
search space. The output of a search algorithm is a solution, that is, a path from the initial state to a
state that satisfies the goal test.
Goal formulation, based on the current situation and the agent’s performance measure, is the first
step in problem solving. The agent’s task is to find out which sequence of actions will get to a goal
state. Problem formulation is the process of deciding what actions and states to consider given a
goal
An Incremental formulation involves operators that augments the state description, starting with
an empty state. For 8-queens problem, this means each action adds a queen to the state.
A complete-state formulation starts with all 8 queens on the board and move them around. In
either case the path cost is of no interest because only the final state counts.
ROUTE-FINDING PROBLEM
Route-finding problem is defined in terms of specified locations and transitions along links between
them. Route-finding algorithms are used in a variety of applications, such as routing in computer
networks, military operations planning, and airline travel planning systems.
1.14 AIRLINE TRAVEL PROBLEM
States: Each is represented by a location (e.g., an airport) and the current time.
Initial state: This is specified by the problem.
Successor function: This returns the states resulting from taking any scheduled flight
(further specified by seat class and location),leaving later than the current time plus the
within-airport transit time, from the current airport to another.
Goal Test: Are we at the destination by some pre specified time?
Path cost: This depends upon the monetary cost, waiting time, flight time, customs and
immigration procedures, seat quality, time of date, type of air plane, frequent-flyer mileage awards,
and so on.
Touring problems are closely related to route-finding problems, but with an important difference.
Consider for example, the problem, “Visit every city at least once” as shown in Romania map. As
with route-finding the actions correspond to trips between adjacent cities. The state space,
however, is quite different.
The goal test would check whether the agent is in Bucharest and all 20 cities have been visited.
Is a touring problem in which each city must be visited exactly once. The aim is to find the shortest
tour. The problem is known to be NP-hard. Enormous efforts have been expended to improve the
capabilities of TSP algorithms. These algorithms are also used in tasks such as planning movements
of automatic circuit-board drills and of stocking machines on shop floors.
VLSI layout
A VLSI layout problem requires positioning millions of components and connections on a chip to
minimize area, minimize circuit delays, minimize stray capacitances, and maximize manufacturing
yield. The layout problem is split into two parts: cell layout and channel routing.
ROBOT navigation
ROBOT navigation is a generalization of the route-finding problem. Rather than a discrete set of
routes, a robot can move in a continuous space with an infinite set of possible actions and states. For
a circular Robot moving on a flat surface, the space is essentially two dimensional. When the robot
has arms and legs or wheels that also must be controlled, the search space becomes multi-
dimensional. Advanced techniques are required to make the search space finite.
In recent years there has been increased demand for software robots that perform Internet
searching, looking for answers to questions, for related information, or for shopping deals. The
searching techniques consider internet as a graph of nodes(pages) connected by links.
Uninformed Search Strategies have no additional information about states beyond that provided in
the problem definition. Strategies that know whether one non goal state is “more promising” than
another are called Informed search or heuristic search strategies.
o Breadth-first search
o Uniform-cost search
o Depth-first search
o Depth-limited search
Breadth-first search
Breadth-first search is a simple strategy in which the root node is expanded first, then all successors
of the root node are expanded next, then their successors, and so on. In general, all the nodes are
expanded at a given depth in the search tree before any nodes at the next level are expanded.
Figure 2.5 Breadth-first search on a simple binary tree. At each stage, the node to b