Artificial intelligence
What is Artificial Intelligence?
According to the father of Artificial Intelligence, John McCarthy, it is “The science and engineering of making intelligent machines, especially intelligent computer programs”.
Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a software think intelligently, in the similar manner the intelligent humans think.
AI is accomplished by studying how human brain thinks, and how humans learn, decide, and work while trying to solve a problem, and then using the outcomes of this study as a basis of developing intelligent software and systems.
Philosophy of AI
While exploiting the power of the computer systems, the curiosity of human, lead him to wonder, “Can a machine think and behave like humans do?”
Thus, the development of AI started with the intention of creating similar intelligence in machines that we find and regard high in humans.
Goals of AI
- To Create Expert Systems − The systems which exhibit intelligent behavior, learn, demonstrate, explain, and advice its users.
- To Implement Human Intelligence in Machines − Creating systems that understand, think, learn, and behave like humans.
What Contributes to AI?
Artificial intelligence is a science and technology based on disciplines such as Computer Science, Biology, Psychology, Linguistics, Mathematics, and Engineering. A major thrust of AI is in the development of computer functions associated with human intelligence, such as reasoning, learning, and problem solving.
Out of the following areas, one or multiple areas can contribute to build an intelligent system.
Programming Without and With AI
The programming without and with AI is different in following ways −
Programming Without AI | Programming With AI |
---|---|
A computer program without AI can answer the specific questions it is meant to solve. | A computer program with AI can answer the generic questions it is meant to solve. |
Modification in the program leads to change in its structure. | AI programs can absorb new modifications by putting highly independent pieces of information together. Hence you can modify even a minute piece of information of program without affecting its structure. |
Modification is not quick and easy. It may lead to affecting the program adversely. | Quick and Easy program modification. |
What is AI Technique?
In the real world, the knowledge has some unwelcomed properties −
- Its volume is huge, next to unimaginable.
- It is not well-organized or well-formatted.
- It keeps changing constantly.
AI Technique is a manner to organize and use the knowledge efficiently in such a way that −
- It should be perceivable by the people who provide it.
- It should be easily modifiable to correct errors.
- It should be useful in many situations though it is incomplete or inaccurate.
AI techniques elevate the speed of execution of the complex program it is equipped with.
Applications of AI
AI has been dominant in various fields such as −
- Gaming − AI plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc., where machine can think of large number of possible positions based on heuristic knowledge.
- Natural Language Processing − It is possible to interact with the computer that understands natural language spoken by humans.
- Expert Systems − There are some applications which integrate machine, software, and special information to impart reasoning and advising. They provide explanation and advice to the users.
- Vision Systems − These systems understand, interpret, and comprehend visual input on the computer. For example,
- A spying aeroplane takes photographs, which are used to figure out spatial information or map of the areas.
- Doctors use clinical expert system to diagnose the patient.
- Police use computer software that can recognize the face of criminal with the stored portrait made by forensic artist.
- Speech Recognition − Some intelligent systems are capable of hearing and comprehending the language in terms of sentences and their meanings while a human talks to it. It can handle different accents, slang words, noise in the background, change in human’s noise due to cold, etc.
- Handwriting Recognition − The handwriting recognition software reads the text written on paper by a pen or on screen by a stylus. It can recognize the shapes of the letters and convert it into editable text.
- Intelligent Robots − Robots are able to perform the tasks given by a human. They have sensors to detect physical data from the real world such as light, heat, temperature, movement, sound, bump, and pressure. They have efficient processors, multiple sensors and huge memory, to exhibit intelligence. In addition, they are capable of learning from their mistakes and they can adapt to the new environment.
History of AI
Here is the history of AI during 20th century −
Year | Milestone / Innovation |
---|---|
1923 |
Karel Čapek play named “Rossum's Universal Robots” (RUR) opens in London, first use of the word "robot" in English.
|
1943 |
Foundations for neural networks laid.
|
1945 |
Isaac Asimov, a Columbia University alumni, coined the term Robotics.
|
1950 |
Alan Turing introduced Turing Test for evaluation of intelligence and published Computing Machinery and Intelligence.Claude Shannon published Detailed Analysis of Chess Playing as a search.
|
1956 |
John McCarthy coined the term Artificial Intelligence. Demonstration of the first running AI program at Carnegie Mellon University.
|
1958 |
John McCarthy invents LISP programming language for AI.
|
1964 |
Danny Bobrow's dissertation at MIT showed that computers can understand natural language well enough to solve algebra word problems correctly.
|
1965 |
Joseph Weizenbaum at MIT built ELIZA, an interactive problem that carries on a dialogue in English.
|
1969 |
Scientists at Stanford Research Institute Developed Shakey, a robot, equipped with locomotion, perception, and problem solving.
|
1973 |
The Assembly Robotics group at Edinburgh University built Freddy, the Famous Scottish Robot, capable of using vision to locate and assemble models.
|
1979 |
The first computer-controlled autonomous vehicle, Stanford Cart, was built.
|
1985 |
Harold Cohen created and demonstrated the drawing program, Aaron.
|
1990 |
Major advances in all areas of AI −
|
1997 |
The Deep Blue Chess Program beats the then world chess champion, Garry Kasparov.
|
2000 |
Interactive robot pets become commercially available. MIT displays Kismet, a robot with a face that expresses emotions. The robot Nomad explores remote regions of Antarctica and locates meteorites.
|
While studying artificially intelligence, you need to know what intelligence is. This chapter covers Idea of intelligence, types, and components of intelligence.
What is Intelligence?
The ability of a system to calculate, reason, perceive relationships and analogies, learn from experience, store and retrieve information from memory, solve problems, comprehend complex ideas, use natural language fluently, classify, generalize, and adapt new situations.
Types of Intelligence
As described by Howard Gardner, an American developmental psychologist, the Intelligence comes in multifold −
Intelligence | Description | Example |
---|---|---|
Linguistic intelligence | The ability to speak, recognize, and use mechanisms of phonology (speech sounds), syntax (grammar), and semantics (meaning). | Narrators, Orators |
Musical intelligence | The ability to create, communicate with, and understand meanings made of sound, understanding of pitch, rhythm. | Musicians, Singers, Composers |
Logical-mathematical intelligence | The ability of use and understand relationships in the absence of action or objects. Understanding complex and abstract ideas. | Mathematicians, Scientists |
Spatial intelligence | The ability to perceive visual or spatial information, change it, and re-create visual images without reference to the objects, construct 3D images, and to move and rotate them. | Map readers, Astronauts, Physicists |
Bodily-Kinesthetic intelligence | The ability to use complete or part of the body to solve problems or fashion products, control over fine and coarse motor skills, and manipulate the objects. | Players, Dancers |
Intra-personal intelligence | The ability to distinguish among one’s own feelings, intentions, and motivations. | Gautam Buddhha |
Interpersonal intelligence | The ability to recognize and make distinctions among other people’s feelings, beliefs, and intentions. | Mass Communicators, Interviewers |
You can say a machine or a system is artificially intelligent when it is equipped with at least one and at most all intelligences in it.
What is Intelligence Composed of?
The intelligence is intangible. It is composed of −
- Reasoning
- Learning
- Problem Solving
- Perception
- Linguistic Intelligence
Let us go through all the components briefly −
- Reasoning − It is the set of processes that enables us to provide basis for judgement, making decisions, and prediction. There are broadly two types −
Inductive Reasoning | Deductive Reasoning |
---|---|
It conducts specific observations to makes broad general statements. | It starts with a general statement and examines the possibilities to reach a specific, logical conclusion. |
Even if all of the premises are true in a statement, inductive reasoning allows for the conclusion to be false. | If something is true of a class of things in general, it is also true for all members of that class. |
Example − "Nita is a teacher. Nita is studious. Therefore, All teachers are studious." | Example − "All women of age above 60 years are grandmothers. Shalini is 65 years. Therefore, Shalini is a grandmother." |
- Learning − It is the activity of gaining knowledge or skill by studying, practising, being taught, or experiencing something. Learning enhances the awareness of the subjects of the study.The ability of learning is possessed by humans, some animals, and AI-enabled systems. Learning is categorized as −
- Auditory Learning − It is learning by listening and hearing. For example, students listening to recorded audio lectures.
- Episodic Learning − To learn by remembering sequences of events that one has witnessed or experienced. This is linear and orderly.
- Motor Learning − It is learning by precise movement of muscles. For example, picking objects, Writing, etc.
- Observational Learning − To learn by watching and imitating others. For example, child tries to learn by mimicking her parent.
- Perceptual Learning − It is learning to recognize stimuli that one has seen before. For example, identifying and classifying objects and situations.
- Relational Learning − It involves learning to differentiate among various stimuli on the basis of relational properties, rather than absolute properties. For Example, Adding ‘little less’ salt at the time of cooking potatoes that came up salty last time, when cooked with adding say a tablespoon of salt.
- Spatial Learning − It is learning through visual stimuli such as images, colors, maps, etc. For Example, A person can create roadmap in mind before actually following the road.
- Stimulus-Response Learning − It is learning to perform a particular behavior when a certain stimulus is present. For example, a dog raises its ear on hearing doorbell.
- Problem Solving − It is the process in which one perceives and tries to arrive at a desired solution from a present situation by taking some path, which is blocked by known or unknown hurdles.Problem solving also includes decision making, which is the process of selecting the best suitable alternative out of multiple alternatives to reach the desired goal are available.
- Perception − It is the process of acquiring, interpreting, selecting, and organizing sensory information.Perception presumes sensing. In humans, perception is aided by sensory organs. In the domain of AI, perception mechanism puts the data acquired by the sensors together in a meaningful manner.
- Linguistic Intelligence − It is one’s ability to use, comprehend, speak, and write the verbal and written language. It is important in interpersonal communication.
Difference between Human and Machine Intelligence
- Humans perceive by patterns whereas the machines perceive by set of rules and data.
- Humans store and recall information by patterns, machines do it by searching algorithms. For example, the number 40404040 is easy to remember, store, and recall as its pattern is simple.
- Humans can figure out the complete object even if some part of it is missing or distorted; whereas the machines cannot do it correctly.
The domain of artificial intelligence is huge in breadth and width. While proceeding, we consider the broadly common and prospering research areas in the domain of AI −
Speech and Voice Recognition
These both terms are common in robotics, expert systems and natural language processing. Though these terms are used interchangeably, their objectives are different.
Speech Recognition | Voice Recognition |
---|---|
The speech recognition aims at understanding and comprehending WHAT was spoken. | The objective of voice recognition is to recognize WHO is speaking. |
It is used in hand-free computing, map, or menu navigation. | It is used to identify a person by analysing its tone, voice pitch, and accent, etc. |
Machine does not need training for Speech Recognition as it is not speaker dependent. | This recognition system needs training as it is person oriented. |
Speaker independent Speech Recognition systems are difficult to develop. | Speaker dependent Speech Recognition systems are comparatively easy to develop. |
WORKING OF SPEECH AND VOICE RECOGNITION SYSTEMS
The user input spoken at a microphone goes to sound card of the system. The converter turns the analog signal into equivalent digital signal for the speech processing. The database is used to compare the sound patterns to recognize the words. Finally, a reverse feedback is given to the database.
This source-language text becomes input to the Translation Engine, which converts it to the target language text. They are supported with interactive GUI, large database of vocabulary, etc.
Real Life Applications of AI Research Areas
There is a large array of applications where AI is serving common people in their day-to-day lives −
Sr.No. | Research Areas | Example |
---|---|---|
1 |
Expert Systems
Examples − Flight-tracking systems, Clinical systems.
| |
2 |
Natural Language Processing
Examples: Google Now feature, speech recognition, Automatic voice output.
| |
3 |
Neural Networks
Examples − Pattern recognition systems such as face recognition, character recognition, handwriting recognition.
| |
4 |
Robotics
Examples − Industrial robots for moving, spraying, painting, precision checking, drilling, cleaning, coating, carving, etc.
| |
5 |
Fuzzy Logic Systems
Examples − Consumer electronics, automobiles, etc.
|
Task Classification of AI
The domain of AI is classified into Formal tasks, Mundane tasks, and Expert tasks.
Task Domains of Artificial Intelligence | ||
---|---|---|
Mundane (Ordinary) Tasks | Formal Tasks | Expert Tasks |
Perception
|
|
|
Natural Language Processing
| Games
| Scientific Analysis |
Common Sense | Verification | Financial Analysis |
Reasoning | Theorem Proving | Medical Diagnosis |
Planing | Creativity | |
Robotics
|
Humans learn mundane (ordinary) tasks since their birth. They learn by perception, speaking, using language, and locomotives. They learn Formal Tasks and Expert Tasks later, in that order.
For humans, the mundane tasks are easiest to learn. The same was considered true before trying to implement mundane tasks in machines. Earlier, all work of AI was concentrated in the mundane task domain.
Later, it turned out that the machine requires more knowledge, complex knowledge representation, and complicated algorithms for handling mundane tasks. This is the reason why AI work is more prospering in the Expert Tasks domain now, as the expert task domain needs expert knowledge without common sense, which can be easier to represent and handle.
The domain of artificial intelligence is huge in breadth and width. While proceeding, we consider the broadly common and prospering research areas in the domain of AI −
Speech and Voice Recognition
These both terms are common in robotics, expert systems and natural language processing. Though these terms are used interchangeably, their objectives are different.
Speech Recognition | Voice Recognition |
---|---|
The speech recognition aims at understanding and comprehending WHAT was spoken. | The objective of voice recognition is to recognize WHO is speaking. |
It is used in hand-free computing, map, or menu navigation. | It is used to identify a person by analysing its tone, voice pitch, and accent, etc. |
Machine does not need training for Speech Recognition as it is not speaker dependent. | This recognition system needs training as it is person oriented. |
Speaker independent Speech Recognition systems are difficult to develop. | Speaker dependent Speech Recognition systems are comparatively easy to develop. |
WORKING OF SPEECH AND VOICE RECOGNITION SYSTEMS
The user input spoken at a microphone goes to sound card of the system. The converter turns the analog signal into equivalent digital signal for the speech processing. The database is used to compare the sound patterns to recognize the words. Finally, a reverse feedback is given to the database.
This source-language text becomes input to the Translation Engine, which converts it to the target language text. They are supported with interactive GUI, large database of vocabulary, etc.
Real Life Applications of AI Research Areas
There is a large array of applications where AI is serving common people in their day-to-day lives −
Sr.No. | Research Areas | Example |
---|---|---|
1 |
Expert Systems
Examples − Flight-tracking systems, Clinical systems.
| |
2 |
Natural Language Processing
Examples: Google Now feature, speech recognition, Automatic voice output.
| |
3 |
Neural Networks
Examples − Pattern recognition systems such as face recognition, character recognition, handwriting recognition.
| |
4 |
Robotics
Examples − Industrial robots for moving, spraying, painting, precision checking, drilling, cleaning, coating, carving, etc.
| |
5 |
Fuzzy Logic Systems
Examples − Consumer electronics, automobiles, etc.
|
Task Classification of AI
The domain of AI is classified into Formal tasks, Mundane tasks, and Expert tasks.
Task Domains of Artificial Intelligence | ||
---|---|---|
Mundane (Ordinary) Tasks | Formal Tasks | Expert Tasks |
Perception
|
|
|
Natural Language Processing
| Games
| Scientific Analysis |
Common Sense | Verification | Financial Analysis |
Reasoning | Theorem Proving | Medical Diagnosis |
Planing | Creativity | |
Robotics
|
Humans learn mundane (ordinary) tasks since their birth. They learn by perception, speaking, using language, and locomotives. They learn Formal Tasks and Expert Tasks later, in that order.
For humans, the mundane tasks are easiest to learn. The same was considered true before trying to implement mundane tasks in machines. Earlier, all work of AI was concentrated in the mundane task domain.
Later, it turned out that the machine requires more knowledge, complex knowledge representation, and complicated algorithms for handling mundane tasks. This is the reason why AI work is more prospering in the Expert Tasks domain now, as the expert task domain needs expert knowledge without common sense, which can be easier to represent and handle.
The domain of artificial intelligence is huge in breadth and width. While proceeding, we consider the broadly common and prospering research areas in the domain of AI −
Speech and Voice Recognition
These both terms are common in robotics, expert systems and natural language processing. Though these terms are used interchangeably, their objectives are different.
Speech Recognition | Voice Recognition |
---|---|
The speech recognition aims at understanding and comprehending WHAT was spoken. | The objective of voice recognition is to recognize WHO is speaking. |
It is used in hand-free computing, map, or menu navigation. | It is used to identify a person by analysing its tone, voice pitch, and accent, etc. |
Machine does not need training for Speech Recognition as it is not speaker dependent. | This recognition system needs training as it is person oriented. |
Speaker independent Speech Recognition systems are difficult to develop. | Speaker dependent Speech Recognition systems are comparatively easy to develop. |
WORKING OF SPEECH AND VOICE RECOGNITION SYSTEMS
The user input spoken at a microphone goes to sound card of the system. The converter turns the analog signal into equivalent digital signal for the speech processing. The database is used to compare the sound patterns to recognize the words. Finally, a reverse feedback is given to the database.
This source-language text becomes input to the Translation Engine, which converts it to the target language text. They are supported with interactive GUI, large database of vocabulary, etc.
Real Life Applications of AI Research Areas
There is a large array of applications where AI is serving common people in their day-to-day lives −
Sr.No. | Research Areas | Example |
---|---|---|
1 |
Expert Systems
Examples − Flight-tracking systems, Clinical systems.
| |
2 |
Natural Language Processing
Examples: Google Now feature, speech recognition, Automatic voice output.
| |
3 |
Neural Networks
Examples − Pattern recognition systems such as face recognition, character recognition, handwriting recognition.
| |
4 |
Robotics
Examples − Industrial robots for moving, spraying, painting, precision checking, drilling, cleaning, coating, carving, etc.
| |
5 |
Fuzzy Logic Systems
Examples − Consumer electronics, automobiles, etc.
|
Task Classification of AI
The domain of AI is classified into Formal tasks, Mundane tasks, and Expert tasks.
Task Domains of Artificial Intelligence | ||
---|---|---|
Mundane (Ordinary) Tasks | Formal Tasks | Expert Tasks |
Perception
|
|
|
Natural Language Processing
| Games
| Scientific Analysis |
Common Sense | Verification | Financial Analysis |
Reasoning | Theorem Proving | Medical Diagnosis |
Planing | Creativity | |
Robotics
|
Humans learn mundane (ordinary) tasks since their birth. They learn by perception, speaking, using language, and locomotives. They learn Formal Tasks and Expert Tasks later, in that order.
For humans, the mundane tasks are easiest to learn. The same was considered true before trying to implement mundane tasks in machines. Earlier, all work of AI was concentrated in the mundane task domain.
Later, it turned out that the machine requires more knowledge, complex knowledge representation, and complicated algorithms for handling mundane tasks. This is the reason why AI work is more prospering in the Expert Tasks domain now, as the expert task domain needs expert knowledge without common sense, which can be easier to represent and handle.
Searching is the universal technique of problem solving in AI. There are some single-player games such as tile games, Sudoku, crossword, etc. The search algorithms help you to search for a particular position in such games.
Single Agent Pathfinding Problems
The games such as 3X3 eight-tile, 4X4 fifteen-tile, and 5X5 twenty four tile puzzles are single-agent-path-finding challenges. They consist of a matrix of tiles with a blank tile. The player is required to arrange the tiles by sliding a tile either vertically or horizontally into a blank space with the aim of accomplishing some objective.
The other examples of single agent pathfinding problems are Travelling Salesman Problem, Rubik’s Cube, and Theorem Proving.
Search Terminology
- Problem Space − It is the environment in which the search takes place. (A set of states and set of operators to change those states)
- Problem Instance − It is Initial state + Goal state.
- Problem Space Graph − It represents problem state. States are shown by nodes and operators are shown by edges.
- Depth of a problem − Length of a shortest path or shortest sequence of operators from Initial State to goal state.
- Space Complexity − The maximum number of nodes that are stored in memory.
- Time Complexity − The maximum number of nodes that are created.
- Admissibility − A property of an algorithm to always find an optimal solution.
- Branching Factor − The average number of child nodes in the problem space graph.
- Depth − Length of the shortest path from initial state to goal state.
Brute-Force Search Strategies
They are most simple, as they do not need any domain-specific knowledge. They work fine with small number of possible states.
Requirements −
- State description
- A set of valid operators
- Initial state
- Goal state description
BREADTH-FIRST SEARCH
It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time until the solution is found. It can be implemented using FIFO queue data structure. This method provides shortest path to the solution.
If branching factor (average number of child nodes for a given node) = b and depth = d, then number of nodes at level d = bd.
The total no of nodes created in worst case is b + b2 + b3 + … + bd.
Disadvantage − Since each level of nodes is saved for creating next one, it consumes a lot of memory space. Space requirement to store nodes is exponential.
Its complexity depends on the number of nodes. It can check duplicate nodes.
DEPTH-FIRST SEARCH
It is implemented in recursion with LIFO stack data structure. It creates the same set of nodes as Breadth-First method, only in the different order.
As the nodes on the single path are stored in each iteration from root to leaf node, the space requirement to store nodes is linear. With branching factor b and depth as m, the storage space is bm.
Disadvantage − This algorithm may not terminate and go on infinitely on one path. The solution to this issue is to choose a cut-off depth. If the ideal cut-off is d, and if chosen cut-off is lesser than d, then this algorithm may fail. If chosen cut-off is more than d, then execution time increases.
Its complexity depends on the number of paths. It cannot check duplicate nodes.
BIDIRECTIONAL SEARCH
It searches forward from initial state and backward from goal state till both meet to identify a common state.
The path from initial state is concatenated with the inverse path from the goal state. Each search is done only up to half of the total path.
UNIFORM COST SEARCH
Sorting is done in increasing cost of the path to a node. It always expands the least cost node. It is identical to Breadth First search if each transition has the same cost.
It explores paths in the increasing order of cost.
Disadvantage − There can be multiple long paths with the cost ≤ C*. Uniform Cost search must explore them all.
ITERATIVE DEEPENING DEPTH-FIRST SEARCH
It performs depth-first search to level 1, starts over, executes a complete depth-first search to level 2, and continues in such way till the solution is found.
It never creates a node until all lower nodes are generated. It only saves a stack of nodes. The algorithm ends when it finds a solution at depth d. The number of nodes created at depth d is bd and at depth d-1 is bd-1.
COMPARISON OF VARIOUS ALGORITHMS COMPLEXITIES
Let us see the performance of algorithms based on various criteria −
Criterion | Breadth First | Depth First | Bidirectional | Uniform Cost | Interactive Deepening |
---|---|---|---|---|---|
Time | bd | bm | bd/2 | bd | bd |
Space | bd | bm | bd/2 | bd | bd |
Optimality | Yes | No | Yes | Yes | Yes |
Completeness | Yes | No | Yes | Yes | Yes |
Informed (Heuristic) Search Strategies
To solve large problems with large number of possible states, problem-specific knowledge needs to be added to increase the efficiency of search algorithms.
HEURISTIC EVALUATION FUNCTIONS
They calculate the cost of optimal path between two states. A heuristic function for sliding-tiles games is computed by counting number of moves that each tile makes from its goal state and adding these number of moves for all tiles.
PURE HEURISTIC SEARCH
It expands nodes in the order of their heuristic values. It creates two lists, a closed list for the already expanded nodes and an open list for the created but unexpanded nodes.
In each iteration, a node with a minimum heuristic value is expanded, all its child nodes are created and placed in the closed list. Then, the heuristic function is applied to the child nodes and they are placed in the open list according to their heuristic value. The shorter paths are saved and the longer ones are disposed.
A * SEARCH
It is best-known form of Best First search. It avoids expanding paths that are already expensive, but expands most promising paths first.
f(n) = g(n) + h(n), where
- g(n) the cost (so far) to reach the node
- h(n) estimated cost to get from the node to the goal
- f(n) estimated total cost of path through n to goal. It is implemented using priority queue by increasing f(n).
GREEDY BEST FIRST SEARCH
It expands the node that is estimated to be closest to goal. It expands nodes based on f(n) = h(n). It is implemented using priority queue.
Disadvantage − It can get stuck in loops. It is not optimal.
Local Search Algorithms
They start from a prospective solution and then move to a neighboring solution. They can return a valid solution even if it is interrupted at any time before they end.
HILL-CLIMBING SEARCH
It is an iterative algorithm that starts with an arbitrary solution to a problem and attempts to find a better solution by changing a single element of the solution incrementally. If the change produces a better solution, an incremental change is taken as a new solution. This process is repeated until there are no further improvements.
function Hill-Climbing (problem), returns a state that is a local maximum.
inputs: problem, a problem local variables: current, a node neighbor, a node current <-Make_Node(Initial-State[problem]) loop do neighbor <- a highest_valued successor of current if Value[neighbor] ≤ Value[current] then return State[current] current <- neighbor end
Disadvantage − This algorithm is neither complete, nor optimal.
LOCAL BEAM SEARCH
In this algorithm, it holds k number of states at any given time. At the start, these states are generated randomly. The successors of these k states are computed with the help of objective function. If any of these successors is the maximum value of the objective function, then the algorithm stops.
Otherwise the (initial k states and k number of successors of the states = 2k) states are placed in a pool. The pool is then sorted numerically. The highest k states are selected as new initial states. This process continues until a maximum value is reached.
function BeamSearch( problem, k), returns a solution state.
start with k randomly generated states loop generate all successors of all k states if any of the states = solution, then return the state else select the k best successors end
SIMULATED ANNEALING
Annealing is the process of heating and cooling a metal to change its internal structure for modifying its physical properties. When the metal cools, its new structure is seized, and the metal retains its newly obtained properties. In simulated annealing process, the temperature is kept variable.
We initially set the temperature high and then allow it to ‘cool' slowly as the algorithm proceeds. When the temperature is high, the algorithm is allowed to accept worse solutions with high frequency.
Start
- Initialize k = 0; L = integer number of variables;
- From i → j, search the performance difference Δ.
- If Δ <= 0 then accept else if exp(-Δ/T(k)) > random(0,1) then accept;
- Repeat steps 1 and 2 for L(k) steps.
- k = k + 1;
Repeat steps 1 through 4 till the criteria is met.
End
TRAVELLING SALESMAN PROBLEM
In this algorithm, the objective is to find a low-cost tour that starts from a city, visits all cities en-route exactly once and ends at the same starting city.
Start Find out all (n -1)! Possible solutions, where n is the total number of cities. Determine the minimum cost by finding out the cost of each of these (n -1)! solutions. Finally, keep the one with the minimum cost. end
Fuzzy Logic Systems (FLS) produce acceptable but definite output in response to incomplete, ambiguous, distorted, or inaccurate (fuzzy) input.
What is Fuzzy Logic?
Fuzzy Logic (FL) is a method of reasoning that resembles human reasoning. The approach of FL imitates the way of decision making in humans that involves all intermediate possibilities between digital values YES and NO.
The conventional logic block that a computer can understand takes precise input and produces a definite output as TRUE or FALSE, which is equivalent to human’s YES or NO.
The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike computers, the human decision making includes a range of possibilities between YES and NO, such as −
CERTAINLY YES |
POSSIBLY YES |
CANNOT SAY |
POSSIBLY NO |
CERTAINLY NO |
The fuzzy logic works on the levels of possibilities of input to achieve the definite output.
IMPLEMENTATION
- It can be implemented in systems with various sizes and capabilities ranging from small micro-controllers to large, networked, workstation-based control systems.
- It can be implemented in hardware, software, or a combination of both.
Why Fuzzy Logic?
Fuzzy logic is useful for commercial and practical purposes.
- It can control machines and consumer products.
- It may not give accurate reasoning, but acceptable reasoning.
- Fuzzy logic helps to deal with the uncertainty in engineering.
Fuzzy Logic Systems Architecture
It has four main parts as shown −
- Fuzzification Module − It transforms the system inputs, which are crisp numbers, into fuzzy sets. It splits the input signal into five steps such as −
LP | x is Large Positive |
MP | x is Medium Positive |
S | x is Small |
MN | x is Medium Negative |
LN | x is Large Negative |
- Knowledge Base − It stores IF-THEN rules provided by experts.
- Inference Engine − It simulates the human reasoning process by making fuzzy inference on the inputs and IF-THEN rules.
- Defuzzification Module − It transforms the fuzzy set obtained by the inference engine into a crisp value.
The membership functions work on fuzzy sets of variables.
MEMBERSHIP FUNCTION
Membership functions allow you to quantify linguistic term and represent a fuzzy set graphically. A membership function for a fuzzy set A on the universe of discourse X is defined as μA:X → [0,1].
Here, each element of X is mapped to a value between 0 and 1. It is called membership value or degree of membership. It quantifies the degree of membership of the element in X to the fuzzy set A.
- x axis represents the universe of discourse.
- y axis represents the degrees of membership in the [0, 1] interval.
There can be multiple membership functions applicable to fuzzify a numerical value. Simple membership functions are used as use of complex functions does not add more precision in the output.
All membership functions for LP, MP, S, MN, and LNare shown as below −
The triangular membership function shapes are most common among various other membership function shapes such as trapezoidal, singleton, and Gaussian.
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the corresponding output also changes.
Example of a Fuzzy Logic System
Let us consider an air conditioning system with 5-level fuzzy logic system. This system adjusts the temperature of air conditioner by comparing the room temperature and the target temperature value.
ALGORITHM
- Define linguistic variables and terms.
- Construct membership functions for them.
- Construct knowledge base of rules.
- Convert crisp data into fuzzy data sets using membership functions. (fuzzification)
- Evaluate rules in the rule base. (Inference Engine)
- Combine results from each rule. (Inference Engine)
- Convert output data into non-fuzzy values. (defuzzification)
LOGIC DEVELOPMENT
Step 1: Define linguistic variables and terms
Linguistic variables are input and output variables in the form of simple words or sentences. For room temperature, cold, warm, hot, etc., are linguistic terms.
Temperature (t) = {very-cold, cold, warm, very-warm, hot}
Every member of this set is a linguistic term and it can cover some portion of overall temperature values.
Step 2: Construct membership functions for them
The membership functions of temperature variable are as shown −
Step3: Construct knowledge base rules
Create a matrix of room temperature values versus target temperature values that an air conditioning system is expected to provide.
RoomTemp. /Target | Very_Cold | Cold | Warm | Hot | Very_Hot |
---|---|---|---|---|---|
Very_Cold | No_Change | Heat | Heat | Heat | Heat |
Cold | Cool | No_Change | Heat | Heat | Heat |
Warm | Cool | Cool | No_Change | Heat | Heat |
Hot | Cool | Cool | Cool | No_Change | Heat |
Very_Hot | Cool | Cool | Cool | Cool | No_Change |
Build a set of rules into the knowledge base in the form of IF-THEN-ELSE structures.
Sr. No. | Condition | Action |
---|---|---|
1 | IF temperature=(Cold OR Very_Cold) AND target=Warm THEN | Heat |
2 | IF temperature=(Hot OR Very_Hot) AND target=Warm THEN | Cool |
3 | IF (temperature=Warm) AND (target=Warm) THEN | No_Change |
Step 4: Obtain fuzzy value
Fuzzy set operations perform evaluation of rules. The operations used for OR and AND are Max and Min respectively. Combine all results of evaluation to form a final result. This result is a fuzzy value.
Step 5: Perform defuzzification
Defuzzification is then performed according to membership function for output variable.
Application Areas of Fuzzy Logic
The key application areas of fuzzy logic are as given −
Automotive Systems
- Automatic Gearboxes
- Four-Wheel Steering
- Vehicle environment control
Consumer Electronic Goods
- Hi-Fi Systems
- Photocopiers
- Still and Video Cameras
- Television
Domestic Goods
- Microwave Ovens
- Refrigerators
- Toasters
- Vacuum Cleaners
- Washing Machines
Environment Control
- Air Conditioners/Dryers/Heaters
- Humidifiers
Advantages of FLSs
- Mathematical concepts within fuzzy reasoning are very simple.
- You can modify a FLS by just adding or deleting rules due to flexibility of fuzzy logic.
- Fuzzy logic Systems can take imprecise, distorted, noisy input information.
- FLSs are easy to construct and understand.
- Fuzzy logic is a solution to complex problems in all fields of life, including medicine, as it resembles human reasoning and decision making.
Disadvantages of FLSs
- There is no systematic approach to fuzzy system designing.
- They are understandable only when simple.
- They are suitable for the problems which do not need high accuracy.
No comments:
Post a Comment