1 of 30

Introduction to Artificial Intelligence

By:

Dr. Mohammad Shoab

Week 2

2 of 30

Agent

  • Artificial intelligence is defined as a study of rational agents.
  • A rational agent could be anything which makes decisions, as a person, firm, machine, or software. It carries out an action with the best outcome after considering past and current percepts (agent’s perceptual inputs at a given instance).
  • An AI system is composed of an agent and its environment. The agents act in their environment. The environment may contain other agents.

2

Introduction to Artificial Intelligence

Department of Computer Science

3 of 30

Cont…

  • An agent is anything that can be viewed as :

    • perceiving its environment through sensors and
    • acting upon that environment through actuators

3

Introduction to Artificial Intelligence

Department of Computer Science

4 of 30

Cont…

  • human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to the sensors, and other organs such as hands, legs, mouth, for effectors.

  • robotic agent replaces cameras and infrared range finders for the sensors, and various motors and actuators for effectors.

  • software agent has encoded bit strings as its programs and actions.

4

Introduction to Artificial Intelligence

Department of Computer Science

5 of 30

Agent Terminology

  • Performance Measure of Agent − It is the criteria, which determines how successful an agent is.
  • Behavior of Agent − It is the action that agent performs after any given sequence of percepts.
  • Percept − It is agent’s perceptual inputs at a given instance.
  • Percept Sequence − It is the history of all that an agent has perceived till date.
  • Agent Function − It is a map from the precept sequence to an action.

5

Introduction to Artificial Intelligence

Department of Computer Science

6 of 30

Rationality

  • Rationality is nothing but status of being reasonable, sensible, and having good sense of judgment.

  • Rationality is concerned with expected actions and results depending upon what the agent has perceived. Performing actions with the aim of obtaining useful information is an important part of rationality.

6

Introduction to Artificial Intelligence

Department of Computer Science

7 of 30

Ideal Rational Agent

  • An ideal rational agent is the one, which is capable of doing expected actions to maximize its performance measure, on the basis of −
    • Its percept sequence
    • Its built-in knowledge base

  • Rationality of an agent depends on the following −
    • The performance measures, which determine the degree of success.
    • Agent’s Percept Sequence till now.
    • The agent’s prior knowledge about the environment.
    • The actions that the agent can carry out.

7

Introduction to Artificial Intelligence

Department of Computer Science

8 of 30

Cont…

  • A rational agent always performs right action, where the right action means the action that causes the agent to be most successful in the given percept sequence. The problem the agent solves is characterized by Performance Measure, Environment, Actuators, and Sensors (PEAS).

8

Introduction to Artificial Intelligence

Department of Computer Science

9 of 30

Structure of Intelligent Agents

  • Agent’s structure can be viewed as −
    • Agent = Architecture + Agent Program
    • Architecture = the machinery that an agent executes on.
    • Agent Program = an implementation of an agent function.

9

Introduction to Artificial Intelligence

Department of Computer Science

10 of 30

Type of Agents

Simple Reflex Agent:

  • Simple reflex agents ignore the rest of the percept history and act only on the basis of the current percept.
  • Percept history is the history of all that an agent has perceived till date. The agent function is based on the condition-action rule.
  • A condition-action rule is a rule that maps a state i.e, condition to an action. If the condition is true, then the action is taken, else not.
  • This agent function only succeeds when the environment is fully observable.

10

Introduction to Artificial Intelligence

Department of Computer Science

11 of 30

Cont..

Problems with Simple reflex agents are :

  • Very limited intelligence.
  • No knowledge of non-perceptual parts of state.
  • Usually too big to generate and store.
  • If there occurs any change in the environment, then the collection of rules need to be updated.

11

Introduction to Artificial Intelligence

Department of Computer Science

12 of 30

12

Figure: Simple Reflex Agent

Introduction to Artificial Intelligence

Department of Computer Science

13 of 30

Model Based Reflex Agent

  • It works by finding a rule whose condition matches the current situation.
  • A model-based agent can handle partially observable environments by use of model about the world.
  • The agent has to keep track of internal state which is adjusted by each percept and that depends on the percept history.
  • The current state is stored inside the agent which maintains some kind of structure describing the part of the world which cannot be seen.

13

Introduction to Artificial Intelligence

Department of Computer Science

14 of 30

Cont…

  • Updating the agent state requires information about:

    • How the world evolves
    • How the agent's action affects the world.

14

Introduction to Artificial Intelligence

Department of Computer Science

15 of 30

15

Figure: Model Based Reflex Agent

Introduction to Artificial Intelligence

Department of Computer Science

16 of 30

