Sunteți pe pagina 1din 51

INTRODUCTION TO

INTELLIGENT AGENTS AND


NATURAL LANGUAGE
PROCESSING
CHAPTER 14:-14.1,14.2,14.3
INTRODUCTION TO INTELLIGENT AGENTS
CHAPTER 16:-16.1,16.2,16.3
NATURAL LANGUAGE PROCESSING
CHAPTER 14
INTRODUCTION TO
INTELLIGENT AGENTS
Objectives of learning agents

 What is an agent and how it interacts with the


environment
 Practical aspects of agents.
 Agents V/s software programs.
 Classification of agents
INTRODUCTION

 Computers are incapable of performing any function


unless the actions are explicitly coded by a
programmer.

 In a large number of applications, we require the


system that posses the capability of making decisions
regarding their course of action in order to
accomplish their design objectives. Such computer
systems are known as agents.(key feature :-
autonomous).
INTRODUCTION

 An agent may be one of the following type:


 Biological

 Robotic

 Computational(software agents)

 In this chapter we will restrict our discussion to


computational agents.
INTRODUCTION

 A software agent(computational) may be defined as a


computer program which is capable of acting on
behalf of the user in order to accomplish a given
computational task.
Examples of such agents include:

 1) An internet search agent that is designed to transmit queries to


various search engines and then collate the results obtained ,and so
on.
 2) Software demons in UNIX operating systems can be viewed as
agents that monitor a software environment and perform actions to
modify it.
 3) Open Sesame! is a software agent that learns the way users work
with their Macintosh applications. "It streamlines everything you do
on your desktop
 How does a Search Engine work_ for Life Online.flv
INTRODUCTION

 In distributed applications, multiple agents may be


used; in such systems, each agent is responsible for
achieving its goals, interacting with the environment
,and communicating with other agents in the system.

 Such systems are known as multi-agent systems.


These are multi-threaded ,which implies that each
agent is assumed to have at least one thread of
control.
 CAN in automatic cars.
 Multiple agents in computer games.
INTRODUCTION

 From our discussion above ,we can state that agents


may be thought of as a computer systems or
programs that are capable of acting autonomously
in a given environment to meet their objectives.

 They can be understood to sense or perceive the


environment with the help of devices called sensors
and then acts upon its environment through
effectors.
 Example: With the analogy of human agent, sensors are eyes,
nose ,ears, skin etc.,while the effectors include
hands,legs,mouth etc.
INTERACTION OF AN AGENT WITH THE
ENVIRONMENT

PERCEPTS
SENSORS
AGENT ENVIRONMENT
EFFECTORS
ACTIONS
INTRODUCTION

 An agent can be defined in terms of following


elements:
 Goal
 Knowledge
 Interaction capability

 An important class of agents consists of intelligent agents, which are


capable of robust operation even in dynamic and unpredictable
environment, where there is great probability of actions failing. Hence
agent must posses intelligence.
AGENT versus SOFTWARE PROGRAM

 Traditional software program lack the ability to assess and react to the
environment and modify their behavior accordingly.
 They also do not follow a goal oriented and autonomous approach to
problem solving.
 These characteristics distinguish traditional
programs from the agents whose key feature is
presence of autonomy.
 For instance , a payroll program could be said to sense the
world through its input and act on via its output , but its not an
agent because its output would not normally be effected if it
senses or finds unseen situations.
Agents & Objects

 Wooldridge has depicted the difference between


agents and objects in terms of autonomy and
behavior which depends on the characteristics such
as reaction,proactiveness and social ability.

 Agents posses the capability of autonomous behavior based


on environment, while the objects do not posses any such
capability.
 Agents display stronger sense of autonomy than objects,
and can take the important decision of whether or not to
perform an action on the request of another agent.
Agents & Expert system

 An expert system is a system that is considered to be an expert


when it comes to solving problems or giving advice in some
knowledge rich domain.eg.MYCIN.
 The Expert system are based on the fact that the previous
knowledge of a certain application exists, and then we acquire
knowledge from samples or interviews with the domain expert
and then code into knowledge base.
 However , expert systems are not capable of
