0% found this document useful (0 votes)
7 views48 pages

CS 2 - Agents&enviornent

The document outlines a course plan for 'Artificial Computational Intelligence' at BITS Pilani, covering various modules such as Introduction to AI, Problem Solving Agents, and different types of agents and environments. It details the structure of AI systems, including definitions of agents, performance measures, and the PEAS (Performance measure, Environment, Actuators, Sensors) framework. Additionally, it discusses problem-solving strategies, search algorithms, and the formulation of problems in AI contexts.

Uploaded by

vishnugupta2098
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views48 pages

CS 2 - Agents&enviornent

The document outlines a course plan for 'Artificial Computational Intelligence' at BITS Pilani, covering various modules such as Introduction to AI, Problem Solving Agents, and different types of agents and environments. It details the structure of AI systems, including definitions of agents, performance measures, and the PEAS (Performance measure, Environment, Actuators, Sensors) framework. Additionally, it discusses problem-solving strategies, search algorithms, and the formulation of problems in AI contexts.

Uploaded by

vishnugupta2098
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 48

Artificial Computational Intelligence-[DSE

ZC444]

CS 2-Agents &Environment
BITS Pilani Dr. Vijayalakshmi Anand
Pilani Campus
Course Plan

M1 Introduction to AI
M2 Problem Solving Agent using Search
M3 Game Playing, Constraint Satisfaction Problem
M4 Knowledge Representation using Logics
M5 Probabilistic Representation and Reasoning
M6 Reasoning over time, Reinforcement Learning

BITS Pilani, Pilani Campus


Module 1 : Introduction to AI

A. Overview of AI & Applications

B. Intelligent Agents

C. Task Environment

BITS Pilani, Pilani Campus


Design Principles & Techniques

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


AI Agents and Environment

An AI system is composed of
 an agent
 an environment

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


What is agent?

Agent is anything that can perceive its environment


through sensors and acts upon the environment
through effectors .

Example of agents
 Robotic
 Human
 Software

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Important terminologies

1.Percept-It is a perceptual inputs at a given instance


2.Agent program is an implementation of an agent
function.
3.Agent function is a map from the percept
sequence(history of all that an agent has perceived to
date) to an action.
4.Performance measure-It is criteria how successful
an agent is
5.Action-Agent performs after any given sequence of
percepts
6.Effectors- can be legs, wheels, arms, fingers, wings,
fins, and display screen

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


AI system architecture

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Real time example

Performance measure: An objective criterion for success of


an agent's behaviour

E.g., performance measure of a vacuum-cleaner agent


» amount of dirt cleaned up
» amount of time taken
» amount of electricity consumed
» amount of noise generated, etc.
BITS Pilani, Pilani Campus
Contd..

BITS Pilani, Pilani Campus


PEAS Environment
Design on what an application wants the
agent to do in the environment

Agent Performance Environme Sensors Actuators


nt
Medical Healthy Patient, Keyboard entry Display of
diagnosis patient, hospital, of symptoms, questions, tests,
system reduced costs staff findings, diagnosis,
patient’s treatments,
answers referrals

Satellite Correct image Downlink Color pixel Display of scene


Image categorization from analysis categorization
analysis orbiting
system satellite
Interactive Student’s Set of Keyboard entry Display of
English tutor score on test students, exercises,
testing suggestions,
agency corrections
BITS Pilani, Pilani Campus
PEAS Environment Design on what an application wants the agent
to do in the environment

Agent Performan Environ Sensors Actuators


ce ment
Automate Safe, fast, Roads, Cameras, Steering
d taxi legal, other sonar, wheel,
driver comfortabl traffic, speedometer accelerator,
e trip, pedestria , GPS, brake,
maximize ns, odometer, signal, horn
profits customer engine
s sensors,
keyboard

BITS Pilani, Pilani Campus


Types of agents

 Simple Reflex Agents


 Model-Based Reflex Agents
 Goal-Based Agents
 Utility-Based Agents
 Learning Agent

BITS Pilani, Pilani Campus


Simple reflex agent

 Simple
 No calculation or solve complicated problems
 Fully observable environment
 Works on condition-action rule

BITS Pilani, Pilani Campus


Model Based reflex agents
 Partially observable environment
 Store perceive history

BITS Pilani, Pilani Campus


Goal based agent
 Expansion of model based reflex agent
 Mainly focused on its Goal
 Searching and planning
 Agent is more flexible

BITS Pilani, Pilani Campus


Utility based agent

 Main focus is on utility


 Utility function
 Deals with happy and unhappy state

BITS Pilani, Pilani Campus


Learning agent
 Learning element: It is responsible for making
improvements by learning from the environment
 Critic: The learning element takes feedback from critics
which describes how well the agent is doing with respect to a
fixed performance standard.

BITS Pilani, Pilani Campus


 Performance element: It is responsible for selecting
external action
 Problem Generator: This component is responsible for
suggesting actions that will lead to new and informative
experiences.

BITS Pilani, Pilani Campus


Environment

BITS Pilani, Pilani Campus


Task Environment

 A rational agent is built to solve a specific task. Each


such task would then have a different environment which
we refer to as Task Environment

 Based on the applicability of each technique for agent


implementation its task environment design is
determined by multiple dimension

BITS Pilani, Pilani Campus


Sensor based Task
environment
Observability : Fully observable Vs Partial observable

Poker Chess

BITS Pilani, Pilani Campus


Action Based Task Environment

 Dependency : Episodic Vs Sequential

chech chess game


Mail sorting system

Pick and place


robot system

BITS Pilani, Pilani Campus


State Based Task Environment

 No.of.State : Discrete Vs Continuous

BITS Pilani, Pilani Campus


Action & State Based:

 State Determinism : Deterministic Vs Stochastic |


Strategic
(If the environment is deterministic except for the actions of
other agents, then the environment is strategic)

BITS Pilani, Pilani Campus


Agent Based:

> Cardinality : Single Vs MultiAgent

BITS Pilani, Pilani Campus


