Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
47 views6 pages

Ai 2

The document discusses state space search as a method for problem-solving in AI, where problems are represented as paths from start states to goal states. It outlines control strategies for effective searching, the challenges of combinatorial explosion in problems like the Traveling Salesman Problem, and introduces production systems as a framework for structuring AI programs. Additionally, it covers heuristic search methods, the IDA* algorithm, and constrained satisfaction problems, emphasizing the importance of analyzing problem characteristics for effective solutions.

Uploaded by

rapuripp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views6 pages

Ai 2

The document discusses state space search as a method for problem-solving in AI, where problems are represented as paths from start states to goal states. It outlines control strategies for effective searching, the challenges of combinatorial explosion in problems like the Traveling Salesman Problem, and introduces production systems as a framework for structuring AI programs. Additionally, it covers heuristic search methods, the IDA* algorithm, and constrained satisfaction problems, emphasizing the importance of analyzing problem characteristics for effective solutions.

Uploaded by

rapuripp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Unit-2

State Space Search for solving problems


State space is another method of problem representation that facilitates easy search similar to PS.

 In this method also problem is viewed as finding a path from start state to goal state.

 A solution path is a path through the graph from a node in a set S to a node in set G.

 Set S contains start states of the problem.

 A set G contains goal states of the problem.

 The aim of search algorithm is to determine a solution path in the graph.

 A state space consists of four components.


 Set of nodes (states) in the graph/tree. Each node represents the state in problem solving
process.

 Set of arcs connecting nodes. Each arc corresponds to operator that is a step in a problem
solving process.
 Set S containing start states of the problem.
 Set G containing goal states of the problem.

Searching for a Solution


 Problem can be solved by searching for a solution.

 Transform initial state of a problem into some final goal state.

 Problem can have more than one intermediate state between start and goal states.

 All possible states of the problem taken together are said to form a state space or problem state
and search is called state space search.
 Search is basically a procedure to discover a path through a problem space from initial state to
a goal state.

 There are two directions in which such a search could proceed.


 Data driven search, forward, from the start state. Goal driven search, backward, from the goal
state

2.2 Control Strategies


 Control Strategy decides which rule to apply next during the process of searching for a solution
to a problem.

 Requirements for a good Control Strategy


 It should cause motion

In water jug problem, if we apply a simple control strategy of starting each time from the top of
rule list and choose the first applicable one, then we will never move towards solution.

It should explore the solution space in a systematic manner


If we choose another control strategy, say, choose a rule randomly from the applicable rules then
definitely it causes motion and eventually will lead to a solution. But one may arrive to same state
several times. This is because control strategy is not systematic.

Exhaustive search algorithms are two types they are BFS and DFS
Traveling Salesman Problem
Consider 5 cities.
 A salesman is supposed to visit each of 5 cities.

 All cities are pair wise connected by roads.

 There is one start city.

 The problem is to find the shortest route for the salesman who has to visit each city only once
and returns to back to start city.

 A simple motion causing and systematic control structure could, in principle solve this
problem.

 Explore the search tree of all possible paths and return the shortest path.

 This will require 4! Paths to be examined.


A simple motion causing and systematic control structure could, in principle solve this problem.

 Explore the search tree of all possible paths and return the shortest path.
 This will require 4! Paths to be examined.

If number of cities grow, say 25 cities, then the time required to wait a salesman to get the information
about the shortest path is of 0(24!) which is not a practical situation.

This phenomenon is called combinatorial explosion.

We can improve the above strategy as follows:


Begin generating complete paths, keeping track of the shortest path found so far.

Give up exploring any path as soon as its partial length becomes greater than the shortest path found
so far.

This algorithm is efficient than the first one, still requires exponential time  some number raised to N
(number of cities).

2.1.Problem Solving
AI programs have a clean separation of computational components of data, operations & control.
Search forms the core of many intelligent processes.

It is useful to structure AI programs in a way that facilitates describing the search process.

Production System – PS
PS is a formation for structuring AI programs which facilitates describing search process.

 It consists of Initial or start state of the problem Final or goal state of the problem
 It consists of one or more databases containing information appropriate for the particular task.
 The information in databases may be structured using knowledge representation schemes.

Production Rules
 PS contains set of production rules, each consisting of a left side that determines the
applicability of the rule and

 a right side that describes the action to be performed if the rule is applied.

 These rules operate on the databases.

 Application of rules changes the database.


 A control strategy that specifies the order in which the rules will be applied when several rules
match at once.

One of the examples of Production Systems is an Expert System.

Advantages of PS
In addition to its usefulness as a way to describe search, the production model has other advantages as
formalism in AI.
It is a good way to model the strong state driven nature of intelligent action.

As new inputs enter the database, the behavior of the system changes.

New rules can easily be added to account for new situations without disturbing the rest of the system,
which is quite important in real-time environment.

Problem Solving – Basic Search methods

Characteristics of Problem
Artificial intelligence (AI) is mainly related to the search process, it is important to have some
methodology to choose the best possible solution.

To choose an appropriate method for a particular problem first we need to categorize the problem
based on the following characteristics.

1. Is the problem decomposable into small sub-problems which are easy to solve?
2. Can solution steps be ignored or undone?
3. Is the universe of the problem is predictable?
4. Is a good solution to the problem is absolute or relative?
5. Is the solution to the problem a state or a path?
6. What is the role of knowledge in solving a problem using artificial intelligence?
7. Does the task of solving a problem require human interaction?
Heuristic search is a very general method applicable to a large class of problem.

 In order to choose the most appropriate method (or combination of methods) for a particular
problem it is necessary to analyze the problem along several key dimensions.
 Is the problem decomposable into a set of independent smaller sub problems?
 Decomposable problems can be solved by the divide-and-conquer technique.
 Use of decomposing problems:

Each sub-problem is simpler to solve.

Each sub-problem can be handed over to a different processor. Thus can be solved in parallel
processing environment. There are non decomposable problems.

Iterative Deepening A* & Constraint Satisfaction Problems


IDA* Algorithm
 At each iteration, perform a DFS cutting off a branch when its total cost (g+h) exceeds a given
threshold.

 This threshold starts at the estimate of the cost of the initial state, and increases for each
iteration of the algorithm.

 At each iteration, the threshold used for the next iteration is the minimum cost of all values
exceeded the current threshold.
Given an admissible monotone cost function, IDA* will find a solution of least cost or optimal
solution if one exists.

 IDA* not only finds cheapest path to a solution but uses far less space than A* and it expands
approximately the same number of nodes as A* in a tree search.

 An additional benefit of IDA* over A* is that it is simpler to implement, as there are no open
and closed lists to be maintained.

 A simple recursion performs DFS inside an outer loop to handle iterations.

2.6. Constrained Satisfaction:


Many AI problems can be viewed as problems of constrained satisfaction in which the goal is to solve
some problem state that satisfies a given set of constraints.

Example of such a problem is Crypt-Arithmetic puzzles. Many design tasks can also be viewed as
constrained satisfaction problems.
 N-Queen: Given the condition that no two queens on the same row/column/diagonal attack
each other.

 Map colouring: Given a map, colour three regions in blue, red and black, such that no two
neighboring regions have the same colour. Such problems do not require a new search method.
 They can be solved using any of the search strategies which can be augmented with the list of
constraints that change as parts of the problem are solved.

Algorithm:
Until a complete solution is found or all paths have lead to dead ends
{
Select an unexpanded node of the search graph. }

Apply the constraint inference rules to the selected node to generate all possible new constraints.

You might also like