interacting with their environment and do not
display reactive, proactive behavior or social abilities
such as cooperation ,coordination and negotiation.
Classification of Agents

 Agents can be classified into different classes.


 Nwana has defined and classified agents on the basis
of the parameters :mobility and interaction with the
environment.
 The term mobility refers to the ability to move around in a
given network.
 They may be further classified depending on the
primary attributes such as autonomy, cooperation
and learning ability.
Example of mobile agents
Classification of Agents

 On the basis of their interaction with the


environment ,agents may be either:
 Deliberative
 Reactive
 Deliberative agents posses a reasoning model, and a plan and
negotiate for coordination with other agents in order to achieve
their goals.
 On other hand ,reactive agents do not posses any prior model of
their environment and act by responding to the present state of the
environment in which they are embedded using stimulus/response
type of behavior.
Classification of Agents

 Three primary characteristics of agents are as


follows:
 Autonomy
 Reactivity
 Proactiveness
 Autonomy is that characteristic of an agent which enable it to
function without direct human intervention or other intelligent
system.
 Reactivity is that characteristic of agents owing to which they
judge their environment and respond in accordance to the changes
occurring it.
 Proactiveness is the characteristic of agent capable of taking
initiative to make decision in order to achieve their goals.
Classification of Agents

 Various types of agents using different type of


characteristics are :
 Collaborative agents
 Interface agents
 Reactive agents
 Internet agents
 Mobile agents
 Hybrid agents
 Intelligent agents
Classification of Agents

 Collaborative agents emphasize on autonomy and


cooperation with other agents. They negotiate with other
agents present in the environment to reach mutually
acceptable agreements during cooperative problem solving.

 Interface agents can be imagined as personal assistants


who emphasize on autonomy and learning in order to
perform task for their owners. They support and provide
proactive assistance to the user of particular application .
Classification of Agents

 Reactive agents do not posses internal ,symbolic model


of their environment and respond to the present state of the
environment in a stimulus-response manner. These agents
are viewed as a collection of modules operating
autonomously, which are responsible of specific task.

 Internet agents are also known as information agents.


They help users to find out filtered and classified
information from a vast source of information ,and also
manage ,manipulate or collate information from many
distributed sources on WAN’s such as WWW.
Classification of Agents

 Mobile Agents are free to roam through wide area


networks, interact with foreign hosts, perform task
on the behalf of their owners and return to their
origin.
 Hybrid Agents combine two or more agent
philosophies within a singular agent ,thus
maximizing the strengths and minimizing the
deficiencies of the various techniques.
Classification of Agents

 Intelligent Agents are those that exhibit


properties of intelligence and can perform function
that require higher level cognitive abilities.
 Intelligent agent have additional domain knowledge that enables
them to perform task even when the parameters of the task change
or when unexpected situation arise.
 They are capable of learning from their own performance ,from
other agents, from user or from environment in which they are
situated.

We conclude that intelligent agent is a software agent that assists


user and acts on their behalf in performing non-repetitive
computer task and has an ability to adapt and learn.
Classification of Agents

 Intelligent agents are generally organized in a


hierarchical structure containing many sub –agents,
which process and perform lower level functions.
 The sub-agents may be temporal (whose decision are
based on time) and spatial(that relate to the physical
real world).

 An agent is not a pure software program but can be a


hardware component that forms an integral part of
implementing agents.
Environment for an Agent

 Environment can be classified into the following


categories:
 Deterministic and non-deterministic
 Static and Dynamic
 Discrete and continuous
Environment for an Agent

 Deterministic environment is defined as that in which every action


has a single guaranteed effect ,on the other hand non-deterministic
environment ,there may be many effects corresponding to a single
action.

 Static environment is assumed to remain unchanged except by the


performance of actions by the agent . On the other hand ,in a dynamic
environment other processes operate on it, and hence change it
beyond the agent’s control.

 Discrete and continious: In Discrete environment has fixed


,finite number of actions and percepts in it. If an environment is
sufficiently complex ,then the deterministic is not of much help.
Chapter16
Natural Language Processing
Introduction

 Understand , interprete and speak natural language-


