Sie sind auf Seite 1von 13

SOFT COMPUTING

1.

A. B.

Define : - Artificial Intelligence. Mention the characteristics intelligent problem. of an artificial

2.

A. How to represent a problem in State Space Search? Explain with an example B. Discuss on Depth First Search and Breadth First search.

3.

A. How knowledge Prepositional Logic? B.

can

be

represented

through

Explain the importance of Scripts and Frames. Define RESOLUTION. an Example discuss on UNIFICATION

4.

A.

B. With algorithm. 5. A. B. 6.

Define Fuzzy Sets. Discuss on Fuzzy Reasoning.

A. How Membership functions can be included in Fuzzy Set? B. Discuss on Fuzzy relations. How learning can be done with simple neurons? Explain the concept of Back Propagation Network. Discuss the following in Genetic Algorithms: i. j. Rank Method. Rank Space Method.

7.

A. B.

8.

SOFT COMPUTING

Page 1

Artificial Intelligence (AI) Artificial intelligence, commonly abbreviated as AI, also known as machine intelligence, is the practice of developing algorithms that make machines (usually computers) able to make seemingly intelligent decisions, or act as if possessing intelligence of a human scale. The branch of computer science concerned with making computers behave like humans. The term was coined in 1956 by John McCarthy at the Massachusetts Institute of Technology. Artificial intelligence includes
o o

o o

games playing: programming computers to play games such as chess and checkers expert systems : programming computers to make decisions in real-life situations (for example, some expert systems help doctors diagnose diseases based on symptoms) natural language : programming computers to understand natural human languages neural networks : Systems that simulate intelligence by attempting to reproduce the types of physical connections that occur in animal brains robotics : programming computers to see and hear and react to other sensory stimuli

Problem Characteristics:

The term heuristic is used for algorithms which find solutions among all possible ones, but they do not guarantee that the best will be found, therefore they may be considered as approximately and not accurate algorithms. These algorithms, usually find a solution close to the best one and they find it fast and easily. Sometimes these algorithms can be accurate, that is they actually find the best solution, but the algorithm is still called heuristic until this best solution is proven to be the best. The method used from a heuristic algorithm is one of the known methods, such as greediness, but in order to be easy and fast the algorithm ignores or even suppresses some of the problem's demands.

SOFT COMPUTING

Page 2

Is the problem decomposable into a set of nearly independent smaller or easier sub problems? Can solutions steps be ignored or at least undone if they prove unwise? Is the problems universe predictable? Is a good solution to the problem obvious without comparison to all other possible solutions? Is the desired solution a state of the world or a path to a state? Is a large amount of knowledge absolutely required to solve the problem, or its knowledge important only to constrain the search? Can a computer that is simply given the problem return the solution, or will the solution of the problem require interaction between the computer and a person?

Is the problem decomposable?

Consider the below problem tree where the computer is trying to find out a solution to the given problem x2+3x+sin2xcos2xdx.

x2+3x+sin2xcos2xdx

x2dx sin xcos xdx


2 2

3xdx

SOFT COMPUTING

Page 3

x3/3 cos2x)cos2xdx

3xdx

