1. Principles of Artificial
Intelligence
Dr. Amelia Ritahani Ismail
Department of Computer Science
Kulliyyah of ICT
03-61965642
amelia@iium.edu.my
http://staff.iium.edu.my/amelia
3. Who am I?
Members of Intelligent Systems Research group.
My area is mainly biologically inspired computing:
Artificial Immune Systems, Swarm Intelligence,
Swarm Robotics and Machine Learning (including
neural networks, genetic algorithm, swarm
kohonen, svm, etc ..)
FYP Projects
Rainfall prediction with machine learning
Modelling and Simulation of Immune Systems for the
algorithm development
4. What have you done before
semester break and what I
you have to do with me
Assignment – 2 ( 1 or 2 more programming
assignments)
Quiz – 1 ( 2 more )
Mid Term - Done
1 group project – Begins next week
Exercise 12 – Done (no more)
5. CSC 3301 Schedule for Semester 2 2013/14
Wk # Start date Lecture/Tutorial Assignment/Quizzes
1
04/02/2014
Chapter 1: Artificial Intelligence, its roots
and scope06/02/2014 Class Exercise
2
11/02/2014
Chapter 2: The Predicate Calculus
Class Exercise
13/02/2014 Assign 1 (Chapter 1-2)
3
18/02/2014
Chapter 3: Structures and strategies for
state space search
20/02/2014
Class Exercise
4
25/02/2014
27/02/2014
Chapter 4: Heuristics search
Test 1 (Chapter 1, 2, 3)
5
04/03/2014 Class Exercise
06/03/2014
Chapter 14: Languages and
Programming Techniques (PROLOG)
Class Exercise
6
11/03/2014 Assign 2 (Chapter 3, 4, 14)
13/03/2014
Mid-term Exam (Chapter
1,2,3,4,14)
Friday, 14 March 2014 (10 am –
12 pm)
7
18/03/2014
Chapter 15: Natural Language
Processing
Class Exercise
20/03/2014
8 25/03/2014
SEMESTER BREAK
27/03/2014
6. CSC 3301 Schedule for Semester 2 2013/14
Wk # Start date Lecture/Tutorial Assignment/Quizzes
9
01/04/2014 Chapter 16: Robotics and Intelligent
Agent03/04/2014
10
08/04/2014 Chapter 16: Robotics and Intelligent
Agent
Group Project discussion
10/04/2014 Assign 3 (Chapter: TBA)
11
15/04/2014 Chapter 8 : Strong Method Problem
Solving (Pt 2) (Expert Systems)17/04/2014 Group Project proposal
12
22/04/2014 Chapter 12: Machine Learning (Genetic
and Emergent)
Test 2 (Chapter: TBA)
24/04/2014
13
29/04/2014 Chapter 11: Machine Learning
(Connectionist)01/05/2014 Assign 4 (Chapter: TBA)
14
06/05/2014
PROJECT
Test 3 (Chapter: TBA)
08/05/2014
15
13/05/2014
PROJECT PRESENTATION & ASSESSMENT Group Project
15/05/2014
16
20/05/2014
REVISION WEEK
Pr
22/05/2014
8. Defining AI
“We call a program for a computer artificially
intelligent if it does something which, when
done by a human being, will be thought to
require human intelligence.”
“Artificial intelligence is the study of
computations that make it possible to
perceive, reason, and act.”
9. Applications of AI
The aim of AI is the development of
paradigms or algorithms that cause
machines to perform tasks that
apparently require cognition or
perception when performed by humans.
10. Types?
Traditional AI is based around:
the ideas of logic,
rule systems,
linguistics, and
the concept of rationality.
Its roots are programming languages such as Lisp and Prolog.
Example: Expert systems are the largest successful example
of this paradigm.
An expert system consists of a detailed knowledge base and
a complex rule system to utilize it. Such systems have been
used for such things as medical diagnosis support and credit
checking systems.
Mainly uses symbolic
approached:
the knowledge can be
decomposed into symbols
(e.g. a concept in a semantic
net or a proposition in a logic
representation) which each
have a particular meaning.
11. Types?
Computational Intelligence (CI) - CI makes use of
subsymbolic, i.e. numerical, knowledge-
representation and -processing.
Neural Network
Genetic Algorithm
Fuzzy Sets
Bayesian reasoning
Machine Learning
Example
In CI a meaning or specific
part of the knowledge
cannot be clearly located.
The knowledge is
represented in the whole
state of the system. The
system produces its own
meanings that cannot be
understood by humans.
13. “In which we discuss the
nature of agents, perfect or
otherwise, the diversity of
environments and the resulting
menagerie of agent types.”
14. Outline
Intelligent Agents
Agents and environments
The concept of rationality
The nature of environments - PEAS (Performance
measure, Environment, Actuators, Sensors)
Environment types
The structure of agents
Agent types
Robots
15. Software Agent
Which operate within the computers
Mail Handling Agent
http://www.sharewareriver.com/product.php?id=4134
Information Agent
http://www.theeasybee.com/
Physical Agent – Robots
Which operate in the physical world and can perceive and manipulate
objects in that world
http://www.irobot.com/
http://www.irobot.com/sp.cfm?pageid=124
What is an agent?
16. Agents and
environments An agent is anything that can be viewed as
perceiving its environment through sensors and
acting upon that environment through
actuators.
Example # 1: A HUMAN agent has eyes, ears
and other organs for sensors; and hands, legs
and other body parts for actuators.
Example # 2: A ROBOTIC agent have cameras
and infrared range finders for sensors; and
various motors for actuators.
17. Agent
Agents are autonomous (self-governing,
independent) or semi-autonomous.
Agent has certain responsibilities in problem solving
with little or no knowledge.
Agents are “situated”
Each agent is sensitive to its surroundings
environment.
Agents are interactional
They form a collection of individual that cooperate on
a particular tasks. (maybe seen as a society)
The society of agent is structured.
Although every agent have its own unique
environment and skill set, they will still coordinate
with other agents in the overall problem solving.
19. Agents and
environments
Agent function is a function that specifies the agent’s action
in response to every possible percept sequence and can
reside in an agent program. In other words; it maps from
percept histories to actions:
[f: P* -> A]
Agent program is a program that, combine with a machine
architecture, implements an agent function. In other words; it
runs on the physical architecture to produce f.
E.g.: Vacuum-cleaner world (Slide # 20)
20. The Concept of
Rationality
A rational agent is one that does the right action; based on what it
can perceive and the actions it can perform.
Doing the right action can be interpreted as the one that will cause
the agent to be most successful.
Performance measure: An objective criterion for success of an
agent’s behavior.
E.g.: Performance measure of a vacuum-cleaner agent could be
the amount of dirt cleaned up, amount of time taken, amount of
electricity consumed, amount of noise generated, etc.
21. The Concept of Rationality
What is rational at any given time depends on four
things:
The performance measure that defines the criterion of
success
The agent’s prior knowledge of the environment
The actions that the agent can perform
The agent’s percept sequence to date
This leads to the definition of a rational agent: For each
possible percept sequence, a rational agent should
select an action that is expected to:
Maximize its performance measure
Given the evidence provided by the percept sequence, and
22. The Concept of Rationality
Rationality is distinct from omniscience (all-knowing with infinite
knowledge).
An omniscience agent knows the actual outcome of its actions and
can act accordingly; but this is impossible in reality.
Rational agent can perform actions in order to modify future
percepts so as to obtain useful information (information gathering,
exploration).
Rational agent is autonomous if its behavior is determined by its
own experience (with ability to learn and adapt).
23. The nature of
environments -
PEAS
Now we are almost ready to think about building
rational agents.
First, however is to think about task
environments or in acronym - PEAS:
Performance measure, Environment, Actuators,
Sensors
In designing an agent, the first step must always
be to specify the task environment as fully as
possible.
25. The nature of environments -
PEAS
PEAS – Example #2: Agent: Interactive
English tutor:
Performance measure: Maximize student's
score on test
Environment: Set of students
Actuators: Screen display (exercises,
suggestions, corrections)
Sensors: Keyboard
26. The nature of
environments - PEAS
PEAS – Example #3: Agent: Medical
diagnosis system:
Performance measure: Healthy patient,
minimize costs, lawsuits
Environment: Patient, hospital, staff
Actuators: Screen display (questions, tests,
diagnoses, treatments, referrals)
Sensors: Keyboard (entry of symptoms,
findings, patient’s answer)
27. The nature of
environments - PEAS
PEAS – Example #4: Agent: Part-picking
robot :
Performance measure: Percentage of parts in
correct bins
Environment: Conveyor belt with parts, bins
Actuators: Jointed arm and hand
Sensors: Camera, joint angle sensors
29. PEAS
Internet Shopping agent?
Performance Measure: price, quality,
appropriateness, efficienct
Environment: WWW sites
Actuators: display to uses; follow URL, fill in the form
Sensors: HTML pages (text, graphic, sensors)
30. Properties of Task
Environment
Fully observable (vs. partially observable): An agent's sensors give
it access to the complete state of the environment at each point in
time.
Vacuum agent (fully or partially?)
Deterministic (vs. stochastic): The next state of the environment is
completely determined by the current state and the action executed
by the agent. (If the environment is deterministic except for the
actions of other agents, then the environment is strategic).
Taxi driving
31. Properties of Task
Environment
Episodic (vs. sequential): The agent's experience is divided into
atomic "episodes" (each episode consists of the agent perceiving
and then performing a single action), and the choice of action in
each episode depends only on the episode itself.
Chess
Taxi driver
Static (vs. dynamic): The environment is unchanged while an agent
is deliberating. (The environment is semidynamic if the
environment itself does not change with the passage of time but the
agent's performance score does).
Taxi driver
Chess
32. Properties of Task
Environment
Discrete (vs. continuous): A limited number of distinct,
clearly defined percepts and actions.
Chess
Taxi drving
Single agent (vs. multiagent): An agent operating by
itself in an environment.
Chess
34. Environment types
Task
Environment
Observable Deterministic Episodic Static Discrete Agents
Crossword
puzzle
Fully Deterministic Sequential Static Discrete Single
Chess with a
clock
Fully Strategic Sequential Semi Discrete Multi
Taxi Driving Partially Stochastic Sequential Dynamic Continuous Multi
Medical
Diagnosis
Partially Stochastic Sequential Dynamic Continuous Single
35. The structure of agents
The job of AI is to design the agent program that
implements the agent function mapping percepts to
actions.
Let’s assume that this program will run on some sort of
computing device with physical sensors and actuators –
that is called architecture:
Agent = Architecture + Program
One agent function (or a small equivalence class) is
rational and its aim is to find a way to implement the
rational agent function concisely.
36. The structure of
agents
The agent program will take the current
percept as input from sensors and return an
action to the actuators.
It just take the current percept as input
because nothing more is available from the
environment.
Agent program Agent function
Takes the current percept Takes the entire percept history
37. The structure of agents
Example: in Vacuum-cleaner world, we may have:
Percepts: location and contents, e.g.: [A, Dirty]
Actions: Left, Right, Clean, NoOp
Vacuum-cleaner world; with just 2 locations
38. The structure of
agents
A Vacuum-cleaner Agent
Percept Sequence Action
[A; Clean] Right
[A; Dirty] Clean
[B; Clean] Left
[B; Dirty] Clean
[A; Clean], [A; Clean] Right
[A; Clean], [A; Dirty] Clean
39. The structure of agents
Agent program for a Vacuum-cleaner agent.
function Reflex-Vacuum-Agent ([location, status])
returns an action
if status = Dirty then return Clean
else if location = A then return
Right
else if location = B then return Left
40. Agent types
There are 4 basic types:
Simple reflex agents
Model-based reflex agents
Goal-based agents
Utility-based agents
The simplest kind is the simple reflex agent.
These agents select actions on the basis of
the current percept, ignoring the rest of the
percept history (e.g.: Vacuum-cleaner agent
program)
41. Agent types
Simple reflex agents
Drawbacks: It only work in general if the environment is fully observable
42. Agent types
Model-based reflex agents
Difference: The agent keeps track of an internal state, i.e. the internal model of the
world.
43. Agent types
Goal-based agents
It keeps track of the world state as well as a set of goals it is trying to achieve,
and chooses an action that will (eventually) led to the achievement of its goals.
44. Agent types
Utility-based agents
It uses a model of the world, along with a utility function that measures its
preferences among states of the world. Then it chooses the action that leads
to the best expected utility, where expected utility is computed by averaging
over all possible outcome states, weighted by the probability of the outcomes.
45. Agent types
Learning agent: lead agent programs to come into
being.
Learning element: responsible for making
improvements
Performance element: responsible for selecting
external actions
Critic: feedback that provide information on how the
agent is doing and determines how the performance
element should be modified to do better in the future.
Problem generator: responsible for suggesting actions
that will lead to new and informative experiences.
48. Introduction
Robot:
A robot is a machine designed to execute one or more
tasks repeatedly, with speed and precision. There are as
many different types of robots as there are tasks for them
to perform.
A robot can be controlled by a human operator, sometimes
from a great distance. But most robots are controlled by
computer, and fall into either of these two categories:
autonomous robots and insect robots ( or swarm
robots).
An autonomous robot acts as a stand-alone system,
complete with its own computer (called the controller).
Insect robots work in fleets ranging in number from a few
to thousands, with all fleet members under the supervision
of a single controller. The term insect arises from the
similarity of the system to a colony of insects, where the
individuals are simple but the fleet as a whole can be
sophisticated.
49. Introduction
Robots are sometimes grouped according to the time
frame in which they were first widely used.
First-generation robots date from the 1970s and consist of
stationary, nonprogrammable, electromechanical devices
without sensors.
Second-generation robots were developed in the 1980s
and can contain sensors and programmable controllers.
Third-generation robots were developed between
approximately 1990 and the present. These machines can
be stationary or mobile, autonomous or insect type, with
sophisticated programming, speech recognition and/or
synthesis, and other advanced features.
Fourth-generation robots are in the research-and-
development phase, and include features such as artificial
intelligence, self-replication, self assembly, and nanoscale
size (physical dimensions on the order of nanometers, or
units of 10-9 meter).
50. Single robot?
Multi robot?
Swarm robotics is a new approach to the
coordination of multirobot systems which consist of
large numbers of mostly simple physical robots. It
is supposed that a desired collective behavior
emerges from the interactions between the robots
and interactions of robots with the environment.
This approach emerged on the field of artificial
swarm intelligence, as well as the biological studies
of insects, ants and other fields in nature, where
swarm behaviour occurs.
51. Swarming – The Definition
aggregation of similar animals, generally cruising in
the same direction
Termites swarm to build colonies
Birds swarm to find food
Bees swarm to reproduce
52. Why do animals swarm?
To forage better
To migrate
As a defense against predators
Social Insects have survived for millions of years.
58. Swarming - Characteristics
Simple rules for each individual
No central control
Decentralized and hence robust
Emergent
Performs complex functions
59. Learn from insects
Computer Systems are getting complicated
Hard to have a master control
Swarm intelligence systems are:
Robust
Relatively simple
60. Swarm Intelligence -
Definition
“any attempt to design algorithms or distributed
problem-solving devices inspired by the collective
behavior of social insect colonies and other animal
societies” [Bonabeau, Dorigo, Theraulaz: Swarm
Intelligence]
Solves optimization problems