Action & State Based:

 Change in Time : Static Vs Dynamic


 (The environment is semi dynamic if the environment
itself does not change with the passage of time but the
agent's performance score does)

BITS Pilani, Pilani Campus


Task Environment

Sensor Based:
 Observability : Full Vs Partial

Action Based:
 Dependency : Episodic Vs Sequential

State Based:
 No.of.State : Discrete Vs Continuous

Agent Based:
> Cardinality : Single Vs MultiAgent

Action & State Based:


 State Determinism : Deterministic Vs Stochastic | Strategic
 Change in Time : Static Vs Dynamic

BITS Pilani, Pilani Campus


Task Environment

Task Fully vs Single Deterministi Episodic Static vs Discrete vs


Environment Partially vs c vs vs Dynamic Continuou
Observabl Multi- Stochastic Sequential s
e Agent
Medical Partially Single Stochastic Sequential Dynamic Continuou
diagnosis s
system
Satellite Fully Single Deterministi Episodic Static Continuou
Image c s
Analysis
System
Interactive Partially Multi Stochastic Sequential Dynamic Discrete
English tutor

BITS Pilani, Pilani Campus


Task Environment

Task Fully vs Single Deterministic Episodic vs Static vs Discrete vs


Environm Partially vs vs Stochastic Sequential Dynamic Continuou
ent Observable Multi- s
Agent
Taxi P M S S D C
Driving

BITS Pilani, Pilani Campus


Exercises
Develop PEAS description for the following task
environment:
 Robot soccer player
 Shopping for used AI books on the Internet
 Analyze the properties of the above environments

BITS Pilani, Pilani Campus


Required Reading: AIMA - Chapter # 1.2, 1.4, 2

32
BITS Pilani, Pilani Campus
Module 2 : Problem Solving Agent using
Search

A. Uninformed Search

B. Informed Search

C. Heuristic Functions

D. Local Search Algorithms & Optimization Problems

BITS Pilani, Pilani Campus


Problem Solving Agents
An agent that tries to come up with a sequence of actions
that will bring the environment into a desired state.
Phases of Solution Search by PSA

“a problem- Goal
Formulation
solving refers to
a state where we
Problem
wish to reach to Formulation
a definite goal
from a present Search
state or condition Phase

Execution
Phase BITS Pilani, Pilani Campus
Problem Solving Agents-Goal
formulation
 first and simplest step in problem-solving.
 organizes the steps/sequence required to formulate
one goal out of multiple goals as well as actions to
achieve that goal.
 current situation and the agent’s performance measure
is the first step in problem solving.

BITS Pilani, Pilani Campus


Problem solving Agents-Problem
formulation
 Initial State: Start point of problem
 Final State: The finish point of problem.
Aka Goal or solution state
 States: Total states in problem
 Transition Model: How one can shift
from one state to another
 Actions: Actions set, used to move from
one state to another
 Path Cost: What is total effort (cost) from
initial state to final state

BITS Pilani, Pilani Campus


Problem Solving Agents –Search
Phase

 It identifies all the best possible sequence of actions to


reach the goal state from the current state.
 It takes a problem as an input and returns solution as
its output.

BITS Pilani, Pilani Campus


Problem solving agents –
execution phase
It executes the best optimal solution from the searching
algorithms to reach the goal state from the current state.

BITS Pilani, Pilani Campus


Problem Solving Agents –
example

Initial State –E.g., In(Arad)


Possible Actions – ACTIONS(s)  {Go(Sibiu), Go(Timisoara), Go(Zerind)}
Transition Model – RESULT( In(Arad), Go(Sibiu) ) = In(Sibiu)
Goal Test – IsGoal( In(Bucharest) ) = Yes
Path Cost – cost( In(Arad), go(Sibiu)) = 140 kms

BITS Pilani, Pilani Campus


N - Queen

BITS Pilani, Pilani Campus


Vacuum World Problem

BITS Pilani, Pilani Campus


Example Problem Formulation

Vacuum World 8 – Queen Problem Travelling Problem

Initial State Any No Queen on board Based on the problem

Possible [Move Left, Move Add a Queen to Take a flight | Train |


Actions Right, Suck] any empty square Shop
Transition [A, ML] = [B , Dirty] [A1, B2] = [FAIL] [A, Go(A->S)] = [S]
Model [A, ML] = [B, Clean] [A1, B3] = [SAFE]

Goal Test Is all room clean? All Queen Safe Is current = B


[A, Clean] [B, Clean] (destination)
Path Cost No of steps in path No of Moves done, Cost + Time + Quality
backtracking

BITS Pilani, Pilani Campus


Searching for solutions

BITS Pilani, Pilani Campus


In(Arad)

Go(Sibiu) Go(Timisoara) Go(Zerind)

In(Sibiu) In(Timisoara) In(Zerind)

Go(Arad) Go(Fagaras) Go(Oradea) Go(Rimnicu Vilcea)

In(Arad) In(Fagaras) In(Oradea) In(Rimnicu Vilcea)

Leaf Nodes
(no children yet)

BITS Pilani, Pilani Campus


Terminologies

 Nodes
 States
 Frontier | Fringes
 Search Strategy : LIFO | FIFO | Priority Queue
 Performance Metrics

 Completeness
 Optimality
 Time Complexity
 Space Complexity
 Algorithm Terminology
- d Depth of a node - m – maximum
- b Branching factor - C* - Optimal Cost
- n – nodes - E – least Cost
- l – level of a node - N –total node generated

BITS Pilani, Pilani Campus


Uninformed Search
BFS & its Variants
Thank you

BITS Pilani, Pilani Campus


Any Questions?

BITS Pilani, Pilani Campus

You might also like