Professional Documents
Culture Documents
FACULTY OF SCIENCE
COURSE
GUIDE
CIT478
ARTIFICIAL INTELLIGENCE
ii
CIT478 COURSE GUIDE
iii
CIT478 COURSE GUIDE
Abuja Office
No. 5 Dar es Salaam Street
Off Aminu Kano Crescent
Wuse II, Abuja
Nigeria
e-mail: centralinfo@nou.edu.ng
URL: www.nou.edu.ng
Published By:
National Open University of Nigeria
ISBN: 978-058-826-4
iv
CIT478 COURSE GUIDE
CONTENTS PAGE
Introduction… ....................................................................................... 1
What You Will Learn in This Course… ............................................... 1
Course Aim ............................................................................................ 2
Course Objectives… .............................................................................. 2
Working through This Course… ........................................................... 3
Course Materials… ............................................................................... 3
Study Units… ....................................................................................... 4
Textbooks and References .................................................................... 4
Assignment File… ................................................................................ 9
Presentation Schedule… ....................................................................... 9
Assessment… ........................................................................................ 9
Tutor Marked Assignments (TMAs)… ............................................... 10
Final Examination and Grading…........................................................ 10
Course Marking Scheme ...................................................................... 10
Course Overview… .............................................................................. 11
How to Get the Most from This Course ............................................... 12
Facilitators/Tutors and Tutorials… ...................................................... 13
v
Introduction
In this guide you will find very useful information about this course,
aims and objectives, what the course is about, what course materials you
will be used, available services to support your learning, information on
assignments and examination. It also offers you guidelines on how to
plan your time for study the amount of time you are likely to spend on
each study unit as well as your tutor-marked assignments.
I wish you all the best in your learning experience and successful
completion of this course.
Course Aim
Course Objectives
In order to achieve this aim, the course has a set of objectives. Each unit
has specific objectives which are included at the beginning of the unit.
You are expected to read these objectives before you study the unit. You
may wish to refer to them during your study to check on your progress.
You should always look at the unit objectives after completion of each
unit. By doing so, you would have followed the instructions in the unit.
Below are the comprehensive objectives of the course as a whole. By
meeting these objectives, you should have achieved the aim of the
course. Therefore, after going through this course you should be able to:
ii
CIT478 ARTIFICIAL INTELLIGENCE
iii
CIT478 ARTIFICIAL INTELLIGENCE
To complete this course, you are required to read each study unit, read
the textbooks and read other materials which may be provided by the
National Open University of Nigeria.
Each unit contains tutor marked assignments and at certain points in the
course you would be required to submit assignment for assessment
purposes. At the end of the course there is a final examination. The
course should take you about a total of eleven (11) weeks to complete.
Below is the list of all the components of the course, what you have to
do and how you should allocate your time to each unit in order to
complete the course on time and successfully.
This course entails that you spend a lot of time to read and practice. For
easy understanding of this course, I will advise that you avail yourself
the opportunity of attending the tutorials sessions where you would have
the opportunity to compare your knowledge with that of other people,
and also have your questions answered.
Study Units
There are 11 study units and 4 modules in this course. They are:
Module 1 Introduction to AI
viii
CIT478 ARTIFICIAL INTELLIGENCE
ix
CIT478 ARTIFICIAL INTELLIGENCE
Assignment File
The assignment file will be given to you in due course. In this file, you
will find all the details of the work you must submit to your tutor for
marking. The marks you obtain for these assignments will count
towards the final mark for the course. Altogether, there are 11 tutor
marked assignments for this course.
x
CIT478 ARTIFICIAL INTELLIGENCE
Presentation Schedule
Assessment
There are two aspects to the assessment of this course. First, there are
tutor marked assignments; and second, the written examination.
Therefore, you are expected to take note of the facts, information and
problem solving gathered during the course. The tutor marked
assignments must be submitted to your tutor for formal assessment, in
accordance to the deadline given. The work submitted will count for
40% of your total course mark. At the end of the course, you will need
to sit for a final written examination. This examination will account for
60% of your total score.
There are 11 TMAs in this course. You need to submit all the TMAs. The
best 4 will therefore be counted. When you have completed each
assignment, send them to your tutor as soon as possible and make
certain that it gets to your tutor on or before the stipulated deadline. If
for any reason you cannot complete your assignment on time, contact
your tutor before the assignment is due to discuss the possibility of
extension. Extension will not be granted after the deadline, unless on
extraordinary cases.
The final examination for CIT478 will be of last for a period of 2 hours
and have a value of 60% of the total course grade. The examination will
consist of questions which reflect the tutor marked assignments that
you have previously encountered. Furthermore, all areas of the course
will be examined. It would be better to use the time between finishing
the last unit and sitting for the examination, to revise the entire course.
You might find it useful to review your TMAs and comment on them
before the examination. The final examination covers information from
all parts of the course.
xi
CIT478 ARTIFICIAL INTELLIGENCE
xii
CIT478 ARTIFICIAL INTELLIGENCE
In distance learning, the study units replace the university lecturer. This
is one of the great advantages of distance learning; you can read and
work through specially designed study materials at your own pace, and
at a time and place that suit you best. Think of it as reading the lecture
instead of listening to a lecturer. In the same way that a lecturer might
set you some reading to do, the study units tell you when to read your
set books or other material. Just as a lecturer might give you an in-class
exercise, your study units provide exercises for you to do at appropriate
points.
Each of the study units follows a common format. The first item is an
introduction to the subject matter of the unit and how a particular unit is
integrated with the other units and the course as a whole. Next is a set of
learning objectives. These objectives enable you know what you should
be able to do by the time you have completed the unit. You should use
these objectives to guide your study. When you have finished the units
you must go back and check whether you have achieved the objectives.
If you make a habit of doing this you will significantly improve your
chances of passing the course.
Remember that your tutor‘s job is to assist you. When you need help,
don‘t hesitate to call and ask your tutor to provide it.
Note the time you are expected to spend on each unit and how the
assignments relate to the units. Whatever method you chose to use, you
should decide on it and write in your own dates for working on each
unit.
Work through the unit. The content of the unit itself has been
arranged to provide a sequence for you to follow. As you work
through the unit you will be instructed to read sections from your
set books or other articles. Use the unit to guide your reading.
Review the objectives for each study unit to confirm that you
have achieved them. If you feel unsure about any of the
objectives, review the study material or consult your tutor.
When you are confident that you have achieved a unit‘s
objectives, you can then start on the next unit. Proceed unit by
unit through the course and try to pace your study so that you
keep yourself on schedule.
When you have submitted an assignment to your tutor for
marking, do not wait for its return before starting on the next unit.
Keep to your schedule. When the assignment is returned, pay
particular attention to your tutor‘s comments on the tutor-marked
assignment form. Consult your tutor as soon as possible if you
have any questions or problems.
After completing the last unit, review the course and prepare
yourself for the final examination. Check that you have achieved
the unit objectives (listed at the beginning of each unit) and the
course objectives (listed in this Course Guide).
xiv
CIT478 ARTIFICIAL INTELLIGENCE
You do not understand any part of the study units or the assigned
readings
You should try your best to attend the tutorials. This is the only chance
to have face to face contact with your tutor and to ask questions which
are answered instantly. You can raise any problem encountered in the
course of your study. To gain the maximum benefit from course
tutorials, prepare a question list before attending them. You will learn a
lot from participating in discussions actively. GOODLUCK!
xv
CIT478 ARTIFICIAL INTELLIGENCE
Abuja Office
No. 5 Dar es Salaam Street
Off Aminu Kano Crescent
Wuse II, Abuja
Nigeria
e-mail: centralinfo@nou.edu.ng
URL: www.nou.edu.ng
Published By:
National Open University of Nigeria
ISBN: 978-058-826-4
xv
ii
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS PAGE
xviii
CIT478 ARTIFICIAL INTELLIGENCE
MODULE 1 INTRODUCTION TO AI
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Definition of AI
3.1.1 What is AI?
3.1.2 Typical AI problem
3.1.3 Practical Impact of AI
3.1.4 Approaches to AI
3.1.5 Limits of AI Today
3.2 AI History
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
1
CIT478 ARTIFICIAL INTELLIGENCE
3.1 Definition of AI
What is AI?
Artificial Intelligence is a branch of Science which deals with helping
machines find solutions to complex problems in a more human-like
fashion. This generally involves borrowing characteristics from human
intelligence, and applying them as algorithms in a computer friendly
way. A more or less flexible or efficient approach can be taken
depending on the requirements established, which influences how
artificial the intelligent behaviour appears.
1. Intelligence
2. Artificial device
What is intelligence?
Turing Test
Consider the following setting. There are two rooms, A and B. One of
the rooms contains a computer. The other contains a human. The
interrogator is outside and does not know which one is a computer. He
can ask questions through a teletype and receives answers from both A
3
CIT478 ARTIFICIAL INTELLIGENCE
These tasks are done matter of firstly and routinely by people and some
other animals.
• Medical diagnosis.
• Mathematical problem solving
• Playing games like chess
These tasks cannot be done by all people, and can only be performed by
skilled specialists.
Now, which of these tasks are easy and which ones are hard? Clearly
tasks of the first type are easy for humans to perform, and almost all are
able to master them. The second range of tasks requires skill
4
CIT478 ARTIFICIAL INTELLIGENCE
5
CIT478 ARTIFICIAL INTELLIGENCE
1. ALVINN
The system drove a car from the East Coast of USA to the west coast, a
total of about 2850 miles. Out of this about 50 miles were driven by a
human being and the rest solely by the system.
2. Deep Blue
In 1997, the Deep Blue chess program created by IBM, beat the current
world chess champion, Gary Kasparov.
3. Machine translation
4. Autonomous agents
5. Internet Agents
The explosive growth of the internet has also led to growing interest in
internet agents to monitor users' tasks, seek needed information, and to
learn which information is most useful
6
CIT478 ARTIFICIAL INTELLIGENCE
3.1.4 Approaches to AI
Strong AI aims to build machines that can truly reason and solve
problems. These machines should be self aware and their overall
intellectual ability needs to be indistinguishable from that of a human
being. Excessive optimism in the 1950s and 1960s concerning strong AI
has given way to an appreciation of the extreme difficulty of the
problem. Strong AI maintains that suitably programmed machines are
capable of cognitive mental states.
Cognitive AI: computers are used to test theories about how the human
mind works--for example, theories about how we recognise faces and
other objects, or about how we solve abstract problems.
3.2 AI History
Marvin Minsky and Dean Edmonds built the SNARC in 1951, which is
the first randomly wired neural network learning machine (SNARC
stands for Stochastic Neural-Analog Reinforcement Computer).It was a
neural network computer that used 3000 vacuum tubes and a network
with 40 neurons.
Between 1952 and 1956, Samuel had developed several programs for
playing checkers. In 1956, Newell & Simon‘s Logic Theorist was
published. It is considered by many to be the first AI program. In 1959,
Gelernter developed a Geometry Engine. In 1961 James Slagle (PhD
dissertation, MIT) wrote a symbolic integration program SAINT. It was
written in LISP and solved calculus problems at the college freshman
level. In 1963, Thomas Evan's program Analogy was developed which
could solve IQ test type analogy problems.
9
CIT478 ARTIFICIAL INTELLIGENCE
We will now mention a few of the AI systems that were developed over
the years.
Uncertain reasoning,
Natural language understanding and translation,
Vision, virtual reality, games, and other topics.
In the late 90s, Web crawlers and other AI-based information extraction
programs become essential in widespread use of the world-wide-web.
AI in the news
http://www.aaai.org/AITopics/html/current.html
4.0 CONCLUSION
The field was founded on the claim that a central property of humans,
intelligence—the sapience of Homo sapiens—can be so precisely
described that it can be simulated by a machine. This raises
philosophical issues about the nature of the mind and the ethics of
creating artificial beings, issues which have been addressed by myth,
fiction and philosophy since antiquity. Artificial intelligence has been
the subject of optimism, but has also suffered setbacks and, today, has
become an essential part of the technology industry, providing the heavy
lifting for many of the most difficult problems in computer science.
11
CIT478 ARTIFICIAL INTELLIGENCE
5.0 SUMMARY
In this unit, you have learnt that:
Artificial Intelligence is a branch of Science which deals with
helping machines find solutions to complex problems in a more
human-like fashion
Typical AI problems
AI History
Limits of AI Today
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1. Introduction to Agent
3.1.1 Agent Performance
3.1.2 Examples of Agents
3.1.3 Agent Faculties
3.1.4 Intelligent Agents
3.1.5 Rationality
3.1.6 Bound Rationality
3.2 Agent Environment
3.2.1 Observability
3.2.2 Determinism
3.2.3 Episodicity
3.2.4 Dynamism
3.2.5 Continuity
3.2.6 Presence of other Agents
3.3 Agent Architectures or Reflex Agent
3.3.1 Table Based Agent
3.3.2 Percept based
3.3.3 Subsumption Architecture
3.3.4 State-based Reflex Agent
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
identify the percepts available to the agent and the actions that the
agent can execute, if given a problem situation
measure the performance used to evaluate an agent
list based agents
identify the characteristics of the environment.
The ideal mapping specifies which actions an agent ought to take at any
point in time.
14
CIT478 ARTIFICIAL INTELLIGENCE
15
CIT478 ARTIFICIAL INTELLIGENCE
Acting
Sensing
Understanding, reasoning, learning
3.1.5 Rationality
Perfect Rationality assumes that the rational agent knows all and will
take the action that maximizes her utility. Human beings do not satisfy
this definition of rationality.
Rational Action is the action that maximizes the expected value of the
performance measure given the percept sequence to date.
However, a rational agent is not omniscient. It does not know the actual
outcome of its actions, and it may not know certain aspects of its
environment. Therefore rationality must take into account the limitations
of the agent. The agent has too select the best action to the best of its
knowledge depending on its percept sequence, its background
knowledge and its feasible actions. An agent also has to deal with the
expected outcome of the actions where the action effects are not
deterministic.
16
CIT478 ARTIFICIAL INTELLIGENCE
3.2.1 Observability
3.2.2 Determinism
17
CIT478 ARTIFICIAL INTELLIGENCE
3.2.3 Episodicity
3.2.4 Dynamism
Static Environment: does not change from one state to the next while the
agent is considering its course of action. The only changes to the
environment are those caused by the agent itself.
3.2.5 Continuity
18
CIT478 ARTIFICIAL INTELLIGENCE
There are several disadvantages to a table based system. The tables may
become very large. Learning a table may take a very long time,
especially if the table is large. Such systems usually have little
autonomy, as all actions are pre-determined.
Efficient
No internal representation for reasoning, inference.
No strategic planning, learning.
Percept-based agents are not good for multiple, opposing, goals.
19
CIT478 ARTIFICIAL INTELLIGENCE
20
CIT478 ARTIFICIAL INTELLIGENCE
State based agents differ from percept based agents in that such agents
maintain some sort of state based on the percept sequence received so
far. The state is updated regularly based on what the agent senses, and
the agent‘s actions. Keeping track of the state requires that the agent has
knowledge about how the world evolves, and how the agent‘s actions
affect the world.
The goal based agent has some goal which forms a basis of its actions.
Such agents work as follows:
21
CIT478 ARTIFICIAL INTELLIGENCE
4.0 CONCLUSION
5.0 SUMMARY
22
CIT478 ARTIFICIAL INTELLIGENCE
1. Define an agent.
2. What is a rational agent?
3. What is bounded rationality?
4. What is an autonomous agent?
5. Describe the salient features of an agent.
23
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 State space search
3.1.1 Goal Directed Agent
3.1.2 State Space Search Notations
3.2 Problem Space
3.2.1 Search Problem
3.3 Examples
3.2.1 Illustration of a search process
3.2.2 Example problem: Pegs and Disks problem
3.2.3 Queens Problem
3.2.4 Problem Definition - Example, 8 puzzle
3.4 Types of AI Search Techniques
4.0 Conclusion
5.0 Summary
6.0 Tutor- Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
function in the same way our minds do. They require a series of well-
reasoned out steps before finding a solution. Your goal, then, is to take a
complicated task and convert it into simpler steps that your computer
can handle. That conversion from something complex to something
simple is what this unit is primarily about. Learning how to use two
search algorithms is just a welcome side-effect. This unit will explain
the background for AI search and some of the AI search techniques.
2.0 OBJECTIVES
An action or an operator takes the agent from one state to another state
which is called a successor state. A state can have a number of successor
states.
25
CIT478 ARTIFICIAL INTELLIGENCE
The agent must choose a sequence of actions to achieve the desired goal.
26
CIT478 ARTIFICIAL INTELLIGENCE
27
CIT478 ARTIFICIAL INTELLIGENCE
S: set of states
s ∈ S: initial state
0
A: S? S operators/ actions that transform one state to another state
G: goal, a set of states. G ⊆ S
28
CIT478 ARTIFICIAL INTELLIGENCE
Searching process
If it is not, the new state becomes the current state and the process is
repeated
3.3 Examples
29
CIT478 ARTIFICIAL INTELLIGENCE
The successors of these states are picked and their successors are
generated.
30
CIT478 ARTIFICIAL INTELLIGENCE
The above example illustrates how we can start from a given state and
follow the successors, and be able to find solution paths that lead to a
goal state. The grey nodes define the search tree. Usually the search tree
is extended one node at a time. The order in which the search tree is
extended depends on the search strategy.
31
CIT478 ARTIFICIAL INTELLIGENCE
We will now illustrate state space search with one more example – the
pegs and disks problem. We will illustrate a solution sequence which
when applied to the initial state takes us to a goal state.
Operators: one may move the topmost disk on any needle to the topmost
position to any other needle.
In the goal state all the pegs are in the needle B as shown in the figure
below.
Step 1: Move A → C
32
CIT478 ARTIFICIAL INTELLIGENCE
Step 2: Move A → B
Step 3: Move A → C
Step 4: Move B→ A
33
CIT478 ARTIFICIAL INTELLIGENCE
Step 5: Move C → B
Step 6: Move A → B
Step 7: Move C→ B
The picture below on the left shows a solution of the 8-queens problem.
The picture on the right is not a correct solution, because some of the
queens are attacking each other.
34
CIT478 ARTIFICIAL INTELLIGENCE
The initial state has 64 successors. Each of the states at the next level
has 63 successors, and so on. We can restrict the search tree somewhat
by considering only those successors where no queen is attacking each
other. To do that, we have to check the new queen against all existing
queens on the board. The solutions are found at a depth of 8.
35
CIT478 ARTIFICIAL INTELLIGENCE
36
CIT478 ARTIFICIAL INTELLIGENCE
37
CIT478 ARTIFICIAL INTELLIGENCE
Goal Test: The current state matches a certain state (e.g. one of the ones
shown on previous slide)
A small portion of the state space of 8-puzzle is shown below. Note that
we do not need to generate all the states before the search begins. The
states can be generated when required.
38
CIT478 ARTIFICIAL INTELLIGENCE
4.0 CONCLUSION
State space search often differs from traditional computer science search
methods because the state space is implicit: the typical state space graph
is much too large to generate and store in memory. Instead, nodes are
generated as they are explored, and typically discarded thereafter. A
solution to a combinatorial search instance may consist of the goal state
itself, or of a path from some initial state to the goal state.
5.0 SUMMARY
39
CIT478 ARTIFICIAL INTELLIGENCE
41
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Uninformed Search
3.2 Depth First and Breadth First Search
3.2.1 Depth First Search
3.2.2 Breadth First Search
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
42
CIT478 ARTIFICIAL INTELLIGENCE
If you want to go from Point A to Point B, you are employing some kind
of search. For a direction finder, going from Point A to Point B literally
means finding a path between where you are now and your intended
destination. For a chess game, Point A to Point B might be two points
between its current position and its position 5 moves from now. For a
genome sequence, Points A and B could be a link between two DNA
sequences.
As you can tell, going from Point A to Point B is different for every
situation. If there is a vast amount of interconnected data, and you are
trying to find a relation between few such pieces of data, you would use
search. In this unit, you will learn about two forms of searching, depth
first and breadth first.
Lets you learn how we humans could solve a search problem. First, we
need a representation of how our search problem will exist. The
following is an example of our search tree. It is a series of
interconnected nodes that we will be searching through:
43
CIT478 ARTIFICIAL INTELLIGENCE
In our above graph, the path connections are not two-way. All paths go
only from top to bottom. In other words, A has a path to B and C, but B
and C do not have a path to A. It is basically like a one-way street.
Step 0
I will be using two lists to keep track of what we are doing - an Open list
and a Closed List. An Open list keeps track of what you need to do, and
the Closed List keeps track of what you have already done. Right now,
we only have our starting point, node A. We haven't done anything to it
yet, so let's add it to our Open list.
45
CIT478 ARTIFICIAL INTELLIGENCE
Open List: A
Closed List: <empty>
Step 1
Now, let's explore the neighbors of our A node. To put another way, let's
take the first item from our Open list and explore its neighbors:
Node A's neighbors are the B and C nodes. Because we are now done
with our A node, we can remove it from our Open list and add it to our
Closed List. You aren't done with this step though. You now have two
new nodes B and C that need exploring. Add those two nodes to our
Open list.
Our current Open and Closed Lists contain the following data:
Open List: B, C
Closed List: A
Step 2
Our Open list contains two items. For depth first search and breadth first
search, you always explore the first item from our Open list. The first
item in our Open list is the B node. B is not our destination, so let's
explore its neighbors:
Open List: D, E, C
Closed List: A, B
Step 3
46
CIT478 ARTIFICIAL INTELLIGENCE
Open List: E, C
Closed List: A, B, D
Step 4
We now expand the E node from our Open list. E is not our destination,
so we explore its neighbors and find out that it contains the neighbors F
and G. Remember, F is our target, but we don't stop here though.
Despite F being on our path, we only end when we are about to expand
our target Node - F in this case:
Our Open list will have the E node removed and the F and G nodes
added. The removed E node will be added to our Closed List:
Open List: F, G, C
Closed List: A, B, D, E
Step 5
47
CIT478 ARTIFICIAL INTELLIGENCE
We remove F from our Open list and add it to our Closed List. Since we
are at our destination, there is no need to expand F in order to find its
neighbors. Our final Open and Closed Lists contain the following data:
Open List: G, C
Closed List: A, B, D, E, F
The final path taken by our depth first search method is what the final
value of our Closed List is: A, B, D, E, F. Towards the end of this
tutorial, I will analyze these results in greater detail so that you have a
better understanding of this search method.
The reason I cover both depth and breadth first search methods in the
same unit is because they are both similar. In depth first search, newly
explored nodes were added to the beginning of your Open list. In
breadth first search, newly explored nodes are added to the end of your
Open list.
Let's see how that change will affect our results. For reference, here is
our original search tree:
48
CIT478 ARTIFICIAL INTELLIGENCE
Step 0
Like before, I will continue to employ the Open and Closed Lists to
keep track of what needs to be done:
Open List: A
Closed List: <empty>
Step
1
Now, let's explore the neighbours of our A node. So far, we are
following in depth first's footsteps:
We remove A from our Open list and add A to our Closed List. A's
neighbours, the B and C nodes, are added to our Open list. They are
added to the end of our Open list, but since our Open list was empty
(after removing A), it's hard to show that in this step.
Our current Open and Closed Lists contain the following data:
Open List: B, C
Closed List: A
Step 2
Here is where things start to diverge from our depth first search method.
We take a look the B node because it appears first in our Open List.
Because B isn't our intended destination, we explore its neighbours:
49
CIT478 ARTIFICIAL INTELLIGENCE
Open List: C, D, E
Closed List: A, B
Step 3
Open List: D, E
Closed List: A, B, C
Step 4
Open List: E
Closed List: A, B, C, D
Step 5
Because our Open list only has one item, we have no choice but to take
a look at node E. Since node E is our destination, we can stop here:
50
CIT478 ARTIFICIAL INTELLIGENCE
Our final versions of the Open and Closed Lists contain the following
data:
4.0 CONCLUSION
5.0 SUMMARY
- Breadth-first search
- Tree Search
- Depth-first search
i. Given a 5-gallon jug and a 2-gallon jug, with the 5-gallon jug
initially full of water and the 2-gallon jug empty, the goal is to fill
the 2-gallon jug with exactly one gallon of water.
ii. 8-Puzzle
Given an initial configuration of eight numbered tiles on a 3 x 3
51
CIT478 ARTIFICIAL INTELLIGENCE
52
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 What is Heuristic?
3.1.1 Examples of Heuristic Function
3.2 Best-first Search
3.2.1 Greedy Search
3.2.2 A* Search
3.2.3 Proof of Admissibility of A*
3.2.4 Proof of Completeness of A*
3.2.5 Properties of Heuristics
3.2.6 Using Multiple Heuristics
3.3 Beam search
3.3.1 Name and Uses
3.3.2 Extensions
3.4 Hill climbing
3.4.1 Mathematical description
3.4.2 Variants
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
53
CIT478 ARTIFICIAL INTELLIGENCE
2.0 OBJECTIVES
54
CIT478 ARTIFICIAL INTELLIGENCE
The first picture shows the current state n, and the second picture the
goal state.
55
CIT478 ARTIFICIAL INTELLIGENCE
Uniform Cost Search is a special case of the best first search algorithm.
The algorithm maintains a priority queue of nodes to be explored. A cost
function f(n) is applied to each node. The nodes are put in OPEN in the
order of their f values. Nodes with smaller f(n) values are expanded
earlier. The generic best first search algorithm is outlined below.
In greedy search, the idea is to expand the node with the smallest
estimated cost to reach the goal.
Greedy algorithms often perform very well. They tend to find good
solutions quickly, although not always optimal ones.
Figure 3 -The straight line distance heuristic estimates for the nodes.
Let us run the greedy search algorithm for the graph given in Figure 2.
The straight line distance heuristic estimates for the nodes are shown in
Figure 3.
57
CIT478 ARTIFICIAL INTELLIGENCE
58
CIT478 ARTIFICIAL INTELLIGENCE
59
CIT478 ARTIFICIAL INTELLIGENCE
60
CIT478 ARTIFICIAL INTELLIGENCE
61
CIT478 ARTIFICIAL INTELLIGENCE
62
CIT478 ARTIFICIAL INTELLIGENCE
63
CIT478 ARTIFICIAL INTELLIGENCE
64
CIT478 ARTIFICIAL INTELLIGENCE
65
CIT478 ARTIFICIAL INTELLIGENCE
Beam search uses breadth-first search to build its search tree. At each
level of the tree, it generates all successors of the states at the current
level, sorting them in increasing order of heuristic
cost.http://en.wikipedia.org/wiki/Beam_search - cite_note-1 However, it
only stores a predetermined number of states at each level (called the
beam width). The greater the beam width, the fewer states are pruned.
With an infinite beam width, no states are pruned and beam search is
identical to breadth-first search. The beam width bounds the memory
required to perform the search. Since a goal state could potentially be
pruned, beam search sacrifices completeness (the guarantee that an
66
CIT478 ARTIFICIAL INTELLIGENCE
The beam width can either be fixed or variable. One approach that uses
a variable beam width starts with the width at a minimum. If no solution
is found, the beam is widened and the procedure is repeated.
The term "beam search" was coined by Raj Reddy, Carnegie Mellon
University, 1976.
3.3.2 Extensions
67
CIT478 ARTIFICIAL INTELLIGENCE
Hill climbing is good for finding a local optimum (a solution that cannot
be improved by considering a neighbouring configuration) but it is not
guaranteed to find the best possible solution (the global optimum) out of
all possible solutions (the search space). The characteristic that only
local optima are guaranteed can be cured by using restarts (repeated
local search), or more complex schemes based on iterations, like iterated
local search, on memory, like reactive search optimization and tabu
search, on memory-less stochastic modifications, like simulated
annealing.
68
CIT478 ARTIFICIAL INTELLIGENCE
3.4.2 Variants
4.0 CONCLUSION
69
CIT478 ARTIFICIAL INTELLIGENCE
5.0 SUMMARY
1. What is A* Search?
2. Consider the following table
A B C D E F G H I J K L M
A 36 61
B 31
C 32 31 80
D 52
E
43
F 122 112
G
H
20
I 45
40
J 36
K 32
L 102
M 0
70
CIT478 ARTIFICIAL INTELLIGENCE
Using the A* algorithm work out a route from town A to town M. Use
the following cost functions.
1. G(n) = The cost of each move as the distance between each town
(shown on map).
2. H(n) = The Straight Line Distance between any town and town
M. These distances are given in the table below.
Provide the search tree for your solution and indicate the order in
which you expanded the nodes. Finally, state the route you would
take and the cost of that route.
71
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Game Tree
3.2 Two-Player Games Search Algorithms
3.2.1 Minimax Search
3.2.2 Alpha-Beta Pruning
3.2.3 Quiecence
3.2.4 Transposition Tables
3.2.5 Limited Discrepancy Search
3.2.6 Intelligent Backtracking
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
72
CIT478 ARTIFICIAL INTELLIGENCE
A game tree is a directed graph whose nodes are positions in a game and
whose edges are moves. The complete game tree for a game is the game
tree starting at the initial position and containing all possible moves
from each position; the complete tree is the same tree as that obtained
from the extensive-form game representation.
The diagram shows the first two levels, or plies, in the game tree for tic-
tac-toe. We consider all the rotations and reflections of positions as
being equivalent, so the first player has three choices of move: in the
center, at the edge, or in the corner. The second player has two choices
for the reply if the first player played in the center, otherwise five
choices. And so on.
The number of leaf nodes in the complete game tree is the number of
possible different ways the game can be played. For example, the game
tree for tic-tac-toe has 26,830 leaf nodes.
can search in the time available. Except for the case of "pathological"
game trees (which seem to be quite rare in practice), increasing the
search depth (i.e., the number of plies searched) generally improves the
chance of picking the best move.
Two-person games can also be represented as and-or trees. For the first
player to win a game there must be a winning move for all moves of the
second player. This is represented in the and-or tree by using disjunction
to represent the first player's alternative moves and using conjunction to
represent all of the second player's moves.
Minimax Search
Alpha-Beta Pruning
Quiecence
Transposition Tables
Limited Discrepancy Search
Intelligent Backtracking
74
CIT478 ARTIFICIAL INTELLIGENCE
Only the labeled nodes are generated by the algorithm, with the heavy
black lines indicating pruning. At the square node MAX is to move,
while at the circular nodes it MIN‘s turn. The search proceeds depth-
first to minimize the memory required, and only evaluates a node when
necessary. First node and f are statically evaluated at 4 and 5,
respectively, and their minimum value, 4 is backed up to their parent
node d. Node h is then evaluated at 3, and hence the value of its parent
node g must be less than or equal to 3, since it is the minimum of 3 and
the unknown value of its right child. Thus, we level node g as <=3. The
value of node c must be 4 then, because it is the maximum of 4 and a
value that is less than or equal to 3. Since we have determined the
minimax value of node c, we do not need to evaluate or even generate
the brother of node h.
The right half of the tree shows an example of deep pruning. After
evaluating the left half of the tree, we know that the value of the root
node a is greater than or equal to four, the minimax value of node b.
Once node q is equated at 1, the value of its parent node nine must be
less than or equal to 1. Since the value of the root is greater than or
75
CIT478 ARTIFICIAL INTELLIGENCE
The idea of quiescence is that the static evaluator should not be applied to
positions whose values are unstable, such as those occurring in the
76
CIT478 ARTIFICIAL INTELLIGENCE
The order in which variables are instantiated can have a large effect on
the size of the search tree. The idea of variable ordering is to order the
variables form most constrained to least constrained. For example, if a
variable has only a single value remaining that is consistent with the
previously instantiated variable, it should be assigned that value
77
CIT478 ARTIFICIAL INTELLIGENCE
4.0 CONCLUSION
78
CIT478 ARTIFICIAL INTELLIGENCE
5.0 SUMMARY
79
CIT478 ARTIFICIAL INTELLIGENCE
80
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Overview of Knowledge Representation
3.1.1 Characteristics
3.1.2 History of Knowledge Representation and
Reasoning
3.2 Knowledge Representation Languages
3.3 Domain Modeling
3.4 Ontological Analysis
3.5 Classic
3.5.1 The Classic Language
3.5.2 Enhancements to Classic
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
83
CIT478 ARTIFICIAL INTELLIGENCE
3.1.1 Characteristics
Many KR methods were tried in the 1970s and early 1980s, such as
heuristic question-answering, neural networks, theorem proving, and
expert systems, with varying success. Medical diagnosis (e.g., Mycin)
was a major application area, as were games such as chess.
85
CIT478 ARTIFICIAL INTELLIGENCE
87
CIT478 ARTIFICIAL INTELLIGENCE
another from First Order Logic (FOL), and as a result are suited for
representing knowledge that doesn't change.(Figure one Simple database
representation) . Different KR systems may be able to deal with non-
monotonic changes in the knowledge being represented, but the basic
assumption has been that change, if present, is the exception rather than
the rule.
88
CIT478 ARTIFICIAL INTELLIGENCE
Encoded in those LISP functions that is not fully accessible. The system
can reason with that knowledge, but not about it; in other words we can
use some attached procedure to compute (or infer) the value of one slot
based on some others, but we cannot ask how that value was obtained.
89
CIT478 ARTIFICIAL INTELLIGENCE
The word ontology means "the study of the state of being." Ontology
describes the states of being of a particular set of things. This
90
CIT478 ARTIFICIAL INTELLIGENCE
The concept definitions set up all the types of objects in the domain. In
object oriented terms this is called the class definitions, and in database
terms these are the entities. There can be three parts to the concept
definitions:
91
CIT478 ARTIFICIAL INTELLIGENCE
3.5 Classic
(defconcept information-filter
(and kbeds-object
(all information-filter-of valid-mail-recipient)
(at-least one information-filter-of)
(all has-filter-condition kbeds-mail-message)
(at-least one has-filter-condition)
(at-most one has-filter-condition)
(all has-filter-action kbeds-filter-action)
(at-least one has-filter-action))
:disjoint kbeds-thing)
individual is created, the modeller explicitly names the concept that the
new individual is an instance of). It is important in Classic because there
is another kind of concept, the defined concept, which Classic actually
does automatically classify and find individuals of. For example, in
figure 3 a simple taxonomy of primitive concepts is shown. Let us
suppose we create a defined concept called vegetarian-mammal as
follows: (and mammal (all
food plant)). Next we create
another defined concept called
fruit-eating-person: (and
person (all food fruit)).
Classic will derive that
vegetarian-mammal subsumes
fruit-eating-person (why?
because mammal subsumes person and plant subsumes fruit). If
we created two individuals, joe and
apple, and tell Classic that they are
instances of person and fruit,
resp., and further tell Classic that
apple is a filler for joe's food
role, Classic will derive that joe is
an instance of fruit-eating-
person (and therefore also
vegetarian-mammal). Again, Classic will never derive that an
individual is an instance of a primitive concept, it must always be told
that.
94
CIT478 ARTIFICIAL INTELLIGENCE
There are two ways for Classic to figure out that it knows all the fillers
for an individual's role. The first way is for it to be told, by closing the
role. When a role is closed on an individual, it tells Classic that there can
be no more filler. In the above example, the user would have to close the
food role on joe in order for Classic to derive that joe is an instance
of fruit-eating-person (Classic always tries to reclassify
individuals when their roles are closed). The second way is for Classic
to derive that a role is closed on an individual if there is an at-most
restriction on the role. For example, if the concept person (or
mammal) additionally had (at-most one food) in its description,
then since joe is told to be an instance of person that restriction
would apply to him, and since he already has one filler in his food role,
and since he can have at most one filler in his food role, he can have
no more and the role is derived to be closed.
The final part of ontology in Classic is the rules. Classic rules come in
two forms, description rules and filler rules. All classic rules have as
their antecedent a named concept, and are fired on an individual when
the individual is classified as an instance of the concept.
The consequent of a classic filler rule is the name of a role and a LISP
function that will be invoked when the rule fires. The function is passed
the individual the rule fired on and the role named in the consequent,
and returns a list of new fillers for that role and individual. One useful
application for filler rules is to create inter-role dependencies. For
example, the concept rectangle has three roles: length, width,
and area. We could define a function for calculating the area in LISP
as follows:
And then define a filler rule: rectangle --> area calculate-area, the filler
for the area role would automatically be generated based on the fillers in
the length and width roles.
3.5.2 Enhancements to Classic
The first extension to Classic was a facility for supporting what some
other representation languages call path grammars or role transitivity
[Fox, Wright, and Adam, 1985]. A very common form of inference in
frame-based representations is one in which the fillers for one role in a
class of individuals can always be found by following the same role
path. For example, an individual representing an article in a journal
might have a role called published-in which is filled with an
individual representing a journal. Journal individuals could have a role
called location which is filled with some string indicating the place
where the journal is physically located. It makes sense that the article
individual should also have a location that is the same as the location of
the journal it is published in, and this can be represented as a path rule.
A path rule, like all Classic rules, has for its antecedent a concept name,
and for its consequent a role and a role path (an ordered list of roles).
When a rule fires on an individual, classic follows the role path to the
end, and fills the role specified in the rule with all the values it finds at
the end of the path. In the journal article example, the path rule would
be: article --> location (published-in location).
An individual of article might be described: (and article
(fills published-in journal-10)), and the journal
individual journal-10: (and journal (fills location
"Shelf 10")). Classic would fire the path rule on the individual of
article and follow the path: the first part of the path is
published-in, which gets us to article-10, and the next part of
the path is location which gets us to the string "Shelf 10." This
value is then derived to be the filler for the location role of the
individual of article. If a particular path ends "early," that is, the
path leads to an intermediate individual that has no fillers for the next
96
CIT478 ARTIFICIAL INTELLIGENCE
role in the path, no fillers are returned for that particular branch of the
path.
The path rule facility was further expanded to allow for the expression
of specialization overrides. A specialization override is a type of
inference in which a value that would normally be derived to fill a role
is blocked if and only if there is already a value filling the role that is
more specialized. The most common example of this is in object-
oriented languages, a class inherits all the methods of its superclass,
except the ones that are already defined by the class.
The next enhancement to Classic was a facility for dumping individuals
into a file; in essence there is no way to save the current state of a classic
knowledge-base. While this may not sound like a significant extension,
there is one aspect of dumping (or, more accurately, of loading) a
knowledge-base that is very intricate: the order in which roles are
closed. When a role is told to be closed on an individual, it means there
can be no more filler for that role - told or derived. However, when
derived role filler depends on filler or fillers in other individuals, the
role cannot be closed until the fillers it depends on are closed. There is
an implicit ordering of role closing based on all the ways Classic can
derive information.
4.0 CONCLUSION
5.0 SUMMARY
97
CIT478 ARTIFICIAL INTELLIGENCE
98
CIT478 ARTIFICIAL INTELLIGENCE
99
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 IPL Programming Language
3.1.1 A taste of IPL
3.1.2 History of Ipl
3.2 Lisp Programming Language
3.2.1 History
3.2.2 Connection to Artificial Intelligence
3.2.3 Areas of Application
3.2.4 Syntax and Semantics
3.3 Prolog Programming Language
3.3.1 History of Prolog
3.3.2 Prolog Syntax and Semantics
3.3.2.1 Data Types
3.3.2.2 Rules and Facts
3.3.2.3 Evaluation
3.3.2.4 Loops and Recursion
3.3.2.5 Negation
3.3.2.6 Examples
3.3.2.7 Criticism
3.3.2.8 Types
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
101
CIT478 ARTIFICIAL INTELLIGENCE
Cell names beginning with a letter are regional, and are absolute
addresses.
Cell names beginning with "9-" are local, and are meaningful
within the context of a single list. One list's 9-1 is independent of
another list's 9-1.
Other symbols (e.g., pure numbers) are internal.
2. A set of cells. Lists are built from several cells holding mutual
references. Cells have several fields:
P, a 3-bit field used for an operation code when the cell is used as
an instruction and unused when the cell is data.
Q, a 3-valued field used for indirect reference when the cell is
used as an instruction and unused when the cell is data.
SYMB, a symbol used as the value in the cell.
102
CIT478 ARTIFICIAL INTELLIGENCE
The name LISP derives from "LISt Processing". Linked lists are one of
Lisp languages' major data structures, and Lisp source code is itself
made up of lists. As a result, Lisp programs can manipulate source code
as a data structure, giving rise to the macro systems that allow
programmers to create new syntax or even new domain-specific
languages embedded in Lisp.
The interchange ability of code and data also gives Lisp its instantly
recognizable syntax. All program code is written as s-expressions, or
parenthesized lists. A function call or syntactic form is written as a list
with the function or operator's name first, and the arguments following;
for instance, a function f that takes three arguments might be called
using (f arg1 arg2 arg3).
103
CIT478 ARTIFICIAL INTELLIGENCE
3.2.1 History
IBM was one of the first companies interested in AI in the 1950s. At the
same time, the FORTRAN project was still going on. Because of the
high cost associated with producing the first FORTRAN compiler, they
decided to include the list processing functionality into FORTRAN. The
FORTRAN List Processing Language (FLPL) was designed and
implemented as an extension to FORTRAN.
Since 2000
105
CIT478 ARTIFICIAL INTELLIGENCE
Since its inception, Lisp was closely connected with the artificial
intelligence research community, especially on PDP-10http://en.
wikipedia.org/wiki/Lisp_(programming_language)- cite_note-5 systems.
Lisp was used as the implementation of the programming language
Micro Planner which was used in the famous AI system SHRDLU. In
the 1970s, as AI research spawned commercial offshoots, the
performance of existing Lisp systems became a growing issue.
Below is a short list of the areas where Lisp has been used:
Artificial Intelligence
- AI Robots
- Computer Games (Craps, Connect-4, BlackJack)
- Pattern Recognition
Symbolic expressions
106
CIT478 ARTIFICIAL INTELLIGENCE
Prolog has its roots in first-order logic, a formal logic, and unlike many
other programming languages, Prolog is declarative: the program logic
is expressed in terms of relations, represented as facts and rules. A
computation is initiated by running a query over these relations.
Prolog was one of the first logic programming languages, and remains
among the most popular such languages today, with many free and
commercial implementations available. While initially aimed at natural
language processing, the language has since then stretched far into other
areas like theorem proving, expert systems, games, automated
107
CIT478 ARTIFICIAL INTELLIGENCE
Prolog's single data type is the term. Terms are atoms, numbers,
variables or compound terms.
109
CIT478 ARTIFICIAL INTELLIGENCE
Head: - Body.
Clauses with empty bodies are called facts. An example of a fact is:
cat(tom).
which is equivalent to the rule?
cat(tom) :- true.
The built-in predicate true/0 is always true.
Given the above fact, one can ask:
is tom a cat?
?- cat(tom).
Yes
what things are cats?
?- cat(X).
X = tom
Clauses with bodies are called rules. An example of a rule is:
animal(X):- cat(X).
If we add that rule and ask what things are animals?
?- animal(X).
X = tom
110
CIT478 ARTIFICIAL INTELLIGENCE
3.3.2.3 Evaluation
mother_child(trude, sally).
father_child(tom, sally).
father_child(tom, erica).
father_child(mike, tom).
?- father_child(Father, Child).
enumerates all valid answers on backtracking.
Notice that with the code as stated above, the query?- sibling(sally,
sally). Also succeeds. One would insert additional goals to describe the
relevant restrictions, if desired.
3.3.2.5 Negation
3.3.2.6 Examples
?-
3.3.2.7 Criticism
3.3.2.8 Types
4.0 CONCLUSION
IPL, Lisp and Prolog considered in this unit are among other specialized
programming languages for artificial intelligence.
5.0 SUMMARY
113
CIT478 ARTIFICIAL INTELLIGENCE
114
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 History of Natural Language Processing (NLP)
3.2 NLP using Machine Learning
3.3 Major Tasks in NLP
3.4 Statistical Natural Language Processing
3.5 Evaluating of Natural Language Processing
3.5.1 Objectives
3.5.2 Sort History of Evaluation in NLP
3.5.3 Different Types of Evaluation
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
115
CIT478 ARTIFICIAL INTELLIGENCE
The history of NLP generally starts in the 1950s, although work can be
found from earlier periods. In 1950, Alan Turing published his famous
article "Computing Machinery and Intelligence" which proposed what is
now called the Turing test as a criterion of intelligence. This criterion
depends on the ability of a computer program to impersonate a human in
a real-time written conversation with a human judge, sufficiently well
that the judge is unable to distinguish reliably — on the basis of the
conversational content alone — between the program and a real human.
The Georgetown experiment in 1954 involved fully automatic
translation of more than sixty Russian sentences into English. The
authors claimed that within three or five years, machine translation
would be a solved problem. However, real progress was much slower,
and after the ALPAC report in 1966, which found that ten years long
research had failed to fulfill the expectations, funding for machine
translation was dramatically reduced. Little further research in machine
translation was conducted until the late 1980s, when the first statistical
machine translation systems were developed.
120
CIT478 ARTIFICIAL INTELLIGENCE
In some cases, sets of related tasks are grouped into subfields of NLP
that are often considered separately from NLP as a whole. Examples
include:
Stemming
Text simplification
Text-to-speech
Text-proofing
Natural language search
Query expansion
Truecasing
123
CIT478 ARTIFICIAL INTELLIGENCE
3.5.1 Objectives
124
CIT478 ARTIFICIAL INTELLIGENCE
BioCreative
Message Understanding Conference
Technolangue/Easy
Text Retrieval Conference
Evaluation exercises on Semantic Evaluation (SemEval)
4.0 CONCLUSION
5.0 SUMMARY
126
CIT478 ARTIFICIAL INTELLIGENCE
127
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 What is an Expert System?
3.1.1 Comparison to Problem-Solving Systems
3.2 Knowledge Base
3.2.1 Types of Knowledge Base
3.3. Inference Engine
3.3.1 Architecture
3.3.2 The Recognize-Act Cycle
3.3.3 Data-Driven Computation versus Procedural Control
3.3.4 Inference Rules
3.3. 5 Chaining
3.4 Certainty Factors
3.5 Real-Time Adaption
3.5.1 Ability to make Relevant Inquiries
3.7 Knowledge Engineering
3.8 General Types of Problems Solved
3.9 Different Types of Expert System
3.10 Examples of Applications
3.11 Advantages
3.12 Disadvantages
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading
1.0 INTRODUCTION
2.0 OBJECTIVES
Programs are the way in which the problem related expertise is coded.
In traditional applications, problem-related expertise is encoded in both
program and data structures. In the expert system approach all of the
problem expertise is encoded mostly in data structures.
problem domain (taxes) and processes the rules without regard to the
problem area they describe.
3.3.1 Architecture
In the first state, match rules, the inference engine finds all of the rules
that are satisfied by the current contents of the data store. When rules are
in the typical condition-action form, this means testing the conditions
against the working memory. The rule matching that are found are all
candidates for execution: they are collectively referred to as the conflict
set. Note that the same rule may appear several times in the conflict set
132
CIT478 ARTIFICIAL INTELLIGENCE
This rule is what gives expert systems the ability to find solutions to
diagnostic and prescriptive problems. An example of an inference rule
is:
3.3.5 Chaining
Forward chaining starts with the data available and uses the inference
rules to extract more data until a desired goal is reached. An inference
engine using forward chaining searches the inference rules until it finds
one in which the if clause is known to be true . It then concludes the
then clause and adds this information to its data. It continues to do this
until a goal is reached. Because the data available determines which
inference rules are used, this method is also classified as data driven.
Backward chaining starts with a list of goals and works backwards to
see if there is data which will allow it to conclude any of these goals. An
inference engine using backward chaining would search the inference
rules until it finds one which has a then clause that matches a desired
goal. If the if clause of that inference rule is not known to be true, then it
is added to the list of goals. For example, suppose a rule base contains:
Suppose a goal is to conclude that Fritz hops. Let X = "Fritz". The rule
base would be searched and rule (3) would be selected because its
conclusion (the then clause) matches the goal. It is not known that Fritz
is a frog, so this "if" statement is added to the goal list. The rule base is
again searched and this time rule (1) is selected because its then clause
matches the new goal just added to the list. This time, the if clause (Fritz
is green) is known to be true and the goal that Fritz hops is concluded.
Because the list of goals determines which rules are selected and used,
this method is called goal driven.
In real world applications, few facts are known with absolute certainty
and the opposite of a given statement may be more likely to be true
("Green things in the pet store are not frogs, with the probability or
confidence factor of 99% in my pet store survey"). Thus it is often
useful when building such systems to try and prove both the goal and
the opposite of a given goal to see which is more likely.
The inference engine must track the times of each data input and each
conclusion, and propagate new information as it arrives. It must ensure
that all conclusions are still current. Facilities for periodically scanning
data, acquiring data on demand, and filtering noise, become essential
parts of the overall system. Facilities to reason within a fixed deadline
are important in many of these applications.
Also, the user may choose not to respond to every question, forcing the
expert system to function in the presence of partial information.
137
CIT478 ARTIFICIAL INTELLIGENCE
138
CIT478 ARTIFICIAL INTELLIGENCE
Typically, the problems to be solved are of the sort that would normally
be tackled by a professional, such as a medical professional in the case
of clinical decision support systems. Real experts in the problem domain
(which will typically be very narrow, for instance "diagnosing skin
conditions in teenagers") are asked to provide "rules of thumb" on how
they evaluate the problem — either explicitly with the aid of
experienced systems developers, or sometimes implicitly, by getting
such experts to evaluate test cases and using computer programs to
examine the test data and derive rules from that (in a strictly limited
manner). Generally, expert systems are used for problems for which
there is no single "correct" solution which can be encoded in a
conventional algorithm — one would not write an expert system to find
the shortest paths through graphs, or to sort data, as there are simpler
ways to do these tasks.
3.11 Advantages
3.12 Disadvantages
5.0 SUMMARY
UNIT 2 ROBOTICS
142
CIT478 ARTIFICIAL INTELLIGENCE
CONTENTS
1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 What is a Robot
3.1.1 Types of Robot
3.1.2 History of Robots
3.2 Components of Robots
3.2.1 Power Source
3.2.2 Actuation
3.2.3.1 Electric Motors
3.2.2.2 Linear Actuators
3.2.2.3 Series Elastic Actuators
3.2.2.4 Air Muscles
3.2.2.5 Muscle Wire
3.2.2.6 Electro Active Polymers
3.2.2.7 Pies Motors
3.2.2.8 Elastic Annotates
3.3 Sensing
3.3.1 Touch
3.3.2 Vision
3.4 Manipulation
3.4.1 Mechanical Grippers
3.4.2 Vacuum Grippers
3.4.3 General Purpose Effectors
3.5 Locomotion
3.5.1 Rolling Robots
3.5.1.1 Two-Wheeled Balancing Robots
3.5.1.2 One-Wheeled Balancing Robots
3.5.1.3 Spherical Orb Robots
3.5.1.4 Six-Wheeled Robots
3.5.1.5 Tracked Robots
3.5.2 Walking Applied to Robots
3.5.2.1 ZMP Technique
3.5.2.2 Hopping
3.5.2.3 Dynamic Balancing (Controlled Falling)
3.5.2.4 Passive Dynamics
3.5.3 Other methods of Locomotion
3.5.3.1 Flying
3.5.3.2 Snaking
3.5.3.3 Skating
3.5.3.4 Climbing
3.5.3.5 Swimming (like a fish)
143
CIT478 ARTIFICIAL INTELLIGENCE
1.0 INTRODUCTION
2.0 OBJECTIVES
The word robotics was derived from the word robot, which was
introduced to the public by Czech writer Karel Čapek in his play R.U.R.
(Rossum's Universal Robots), which premiered in 1921.
144
CIT478 ARTIFICIAL INTELLIGENCE
According to the Oxford English Dictionary, the word robotics was first
used in print by Isaac Asimov, in his science fiction short story "Liar!",
published in May 1941 in Astounding Science Fiction. Asimov was
unaware that he was coining the term; since the science and technology
of electrical devices is electronics, he assumed robotics already referred
to the science and technology of robots. In some of Asimov's other
works, he states that the first use of the word robotics was in his short
story Runaround (Astounding Science Fiction, March 1942). However,
the word robotics appears in "Liar!"
The word robot was introduced to the public by the Czech writer Karel
Čapek in his play R.U.R. (Rossum's Universal Robots), published in
1920. The play begins in a factory that makes artificial people called
robots creatures who can be mistaken for humans – though they are
closer to the modern ideas of androids. Karel Čapek himself did not coin
the word. He wrote a short letter in reference to an etymology in the
Oxford English Dictionary in which he named his brother Josef Čapek
as its actual originator.
impersonator") was the first and perhaps the most memorable depiction
of a robot ever to appear on film was played by German actress Brigitte
Helm) in Fritz Lang's film Metropolis.
In 1942 the science fiction writer Isaac Asimov formulated his Three
Laws of Robotics and, in the process of doing so, coined the word
"robotics" (see details in "Etymology" section below).
Fully autonomous robots only appeared in the second half of the 20th
century. The first digitally operated and programmable robot, the
Unimate, was installed in 1961 to lift hot pieces of metal from a die
casting machine and stack them. Commercial and industrial robots are
widespread today and used to perform jobs more cheaply, or more
accurately and reliably, than humans. They are also employed in jobs
which are too dirty, dangerous, or dull to be suitable for humans. Robots
are widely used in manufacturing, assembly, packing and packaging,
transport, earth and space exploration, surgery, weaponry, laboratory
research, safety, and the mass production of consumer and industrial
goods.
147
CIT478 ARTIFICIAL INTELLIGENCE
washing
automaton,[1
1] automated
moving
peacocks[12]
Mechanical Leonardo da
1495 Designs for a humanoid robot
knight Vinci
Mechanical duck that was able to Digesting Jacques de
1738
eat, flap its wings, and excrete Duck Vaucanson
Nikola Tesla demonstrates first Teleautomat Nikola
1898
radio-controlled vessel. on Tesla
Rossum's
First fictional automatons called
1921 Universal Karel Čapek
"robots" appear in the play R.U.R.
Robots
Westinghou
Humanoid robot exhibited at the
1930s Elektro se Electric
1939 and 1940 World's Fairs
Corporation
Simple robots exhibiting Elsie and William
1948
biological behaviors Elmer Grey Walter
First commercial robot, from the
Unimation company founded by
George
1956 George Devol and Joseph Unimate
Devol
Engelberger, based on Devol's
patents
George
1961 First installed industrial robot. Unimate
Devol
First palletizing
Fuji Yusoki
1963 robothttp://www.ask.com/wiki/Ro Palletizer
Kogyo
botics - cite_note-14
KUKA
First industrial robot with six
1973 Famulus Robot
electromechanically driven axes
Group
Programmable universal
Victor
1975 manipulation arm, a Unimation PUMA
Scheinman
product
148
CIT478 ARTIFICIAL INTELLIGENCE
3.2 Components
3.2.2 Actuation
149
CIT478 ARTIFICIAL INTELLIGENCE
Actuators are like the "muscles" of a robot, the parts which convert
stored energy into movement. By far the most popular actuators are
electric motors that spin a wheel or gear, and linear actuators that
control industrial robots in factories. But there are some recent advances
in alternative types of actuators, powered by electricity, chemicals, or
compressed air:
The vast majority of robots use electric motors, often brushed and
brushless DC motors in portable robots or AC motors in industrial
robots and CNC machines.
3.3 Sensing
3.3.1 Touch
Current robotic and prosthetic hands receive far less tactile information
than the human hand. Recent research has developed a tactile sensor
array that mimics the mechanical properties and touch receptors of
human fingertips. The sensor array is constructed as a rigid core
surrounded by conductive fluid contained by an elastomeric skin.
Electrodes are mounted on the surface of the rigid core and are
connected to an impedance-measuring device within the core. When the
artificial skin touches an object the fluid path around the electrodes is
deformed, producing impedance changes that map the forces received
from the object. The researchers expect that an important function of
such artificial fingertips will be adjusting robotic grip on held objects.
Scientists from several European countries and Israel developed a
prosthetic hand in 2009, called SmartHand, which functions like a real
one—allowing patients to write with it, type on a keyboard, play piano
and perform other fine movements. The prosthesis has sensors which
enable the patient to sense real feeling in its fingertips.
151
CIT478 ARTIFICIAL INTELLIGENCE
3.3.2 Vision
3.4 Manipulation
Robots which must work in the real world require some way to
manipulate objects; pick up, modify, destroy, or otherwise have an
effect. Thus the "hands" of a robot are often referred to as end effectors,
while the "arm" is referred to as a manipulator. Most robot arms have
replaceable effectors, each allowing them to perform some small range
of tasks. Some have a fixed manipulator which cannot be replaced,
while a few have one very general purpose manipulator, for example a
humanoid hand.
For the definitive guide to all forms of robot end-effectors, their design,
and usage consult the book "Robot Grippers".
152
CIT478 ARTIFICIAL INTELLIGENCE
pick up and let go of a range of small objects. Fingers can for example
be made of a chain with a metal wire run through it. See Shadow Hand.
Vacuum grippers are very simple astrictive devices, but can hold very
large loads provided the prehension surface is smooth enough to ensure
suction.
Pick and place robots for electronic components and for large objects
like car windscreens, often use very simple vacuum grippers.
Some advanced robots are beginning to use fully humanoid hands, like
the Shadow Hand, MANUS, and the Schunk hand. These highly
dexterous manipulators with as many as 20 degrees of freedom and
hundreds of tactile sensors.
3.5 Locomotion
153
CIT478 ARTIFICIAL INTELLIGENCE
Several attempts have been made in robots that are completely inside a
spherical ball, either by spinning a weight inside the ball, or by rotating
the outer shells of the sphere. These have also been referred to as an orb
bot or a ball bot.
Using six wheels instead of four wheels can give better traction or grip
in outdoor terrain such as on rocky dirt or grass.
154
CIT478 ARTIFICIAL INTELLIGENCE
The Zero Moment Point (ZMP) is the algorithm used by robots such as
Honda's ASIMO. The robot's onboard computer tries to keep the total
inertial forces (the combination of earth's gravity and the acceleration
and deceleration of walking), exactly opposed by the floor reaction force
(the force of the floor pushing back on the robot's foot). In this way, the
two forces cancel out, leaving no moment (force causing the robot to
rotate and fall over). However, this is not exactly how a human walks,
and the difference is obvious to human observers, some of whom have
pointed out that ASIMO walks as if it needs the lavatory. ASIMO's
walking algorithm is not static, and some dynamic balancing is used (see
below). However, it still requires a smooth surface to walk on.
155
CIT478 ARTIFICIAL INTELLIGENCE
3.5.2.2 Hopping
Several robots, built in the 1980s by Marc Raibert at the MIT Leg
Laboratory, successfully demonstrated very dynamic walking. Initially,
a robot with only one leg, and a very small foot, could stay upright
simply by hopping. The movement is the same as that of a person on a
pogo stick. As the robot falls to one side, it would jump slightly in that
direction, in order to catch itself. Soon, the algorithm was generalised to
two and four legs. A bipedal robot was demonstrated running and even
performing somersaults. A quadruped was also demonstrated which
could trot, run, pace, and bound. For a full list of these robots, see the
MIT Leg Lab Robots page.
156
CIT478 ARTIFICIAL INTELLIGENCE
3.5.3.1 Flying
Figure 8: Two robot snakes. Left one has 64 motors (with 2 degrees
of freedom per segment), the right one 10.
3.5.3.2 Snaking
3.5.3.3 Skating
157
CIT478 ARTIFICIAL INTELLIGENCE
3.5.3.4 Climbing
Several different approaches have been used to develop robots that have
the ability to climb vertical surfaces. One approach mimicks the
movements of a human climber on a wall with protrusions; adjusting the
center of mass and moving each limb in turn to gain leverage. An
example of this is Capuchin, built by Stanford University, California.
Another approach uses the specialised toe pad method of wall-climbing
geckoes, which can run on smooth surfaces such as vertical glass.
Examples of this approach include Wallbot and Stickybot. China's
"Technology Daily" November 15, 2008 reported New Concept Aircraft
(ZHUHAI) Co. Ltd. Dr. Li Hiu Yeung and his research group have
recently successfully developed the bionic gecko robot "Speedy
Freelander". According to Dr. Li introduction, this gecko robot can
rapidly climbing up and down in a variety of building walls, ground and
vertical wall fissure or walking upside down on the ceiling, it is able to
adapt on smooth glass, rough or sticky dust walls as well as the various
surface of metallic materials and also can automatically identify
obstacles, circumvent the bypass and flexible and realistic movements.
Its flexibility and speed are comparable to the natural gecko. A third
approach is to mimick the motion of a snake climbing a pole.
158
CIT478 ARTIFICIAL INTELLIGENCE
159
CIT478 ARTIFICIAL INTELLIGENCE
Other hurdles exist when allowing the robot to use voice for interacting
with humans. For social reasons, synthetic voice proves suboptimal as a
communication medium, making it necessary to develop the emotional
component of robotic voice through various techniques.
3.7.3 Gestures
One can imagine, in the future, explaining to a robot chef how to make a
pastry, or asking directions from a robot police officer. In both of these
cases, making hand gestures would aid the verbal descriptions. In the
first case, the robot would be recognizing gestures made by the human,
and perhaps repeating them for confirmation. In the second case, the
robot police officer would gesture to indicate "down the road, then turn
right". It is likely that gestures will make up a part of the interaction
between humans and robots. A great many systems have been developed
to recognize human hand gestures.
160
CIT478 ARTIFICIAL INTELLIGENCE
3.7.6 Personality
161
CIT478 ARTIFICIAL INTELLIGENCE
3.8 Control
At longer time scales or with more sophisticated tasks, the robot may
need to build and reason with a "cognitive" model. Cognitive models try
to represent the robot, the world, and how they interact. Pattern
recognition and computer vision can be used to track objects. Mapping
techniques can be used to build maps of the world. Finally, motion
planning and other artificial intelligence techniques may be used to
figure out how to act. For example, a planner may figure out how to
achieve a task without hitting obstacles, falling over, etc.
162
CIT478 ARTIFICIAL INTELLIGENCE
Task-level autonomy. The operator specifies only the task and the
robot manages itself to complete it.
Full autonomy. The machine will create and complete all its tasks
without human interaction.
165
CIT478 ARTIFICIAL INTELLIGENCE
3.10.2 Certification
3.11 Employment
Some analysts, such as Martin Ford, argue that robots and other forms of
automation will ultimately result in significant unemployment as
machines begin to match and exceed the capability of workers to
perform most jobs. At present the negative impact is only on menial and
repetitive jobs, and there is actually a positive impact on the number of
jobs for highly skilled technicians, engineers, and specialists. However,
these highly skilled jobs are not sufficient in number to offset the greater
decrease in employment among the general population, causing
structural unemployment in which overall (net) unemployment rises.
describe the future due to shifts in the parameter values that shape the
context.
4.0 CONCLUSION
Robotics is an essential component in any modern manufacturing
environment. As factories increase their use of robots, the number of
robotics related jobs grow and have been observed to be on a steady rise.
As robotics and artificial intelligence develop further, some worry even
many skilled jobs may be threatened.
5.0 SUMMARY
In this unit, you learnt: