Robotics and agents

63
Principles of Artificial Intelligence Dr. Amelia Ritahani Ismail Department of Computer Science Kulliyyah of ICT 03-61965642 [email protected] http://staff.iium.edu.my/amelia

description

Slides for class presentation for robotics and agents ....for MOOC training...:)

Transcript of Robotics and agents

Page 1: Robotics and agents

Principles of Artificial Intelligence

Dr. Amelia Ritahani IsmailDepartment of Computer Science

Kulliyyah of ICT03-61965642

[email protected] http://staff.iium.edu.my/amelia

Page 2: Robotics and agents

Consultation: Tuesday / Thursday 11.30 a.m. -1.00 p.m. ( AI Lab) 2.00 p.m. - 3.20 p.m.

Page 3: Robotics and agents

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

Swarm Robots

Page 4: Robotics and agents

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)

Page 5: Robotics and agents

CSC 3301 Schedule for Semester 2 2013/14Wk # Start date Lecture/Tutorial Assignment/Quizzes

104/02/2014 Chapter 1: Artificial Intelligence, its

roots and scope06/02/2014 Class Exercise

211/02/2014

Chapter 2: The Predicate CalculusClass Exercise

13/02/2014 Assign 1 (Chapter 1-2)

318/02/2014

Chapter 3: Structures and strategies for state space search

20/02/2014 Class Exercise

425/02/2014

27/02/2014Chapter 4: Heuristics search

Test 1 (Chapter 1, 2, 3)

504/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/2014Mid-term Exam (Chapter 1,2,3,4,14)Friday, 14 March 2014 (10 am – 12 pm)

718/03/2014 Chapter 15: Natural Language

ProcessingClass Exercise

20/03/2014

8 25/03/2014SEMESTER BREAK

27/03/2014

Page 6: Robotics and agents

CSC 3301 Schedule for Semester 2 2013/14Wk # Start date Lecture/Tutorial Assignment/Quizzes

901/04/2014 Chapter 16: Robotics and

Intelligent Agent03/04/2014

1008/04/2014 Chapter 16: Robotics and Intelligent

AgentGroup Project discussion

10/04/2014 Assign 3 (Chapter: TBA)

1115/04/2014 Chapter 8 : Strong Method Problem

Solving (Pt 2) (Expert Systems)17/04/2014 Group Project proposal

1222/04/2014 Chapter 12: Machine Learning

(Genetic and Emergent)Test 2 (Chapter: TBA)

24/04/2014

1329/04/2014 Chapter 11: Machine Learning

(Connectionist)01/05/2014 Assign 4 (Chapter: TBA)

1406/05/2014

PROJECT Test 3 (Chapter: TBA)

08/05/2014

1513/05/2014

PROJECT PRESENTATION & ASSESSMENT Group Project15/05/2014

1620/05/2014

REVISION WEEKPr

22/05/2014

Page 7: Robotics and agents

INTRODUCTION

Page 8: Robotics and agents

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.”

Page 9: Robotics and agents

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.

Page 10: Robotics and agents

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.

Page 11: Robotics and agents

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.

Page 12: Robotics and agents

INTELLIGENT AGENTSAND ROBOTICS

Page 13: Robotics and agents

“In which we discuss the nature of agents, perfect or otherwise, the diversity of environments and the resulting menagerie of agent types.”

Page 14: Robotics and agents

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

Page 15: Robotics and agents

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?

Page 16: Robotics and agents

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.

Page 17: Robotics and agents

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.

Page 18: Robotics and agents

Agents and environments

?

HUMAN Agent

SENSORS (eyes, ears and other organs)

ACTUATORS (hands, legs and other body

parts)

Environm

ent

Percepts

Actions

Page 19: Robotics and agents

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)

Page 20: Robotics and agents

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.

Page 21: Robotics and agents

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 Whatever built-in knowledge the agent has

Page 22: Robotics and agents

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).

Page 23: Robotics and agents

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.

Page 24: Robotics and agents

The nature of environments - PEAS

PEAS – Example #1: Agent: Automated taxi driver:

Performance measure: Safe, fast, legal, comfortable trip, maximize profits

Environment: Roads, other traffic, pedestrians, customers

Actuators: Steering wheel, accelerator, brake, signal horn

Sensors: Cameras, sonar, speedometer, GPS, odometer, taximeter engine sensors, keyboard

Page 25: Robotics and agents

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

Page 26: Robotics and agents

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)

Page 27: Robotics and agents

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

Page 28: Robotics and agents

PEAS Internet Shopping agent?

Performance Measure

Environment

Actuators

Sensors

Page 29: Robotics and agents

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)

Page 30: Robotics and agents

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

Page 31: Robotics and agents

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

Page 32: Robotics and agents

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

Page 33: Robotics and agents

Environment types?

Task Environment

Observable Deterministic Episodic Static Discrete Agents

Crossword puzzle

Chess with a clock

Taxi driving

Medical Diagnosis

Page 34: Robotics and agents

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

Page 35: Robotics and agents

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.

Page 36: Robotics and agents

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

Page 37: Robotics and agents

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

Page 38: Robotics and agents

The structure of agents

A Vacuum-cleaner AgentPercept Sequence Action

[A; Clean] Right

[A; Dirty] Clean

[B; Clean] Left

[B; Dirty] Clean

[A; Clean], [A; Clean] Right

[A; Clean], [A; Dirty] Clean

Page 39: Robotics and agents

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

Page 40: Robotics and agents

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)

Page 41: Robotics and agents

Agent types

Simple reflex agents

Drawbacks: It only work in general if the environment is fully observable

Page 42: Robotics and agents

Agent types

Model-based reflex agents

Difference: The agent keeps track of an internal state, i.e. the internal model of the world.

Page 43: Robotics and agents

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.

Page 44: Robotics and agents

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.

Page 45: Robotics and agents

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.

Page 46: Robotics and agents

Agent types

A general model of learning agents.

Page 47: Robotics and agents

SWARM ROBOTICS

Page 48: Robotics and agents

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.

Page 49: Robotics and agents

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).

Page 50: Robotics and agents

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.

Page 51: Robotics and agents

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

Page 52: Robotics and agents

Why do animals swarm?

To forage better

To migrate

As a defense against predators

Social Insects have survived for millions of years.

Page 53: Robotics and agents

Swarming is Powerful

Swarms can achieve things that an individual cannot

Page 54: Robotics and agents

Swarming – Example

Bird Flocking

“Boids” model was proposed by Reynolds

Boids = Bird-oids (bird like)

Only three simple rules

Page 55: Robotics and agents

Collision Avoidance Rule 1: Avoid Collision with neighboring birds

Page 56: Robotics and agents

Velocity Matching Rule 2: Match the velocity of neighboring birds

Page 57: Robotics and agents

Flock Centering Rule 3: Stay near neighboring birds

Page 58: Robotics and agents

Swarming - Characteristics

Simple rules for each individual

No central control

Decentralized and hence robust

Emergent

Performs complex functions

Page 59: Robotics and agents

Learn from insects Computer Systems are getting complicated

Hard to have a master control

Swarm intelligence systems are:

Robust

Relatively simple

Page 60: Robotics and agents

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

Page 61: Robotics and agents

Applications Movie effects

Lord of the Rings

Network Routing

ACO Routing

Swarm Robotics

Swarm bots

Page 62: Robotics and agents

Our AI LAB What do we have?

Projects

Immune Inspired Algrithms

Few research students, industrial attachment student, fyp students..

Page 63: Robotics and agents

Our First robot and second

http://www.youtube.com/watch?v=zcNOm7lZ3M4