Hot-Link Menu in Right-Side Column

Wal*Mart Online → Best Availability USA, LLC

Searching 4 Solutions

Once a problem has been properly formulated, as outlined in the preceding 3 sections, it is now possible to solve the problem. The solution to the problem is an action sequence. Therefore, search algorithms work by considering the various possible action sequences. The first possible action sequence begins at the intial state of a search tree, with the intial state being called the root. The branches in the tree are actions, while the nodes correspond to the states, which are defined as the state space of the problem. And the state space are all of the possible decisions that can be made during the process of solving the problem. Figure Agent-6 shows the first few steps in growing the search tree for finding a route from Arad to Bucharest:

Arad-Bucharest Partial

Figure Agent-6: Partial search trees for finding a route from Arad to Bucharest. Nodes that have been expanded are shaded; Nodes that have been generated but not yet expanded are outlined in bold; nodes that have not yet been generated are shown in faint dashed lines.

If you are searching for a way to get the most out of the money in your wallet, shop Wal Mart online by clicking the link at the top of the page and have your merchandise sent straight to your home, saving your valuable time as well.

In the example we will be using in this guide, the root node of the tree which corresponds to the initial state will be referred to as In(Arad). The first step is to test whether this is a goal state. (In this case it is not, however, it should always be the first step in the algorithm, so that we don't take any unnecessary steps, if we are already at the goal). The second step is to consider the various actions that are available to us. This is done by expanding the current state (or node). Expanding the node, means creating all possible actions from our current position, and generating all the legal possible destinations for the next step. Once the root node is expanded, it becomes the parent node. The parent node: In(Arad) leads to three new child nodes: In(Sibiu), In(Timisoara), and In(Zerind). The next step is to choose which of these 3 possibilities are to be expanded in the search of our goal.

This is the essence of the search: Follow up on one option now, and put the others aside for later. assuming the first choice has not already led to a solution. Suppose we choose Sibiu first. First, check to see if it is the goal state: Is Sibiu == Bucharest? Looks like it isn't, I guess we have to expand it, giving us: In(Arad), In(Fagaras), In(Oradea), and In(Rimnicu Vilcea). We now have six possibilities: The four from expanding Sibiu and the 2 left over from the original expansion of Arad. These six nodes are referred to as leaf nodes, that is, they don't have any children yet. The set of all leaf nodes available for expansion at any given point is called the frontier. In Figure Agent-6, above, the frontier of the tree consists of the nodes with bold outlines.

The process of choosing and expanding nodes in the frontier continues until either a solution is found or there are no more states to be expanded. The general Tree - Search algorithm is shown in Figure Agent-7. Search algorithms all share this basic structure. The differences are primarily how they choose which state to expand next, also known as the Search Strategy.

If your strategy is to utilize developed technology to arrive at your goals in the most expeditious manner then we recommend looking at all the Top Quality GPS Search and Navigation Equipment, from manufacturers such as Garmin and Tom-Tom available at:

Centurion Online → Electronics → GPS Devices

at the Centurion Online link above or the several specialized links on the left.

Function Tree-Search(problem) returns a solution, or failure
  Initialize the frontier using the initial state of the problem
  loop do
    If the frontier is empty then return failure
    choose a leaf node and remove it from the frontier
    If the node contains a goal state then return the corresponding solution
    Expand the chosen node, adding the resuting nodes to the frontier.

Function Graph-Search(problem) returns a solution or a failure
  intialize the frontier using the initial state of problem
  initialize the explored set to be empty
  loop do
    If the frontier is empty then return failure
    choose a leaf node and remove it from the frontier
    If the node contains a goal state then return the corresponding solution
    add the node to the explored set
    expand the chosen node, adding the resulting nodes to the frontier
      only if not in the frontier or explored set
Figure Agent-7: An informal description of the general tree-search and graph-search algorithms. The parts of Graph-Search marked in bold italic are the additions needed to handle repeated states.

Looking back at Figure Agent-6, we can see quite a dilemma in that it is possible to return to Arad, thus potentially making this a very long journey, indeed. The official term for this is that In(Arad) is a repeated state in the search tree, generated by a loopy path, or unofficially: our case of Budweiser is going to run out long before our trip is over. Considering such loopy paths means that the complete search tree for Romania is infinite, because you can get stuck running around in circles, if you're not careful. On the other hand, the state space as they call it, or you might just say then number of towns on the map, has only 20 states. So, since this initial algorithm allows us to repeat our path, we obviously need to make some minor modifications. Fortunately, since we are only trying to cut down our trip distance, we don't need to ever consider returning to a place we have already visited.

One place you should consider returning to, however, is Centurion Online for low prices, great technical support and the satisfaction of helping to support free information flow on the internet. Check out the wide selection of Video Games for most Computer and Game platforms at:

Centurion Online → Games → Xbox Gaming Products

at the Centurion Online link above or the several specialized links on the left.

Loopy paths are a special case of the more general concept of redundant paths, which exist whenever there is more than one way to get from one state to another. Consider the paths Arad-Sibiu, about 140 km, and Arad-Zerind-Oradea-Sibiu, about 297 km.

Romania 1

Figure Agent-8: Two possible paths - One good - One not so good.

Excellent Tech Support - Centurion Approved

Officially we would say that the second path is redundant, unofficially, we might say: We better have our navigator cut back on the Bud a little bit. If you are concerned about reaching the goal, there's never any reason to keep around more than one path to any given state, because any goal state that is reachable by extending the other.

In some cases, it is possible to define the problem itself so as to eliminate redundant paths. For example, if we formulate the 8-Queens problem so that a Queen can be placed in any column, then each state with n queens can be reached by n! different paths; but if we reformulate the problem so that each new queen is placed in the leftmost empty column, then each state can be reached only through one path.

In order to continue with this guide, and continue the discussion on Frontier Node Expansion: Press the Button below:

Last Updated 7-27-2010


Artificial Intelligence

Big O Notation

NP Completeness

Intelligent Agents

Problem Definition

Formulating Problems

Toy Problems

Vacuum World


8 Queens

The Knuth Sequence

Real World Problems

Route Finding Problems

Touring Problems

Traveling Salesperson Problem

VLSI Layout

Robot Navigation

Automatic Assembly Sequencing

Searching For Solutions

Frontier Node Expansion

Search Algorithm Infrastructure

Child Node Creation

Measuring Algorithm Performance

Uninformed Search Strategies

Breadth-First Search

Breadth-First Characteristics

C++ Breadth-First Search Code

Breadth-First Data Structure

Breadth-First Main Program

Breadth-First Make Map

Breadth-First Make Neighbor

Breadth-First Point of Origin

Breadth-First Print Cities

Breadth-First Initial Listing

Breadth-First Path Record

Breadth-First Get Child City

C++ Breadth-First Search Code

Breadth-First Print Goal Path

Uniform-Cost Search

Depth-First Search

Depth-First C++ Solution

Depth-First Data Structure

Depth-First MakeMap()

Depth-First Display Data

Depth-First Initial Listing

Depth-First GetChildCity()

Depth-First Path Record

Depth-First Search Function

Depth-First PrintGoalPath()

Depth-First Main()

Depth-Limited Search

Iterative Depth Search

Bidirectional Search

Comparing Strategies

Informed Search Strategies

Greedy Best-First

A* Search

Conditions For Optimality

Optimality of A*

C++ A* Search Code

A* Search Data Structure

A* Search Data Entry

A* Search GetChildCity()

C++ Min Priority Queue

C++ A* Search Code Function

C++ A* Headers & Prototypes

C++ A* Search Main()

Normalized Information Distance