M2 Session 1
M2 Session 1
Course Coordinator:
Dr. Neethi M V
Assistant Professor
Dept. of CSE-DS
ATMECE, Mysuru
Session 1
• This chapter describes one kind of goal-based agent called a problem-
solving agent.
• Goal-based agents that use more advanced factored or structured
resentations are usually called planning agents
• The first example we examine is the vacuum world. (See Figure 3) This can be formulated as a problem as
follows:
• States: The state is determined by both the agent location and the dirt locations. The agent is in one of two
locations, each of which might or might not contain dirt. Thus, there are 2 × = 8 possible world states. A
larger environment with n locations has n * 2n states.
• Initial state: Any state can be designated as the initial state.
• Actions: In this simple environment, each state has just three actions: Left, Right, and Suck. Larger
environments might also include Up and Down.
• Transition model: The actions have their expected effects, except that moving Left in the leftmost square,
moving Right in the rightmost square, and Sucking in a clean square have no effect. The complete state space
is shown in Figure 3.
• Goal test: This checks whether all the squares are clean.
• Path cost: Each step costs 1, so the path cost is the number of steps in the path.
•The 8-puzzle, an instance of which is shown in Figure 4, consists of a 3×3 board with eight numbered
tiles and a blank space. A tile adjacent to the blank space can slide into the space. The object is to reach a
specified goal state, such as the one shown on the right of the figure. The standard formulation is as
follows:
• States: A state description specifies the location of each of the eight tiles and the blank in one of the
nine squares.
• Initial state: Any state can be designated as the initial state. Note that any given goal can be reached
from exactly half of the possible initial states.
• Actions: The simplest formulation defines the actions as movements of the blank space Left, Right, Up,
or Down.
• Transition model: Given a state and action, this returns the resulting state; for example, if we apply
Left to the start state, the resulting state has the 5 and the blank switched.
• Goal test: This checks whether the state matches the goal state.
• Path cost: Each step costs 1, so the path cost is the number of steps in the path.
• (4!)! = 5 .
PROBLEM SOLVING EXAMPLE PROBLEMS
• Toy Problem
The problem definition is very simple:
• States: Positive numbers.
• Initial state: 4.
• Actions: Apply factorial, square root, or floor operation (factorial for integers only).
• Transition model: As given by the mathematical definitions of the operations.
• Goal test: State is the desired positive integer.
• To our knowledge there is no bound on how large a number might be constructed in the
process of reaching a given target—for example, the number
620,448,401,733,239,439,360,000
• is generated in the expression for 5—so the state space for this problem is infinite. Such state
spaces arise frequently in tasks involving the generation of mathematical expressions,
circuits, proofs, programs, and other recursively defined objects.
PROBLEM SOLVING EXAMPLE PROBLEMS Real-world Problems
• 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. Some, such as Web sites and in-car systems that provide driving
directions, are relatively straightforward extensions of the Romania example.
• Touring problems are closely related to route-finding problems, but with an important difference. As with route finding,
the actions correspond to trips between adjacent cities. The state space, however, is quite different. Each state must
include not just the current location but also the set of cities the agent has visited.
• The traveling salesperson problem (TSP) 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, but an enormous amount of effort has been expended to
improve the capabilities of TSP algorithms.
• 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 comes after
the logical design phase and is usually split into two parts: cell layout and channel routing. In cell layout, the primitive
components of the circuit are grouped into cells, each of which performs some recognized function. Channel routing finds
a specific route for each wire through the gaps between the cells. These search problems are extremely complex, but
definitely worth solving.
• Robot navigation is a generalization of the route-finding problem described earlier. Rather than following a discrete set
of routes, a robot can move in a continuous space with an infinite set of possible actions and states. When the robot has
arms and legs or wheels that must also be controlled, the search space becomes many-dimensional. Advanced techniques
are required just to make the search space finite.
Department of Computer Science and Engineering - DS
SEARCHING FOR SOLUTIONS