Goal Base Agents

  • These kind of agents take decision based on how far they are currently from their goal(description of desirable situations).
  • Their every action is intended to reduce its distance from the goal.
  • This allows the agent a way to choose among multiple possibilities, selecting the one which reaches a goal state.
  • The knowledge that supports its decisions is represented explicitly and can be modified, which makes these agents more flexible.
  • They usually require search and planning.
  • The goal-based agent’s behavior can easily be changed.

16

Introduction to Artificial Intelligence

Department of Computer Science

17 of 30

17

Figure: Goal Based Agent

Introduction to Artificial Intelligence

Department of Computer Science

18 of 30

Utility Based Agents

  • These agents are similar to the goal-based agent but provide an extra component of utility measurement which makes them different by providing a measure of success at a given state.
  • Utility-based agent act based not only goals but also the best way to achieve the goal.
  • The Utility-based agent is useful when there are multiple possible alternatives, and an agent has to choose in order to perform the best action.
  • The utility function maps each state to a real number to check how efficiently each action achieves the goals.

18

Introduction to Artificial Intelligence

Department of Computer Science

19 of 30

19

Figure: Utility Based Agents

Introduction to Artificial Intelligence

Department of Computer Science

20 of 30

Learning Agents

  • A learning agent in AI is the type of agent which can learn from its past experiences or it has learning capabilities.

  • It starts to act with basic knowledge and then able to act and adapt automatically through learning.

20

Introduction to Artificial Intelligence

Department of Computer Science

21 of 30

Cont…

A learning agent has mainly four conceptual components, which are:

    • Learning element :It is responsible for making improvements by learning from the environment
    • Critic: Learning element takes feedback from critic which describes how well the agent is doing with respect to a fixed performance standard.
    • 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.

21

Introduction to Artificial Intelligence

Department of Computer Science

22 of 30

22

Figure: Learning Agent

Introduction to Artificial Intelligence

Department of Computer Science

23 of 30

Nature of Environments

  • Some programs operate in the entirely artificial environment confined to keyboard input, database, computer file systems and character output on a screen.
  • In contrast, some software agents (software robots or softbots) exist in rich, unlimited softbots domains. The simulator has a very detailed, complex environment.
  • The software agent needs to choose from a long array of actions in real time.
  • A softbot designed to scan the online preferences of the customer and show interesting items to the customer works in the real as well as an artificial environment.

23

Introduction to Artificial Intelligence

Department of Computer Science

24 of 30

Cont…

  • The most famous artificial environment is the Turing Test environment, in which one real and other artificial agents are tested on equal ground. This is a very challenging environment as it is highly difficult for a software agent to perform as well as a human.

24

Introduction to Artificial Intelligence

Department of Computer Science

25 of 30

Turing Test

  • The success of an intelligent behavior of a system can be measured with Turing Test.
  • Two persons and a machine to be evaluated participate in the test. Out of the two persons, one plays the role of the tester. Each of them sits in different rooms. The tester is unaware of who is machine and who is a human. He interrogates the questions by typing and sending them to both intelligences, to which he receives typed responses.
  • This test aims at fooling the tester. If the tester fails to determine machine’s response from the human response, then the machine is said to be intelligent.

25

Introduction to Artificial Intelligence

Department of Computer Science

26 of 30

The End

26

Introduction to Artificial Intelligence

Department of Computer Science

27 of 30

Exercise

Q1. Who is rational agent?

Q2. Explain human, robotic and software gents.

Q3. Write agent terminology.

Q4. What is rationality and who is ideal rational agent?

Q5. Explain Structure of intelligent agent.

Q6. Explain types of agents.

Q7. What is Turing test?

27

Introduction to Artificial Intelligence

Department of Computer Science

28 of 30

Q8. Artificial intelligence is defined as a study of

  1. Rational agents
  2. Dumb agents
  3. Average agents
  4. None of the above

Q9. Which is a map from the precept sequence to an action.

  1. Behavior of agent
  2. Agent function
  3. Percept
  4. Percept sequence

28

Introduction to Artificial Intelligence

Department of Computer Science

29 of 30

Q10. Rationality is nothing but status of being

  1. Human
  2. Reasonable
  3. Animal
  4. None of the above

Q11. Simple reflex agents ignore the rest of the percept history and act only on the basis of the

  1. Current percept
  2. Previous percept
  3. Future percept
  4. None of the above

29

Introduction to Artificial Intelligence

Department of Computer Science

30 of 30

Q12. Who is designed to scan the online preferences of the customer

  1. AdSense
  2. Facebook
  3. Google
  4. Softbot

30

Introduction to Artificial Intelligence

Department of Computer Science