Download Artificial Intelligence topic wise and more Lecture notes Artificial Intelligence in PDF only on Docsity!
Introduction to Computational
Intelligence
-Presented By:
Shawni Dutta,
Department of Computer Science,
The BES College
This Photo by Unknown author is licensed under CC BY.
Problem
Spaces and
Search
Building a system to solve a problem requires the
following steps
- Define the problem precisely including detailed
specifications and what constitutes an acceptable
solution;
- Analyse the problem thoroughly for some features
may have a dominant effect on the chosen method of
solution;
- Isolate and represent the background knowledge
needed in the solution of the problem;
- Choose the best problem solving techniques in the
solution
Formal description of a problem
- Define a state space that contains all possible configurations of the
relevant objects, without enumerating all the states in it. A state space
represents a problem in terms of states and operators that change states.
- Define some of these states as possible initial states.
- Specify one or more as acceptable solutions, these are goal states.
- Specify a set of rules as the possible actions allowed. This involves thinking
about the generality of the rules, the assumptions made in the informal
presentation and how much work can be anticipated by inclusion in the
rules.
STATE SPACE SEARCH: Example
- To build a program that could play chess we would first have to specify the starting position of the board the rules that define the legal moves and the board position that represent a win for one side or the other.
- The starting position can be described as an 8x8 array that each position contains a symbol standing for the appropriate piece of the official chess opening position.
- We can define as our goal any board position in which the opponent doesn't have a legal move and the King is under attack.
Difficulties
faced while
writing rules:
- If we write rules like the one in the last slide, we have to write a very large number of them since there has to be a separate rule for each of the roughly 10 120 possible board positions. Using so many rules possess two serious practical difficulties: - No person could ever supply a complete set of such rules. It would take too long and could certainly not to be done without mistakes. - No program could easily handle all those rules just so storing that many rules can create severe difficulties.
- In order to minimize such problems, we should look for a way to write the rules describing the legal moves in as general way as possible.
- To do this, it is useful to introduce some convenient notation for describing patterns and substitutions.
- For example, the rules described in Fig. 2.1, as well as many like it could be written as shown in Fig. 2.2.
- In general, the more succinctly we can describe the rules we need, the less work we will have to do to provide them and the more efficient the program that uses them can be.
State Space as a Directed
Graph
- A state space can be treated as a directed graph whose nodes are states and whose arcs are operators transforming one state to another. For example, if state 1 is a state to which any of three operators can be applied, transforming it to state 2, 3, or 4, then the corresponding graph would be as In Figure 3. Nodes 2, 3, and 4 are called the successors of node 1.
State Space as a Directed Graph
- In graph notation, a solution to
a state-space problem is a path
from an initial node to a goal
node. In Figure 4, one solution
would be an application of
operator B twice, followed by
operator D, to reach the
indicated goal node or final
state. There may be other final
states and multiple ways to
reach a particular final state.
PRODUCTION SYSTEMS
- Since search forms the core of many intelligent processes, it is useful to structure AI programs in a way that facilitates describing and performing the search process.
- A production system consists of-
- A set of rules each consisting of a left side (a pattern) A→B, that determines the applicability of the rule and a right side that describes the operation to be performed if the rule is applied.
- One or more knowledge/databases that contain whatever information is appropriate for the particular task. Some parts of the database may be permanent, while other parts of it may pertain only to the solution of the current problem.
- A control strategy that specifies the order in which the rules will be compared to the database and a way of resolving the conflicts that arise when several rules match at once.
- A rule applier.
Features of
Production System
- Modifiability: This means the facility of modifying rules. It allows the development of production rules in a skeletal form first and then it is accurate to suit a specific application. - Knowledge intensive: The knowledge base of production system stores pure knowledge. This part does not contain any type of control or programming information.
Control
strategies
- The first requirement of a good control strategy is that it causes motion.
- Consider again the water jug problem of the last section.
- Suppose we implemented the simple control strategy of starting each time at the top of the list of the rules and choosing the first applicable one if we did that we would never solve the problem we would continue indefinitely filling the 4 gallon jug with water.
- Control strategies that do not cause motion will never lead to a solution.
Production System Types
- A monotonic production system is a production system in which the application of a rule never prevents the later application of another rule that could also have been applied at the time the first rule was selected.
- A nonmonotonic product system is one in which this is not true.
- A partially commutative production system is a production system with the property that if the application of a particular sequence of rules transforms state x into y, then any permutation of those rules that is allowable also transforms state x into state y.
- A commutative production system is a production system that is both monotonic and partially commutative.