(1-

3x2/2

cos2xdx

-cos4xdx

From the above problem tree, a set of problem equation has been decomposed into smaller further decomposable segments. To arrive at this, system checks whether it can be further decomposable or not at each and every state by a simple recursive integration program. If the steps leads to an answer, then the answer is directly returned otherwise it will search will go on. Using this technique of problem decomposition, we can often solve very large problems easily. Let us consider one more example. We have got three [3] set of cubes namely {A}, {B} & {C}. These were to be arranged in such a manner, the Set {A} should be placed top followed by set {B} and then by set {C}. Given set is like this, Set {B} is outside and set {A} is at the bottom, and set {C} is at top. The aim to realign the same as A,B & C from top to bottom.

Start

Goal

SOFT COMPUTING

Page 4

ON (C, A)

ON (B, C) & ON (A, B)

Steps involved in this problem: 1. 2. 3.


4.

CLEAR [x] [block x has nothing on it] On(x, Table) [Pick up x and put it on the table] CLEAR (x) and CLEAR (y) ON(x, y) [put x on y] ON (B, C) and ON (A, B) ON (B, C) and ON(A, B) ON (B, C) and CLEAR (A) and ON (A, B) ON (B, C) and CLEAR (A) and ON (A, B). Now GOAL SET (A, B & C) is achieved.

5.
6. 7.

8. 9.

Figuratively it is achieved as below:


On (b, c) and on (a, b) On (b, c)

on (a, b)

On (b, c)

clear (a)

on (a, b)

clear (a)

on (a, b)

By this way we can also try to solve puzzle game where it consists of 9 cubes placed by 3 x 3 matrix. Out of this, one cube will be empty or space. The remaining 8 cubes of the matrix will have numbers. The aim of the game is to realign the numbers from the present position [What we call it as Start position] to the new position [what we call it as Goal position]. Here one has to move the adjacent number to the

SOFT COMPUTING

Page 5

empty cube. Through this means one has to move the numbers in such a way that they reach the goal conveniently. Is the universe predictable? It is the planning that is going to pave way for solutions. Whether such planning has to be done well in advance or to be done at that time of activity or there is no such possibility of such planning? It is to be explored and cant be unique to all problem solving games. Considering the 8 cube puzzle and bridge card game, where unknown things are available as commonality. But in the 8 cube puzzle game before making a move, it is possible to compute the permutation and combination of the available moves to choose the one. Even if we make a wrong move, then it is possible to undo such moves to start from the same position. Whereas, it is not so in the game bridge, where once committed is once for all committed. Though planning is a must, it needs proper place to be implemented. In the first 8 cube puzzle game, even if planning fails there is recoverable process. But in the bridge card game, if planning is failed, it is out once for all. Improper planning and executing the same is very expensive and risky. It may succeed or may not succeed. The problem characteristics of this is ignorable versus recoverable versus irrecoverable and certain outcome versus uncertain outcome. Is a Good Solution Absolute or Relative? Considering the following database that reveals simple facts: 1. 2. 3. 4. 5. 6. 7. Marcus was man. Marcus was a Pompeian. Marcus was born in 40 A. D. All men are mortal. All Pompeian died when the volcano erupted in 79 A. D. No mortal lives longer than 150 years. It is now 2007 A. D.

Now, if anybody ask one question, whether Marcus is alive or Dead? We have to go through the above statement and find out the answer.

SOFT COMPUTING

Page 6

Let us see the methodology of finding out the answer through predicate logic, and using formal inference methods. Decisions 8. 9. 10. 11. 12. 13. 14. 15. Marcus was a man. All men are mortal. Marcus is mortal. Marcus was born in 40 A. D. It is now 2007 A. D. Marcus age is 1967 years Justifications. Axiom 1. Axiom 4. 1, 4. Axiom 3. Axiom 7. Axiom 3 & 7.

No mortal lives longer than 150 yrs. Axiom 6. All Pompeian died when the Volcano erupted in 79 A. D. Axiom 5. 10, 13 & 14.

16.

So, Marcus is dead.

Is the solution A State or Path? It is always best to choose the example of traveling salesmen, who has to travel from one city to another and a must that he is not supposed to return to the same city again and finally he has to reach back to his starting position. For this the law of finding the solution is n-1!, where n is total number of cities, he has to travel and assuming that he has to travel from a particular city and that is reduced. Say for example, he has to travel 6 cities then the answer path will be 5! [5x4x3x2x1 = 120] solutions are there to identify the best possible shortest route. So it will be always very difficult to identify the best possible shortest route for this salesmen route. Though, one may come to a conclusion that it is possible to asses certain totally ignoring others for want of time and other activities and to proceed based on the assumption that the decision taken already is correct. Someone at some time may come up with best possible shortest route. Until then, one will go by the same path. What is the role of knowledge? Chess and General opinion poll. For chess it is limited option and good logic. For general opinion poll, it is lot of reasons. Every

SOFT COMPUTING

Page 7

time we have to break our head to identify the reason for our success or failures. Does the task require Human Interaction or not? Answer to this is always difficult as many times, the reason assigned by the computer to identify the answer is not known properly or at times not acceptable to the human. Someone may thing that it is necessary for human interaction. We may take the same in the best manner that if the system [computer] needs, we can say human is assisting computer and if the human requires assistance, it is then assisting human to make understand the computer. The AI Problem: 1. Perception. Understanding. Speech. Natural Language. Understanding. Generation. Translation. Common sense reasoning Robot Control 2. Games. Chess. Backgammon. Checkers. Go. Formal Tasks: Mundane tasks:

SOFT COMPUTING

Page 8

Mathematics. Geometry. Logic. Integral Calculus. Proving properties of Programs. 3. Expert Tasks:

Engineering. Design. Fault Finding. Manufacturing Planning. Scientific Analysis. Financial Analysis. Medical Analysis.

Problems, Problem Spaces ad Search. 1. 2. 3. 4. Define the problem precisely. Analyze the problem. Isolate and represent the task knowledge that is necessary to solve the problem. Choose the best problem solving technique(s) and apply it to the particular problem.

SOFT COMPUTING

Page 9

Defining the problem as a state space search A water jug problem: Aim to fill 2 gallon water in the 4 gallon water jug using 3 gallon water jug, where both 4 and 3 gallon jug does not have any marking on it. May be on look the answer will be very simple. For gods sake, the problem does not mention about the quantity of water to be used to fill 2 gallon of water in 4 gallon jug. So it is the users choice that by spending n number of gallons of water, he can fill 2 gallons of water. The steps involved in identifying the same. 1. There are two jugs without any measurement in it but identifying itself as 4 gallons and 3 gallons depending on its size [Large 4 gallons and smaller 3 gallons]. Assuming both the jugs is empty. Let us name the bigger jug as x for 4 gallons and smaller jug as y for 3 gallons. Fill 4 gallon jug with water. Fill 3 gallon jug with water. Pour all water from 4 gallon jug. Now, transfer all water from 3 gallon jug to 4 gallon jug. Now, 4 gallon jug has 3 gallons of water and 3 gallon jug is empty. Fill 3 gallon jug full. Now, 3 gallon jug has 3 gallon water and 4 gallon jug as 3 gallon water. Pour water from 3 gallon jug carefully to 4 gallon jug till it reaches full [Care has to be taken no to drop any water down to earth either from 4 gallon jug or 3 gallon jug].

2.

3. 4. 5. 6. 7. 8. 9. 10.

SOFT COMPUTING

Page 10

11.

Now 4 gallon jug has 4 gallon water and 3 gallon jug after filling the balance 4 gallon jug, now has 2 gallon water. Pour all water from 4 gallon jug. Now, 4 gallon jug is empty and 3 gallon jug has 2 gallon water. Now, transfer the 2 gallon water from 3 gallon jug to 4 gallon jug so that 4 gallon jug has 2 gallon of water.

12. 13.
14.

The same is represented as table here: Gallons in the 4 Gallon Jug [x] Bigger 0 4 4 0 3 Gallons in the 3 Gallon Jug [y] Smaller 0 0 3 3 0 Rules applied. Both the jugs are empty. Fill jug [x] 4 gallons with water. Fill jug [y] 3 gallons with water. Empty the 4 gallon jug[x]. Pour all the water from 3 gallon jug[y] to 4 gallon jug[x]. Fill 3 gallon jug[y] with fresh water. Pour water from 3 gallon jug[y] to 4 gallon jug[x] till it is full. Empty the 4 gallon jug[x] Pour all the water from 3 gallon jug[y] to 4 gallon jug[x] - RESULT

4 0 2

2 2 0

SOFT COMPUTING

Page 11

Breadth First Search - How it works


BFS is an uninformed search method that aims to expand and examine all nodes of a graph systematically in search of a solution. In other words, it exhaustively searches the entire graph without considering the goal until it finds it. It does not use a heuristic. From the standpoint of the algorithm, all child nodes obtained by expanding a node are added to a FIFO queue. In typical implementations, nodes that have not yet been examined for their neighbors are placed in some container (such as a queue or linked list) called "open" and then once examined are placed in the container "closed".

The breadth-first tree one gets when running BFS on the given map and An example map of Germany with some connections between cities. starting in Frankfurt.

Animated example of a breadthfirst search

Uninformed search
An uninformed search algorithm is one that does not take into account the specific nature of the problem. As such, they can be implemented in general, and then the same implementation can be used in a wide range of problems thanks to abstraction. The drawback is that most search spaces are extremely large, and an uninformed search (especially of a tree) will take a reasonable amount of time only for small examples. As such, to speed up the process, sometimes only an informed search will do.

SOFT COMPUTING

Page 12

Algorithm (informal) 1. 2.

Put the ending node (the root node) in the queue. Pull a node from the beginning of the queue and examine it. If the searched element is found in this node, quit the search and return a result. Otherwise push all the (so-far-unexamined) successors (the direct child nodes) of this If the queue is empty, every node on the graph has been examined -- quit the search and Repeat from Step 2.

node into the end of the queue, if there are any. 3. 4. return "not found".

C++ implementation This is the implementation of the above informal algorithm, where the "so-far-unexamined" is handled by the parent array. Suppose we have a struct: struct Vertex { ... std::vector<int> out; ... }; and an array of vertices: (the algorithm will use the indexes of this array, to handle the vertices) std::vector<Vertex> graph(vertices); the algorithm starts from start and returns true if there is a directed path from start to end: bool BFS(const std::vector<Vertex>& graph, int start, int end) { std::queue<int> next; std::vector<int> parent(graph.size(), 0); // 0 means filled with zeros. parent[start] = -1; next.push(start); while (!next.empty()) { int u = next.front(); next.pop(); // Here is the point where you can examine the u th vertex of graph For example: if (u == end) return true; for (std::vector<int>::const_iterator j = graph[u].out.begin(); j != graph[u].out.end(); ++j) { // Look through neighbors. int v = *j; if (parent[v] == 0) { // If v is unvisited. parent[v] = u; next.push(v); } } } return false; }

SOFT COMPUTING

Page 13

Das könnte Ihnen auch gefallen