intelligent system.
 Both understanding and generation of natural
language requires a lot of intelligence.
 Understanding refers to the process of mapping from
a given input form into more immediately useful
form.
Introduction

 NLP involves processing of written text using


computer models at lexical, syntactic and semantic
level.
 It also includes processing of spoken language.
 Written language processing which includes
syntactic structures and various grammars with
parsing methodologies, semantic models.
Why NLP?
Sentence analysis phases
Sentence analysis phases
Sentence Analysis Phases

 A sentences is usually analyzed through different


phases:
 Morphological Analysis(MAP): carried out
initially on the natural sentences; extracts root
word.
Eg:- getting the root push from declined forms such as
pushed, pushing, pushes etc.
The boy went to the market.

Stucture of word changes the meaning of sentence.


Sentence Analysis Phases

 Syntactic Analysis: uses the result of MAP to build


a structural description of the sentence based on
grammatical rules.
 Deals with grammar that is how the sequence is
stuctured.
Issues in syntax

 Identify the parts of speech.


 Eg:- the dog ate the brick.
 Who did what?
 Dog=noun; ate= verb; noun=brick
 Label the each component of sentence.
 Indentify collocations: group of words must be
recoganised.
 Eg:- mother in law, hot dog
Issues in syntax

 Parsing:- It splits a sequence of characters or values


into smaller parts.
 Shallow parsing
 Eg:- the dog chased the bear
 Subject- the dog (NP)
 Predicate – chased the bear (VP)
 Full parsing
 Eg:- john loves marry
Full parsing
Sentence Analysis Phases

 Semantic analysis:it creates a semantic structure


by ascribing the literel meaning using the parse
structure obtained in syntactic phase.
 it maps individual words into corresponding objects
in the knowledge base and combines the words with
each other using semantic rules.
Issues in semantic phase
Issues in semantic phase
Issues in semantic phase
Sentence Analysis Phases

 Pragmatics Analysis: it refers to intended


meaning of the sentence used in different contexts.
The context affects the interpretation of the
sentence.
example

 John saw mike in the garden with a cat.


 2 interpretations:
 John was having cat and saw mike in the garden
 John saw mike with cat in the garden.

 If we have knowledge about john that he keeps pet


the first interpretaion will be more suitable.
Sentence Analysis Phases

 Discourse analysis: it refers to conversation


between two or more individuals and the
interpretation is based on belief set at the time of
conversation.
Grammars and Parses

 Parsing refers to the process of analyzing an input


sequence in order to determine its structure with
respect to the given grammar.
 Parsing techniques:
 Rule based parsing
 Statistical Parsing
Grammars and Parses

 Once the grammar rules are defined, a sentence is


parsed using the grammar and a tree kind of
structure is built, if the sentence is syntactically
correct. This tree is called parse tree.
 Parsing can be done using two methods:
 Bottom up approach: we start with the words in the sentence
and apply grammar rules in the backward direction until a
single tree is produced whose root matches with the start root.
 Top down approach: we start with the start symbol and apply
grammar rules in the forward direction until the terminal
symbols of the parse tree and corresponds to the word in the
sentence.
Example

 Consider simple context free like grammar for


english:
 The symbol is used for ‘defined as’
 Vertical bar for alternative definitions
 The symbol S for sentence,
 NP for noun Phrase
 VP for verb Phrase
 The declarative meaning of the rule:
 <S> <NP><VP> is that sentence S can take a
form in which noun _phrase (VP) is followed by a
verb_phrase().
 The simple sentences :
 The boys eats an apple.
 The cute girl sings a song.
Context free grammar for a subset of english
Language

Rules Dictionary words


<S> <NP><VP> <Det> a an the
<NP> <Det ><Noun> <Noun> girl apple Song
<NP> <Det><Adj><Noun> <Adj> cute smart
<NP> <Adj><Noun> <Verb> sings eats ate
<NP> <Verb>
<NP> <Verb><NP>
Bottom up parsing
Top down parsing

S-ar putea să vă placă și