Agents and the Semantic Web
• Knowledge-based (Expert) System research reached
several interesting conclusions
– While extremely useful, such systems are enormous
undertakings (dozens to hundreds of man-years per system)
– With proper tools (shells, languages), non-AI people can
construct these systems
– Automated knowledge acquisition reduces the effort needed to
construct them
– They are brittle because they lack general knowledge
• KBS construction moved out of the active realm of AI
research, but it was realized that we still need systems
that can reason autonomously and apply worldly
knowledge
– This becomes even more critical as we focus on how we might
use the distributed knowledge available on the WWW
– This led to research into more primitive forms of reasoners:
the intelligent agent
Agents: Some Definitions
• There is no single definition that adequately covers
what everyone wants an agent to be but there are
several commonly cited features:
– Autonomous – must be able to work on its own to solve
the problem
– Communicative – must be able to communicate with other
agents or knowledge sources to acquire knowledge or data
– Goal-oriented – must be able to, given a task, figure out
how to solve the task and work toward that go
– Perceptive – must be able to sense its “environment”
– Mobility – must be able to move within its environment *
– Sociability – ability to communicate with a human during
problem solving *
• To define an agent, which features are necessary?
– * these features are not required by all researchers
• Will these features help us identify what an agent is?
What Does Autonomy Require?
• First and foremost, the agent must know how to
solve the given problem
– It must have its own
• problem solving method(s)
• knowledge-base
• ability to acquire necessary input
– Fortunately, unlike KBS, the methods and knowledge-
base content are limited to a very specific problem, so
constructing the agent should be more straightforward
– How does the agent know where to seek the necessary
input?
• do we want to provide a static list of sources?
• can the agent find proper sources in a dynamic environment?
Communication
• Agents need to be able to communicate with other
agents
– An agent must know what other agents exist and how to
contact them
• a static list may not be useful, consider how dynamic the web is
– An agent must be able to send messages that other agent(s)
can understand
– An agent must be able to understand or interpret responses
from agents
• ontologies can be used to help facilitate the actual exchange of
information since it is unlikely that the two agents will “speak the same
language”
– An agent must know which of the available agents can
accommodate the request of this agent
• for instance, which agent can answer question X or supply datum Y?
– An agent may want to know what other agents are trustworthy
(can I trust the response from that agent?)
Types of Environments
• Accessible vs. inaccessible: agent’s sensors give it
access to the complete state of the environment at each
point in time
• Deterministic vs. non-deterministic: next state of the
environment is completely determined by the current
state and the action executed by the agent
• Episodic vs. non-episodic: agent’s experience is
divided into atomic episodes, each episode consisting
of a perception-action pair where the action is a single
action/event
• Static vs. dynamic: environment is unchanged during
the agent’s deliberation of an action
• Discrete vs. continuous: limited number of distinct,
clearly defined percepts and actions
• Single agent: the agent works in isolation (no other
agents around)
Example Environments
• The easiest environment to understand is that of a robot
– the robot can use a variety of sensors: visual (camera),
radar/sonar, audio, heat, tactile, etc
– a robot might need to sense if
• something is in the way
• an object has been given to it and if that object is the object expected
• the terrain is level
• On other hand, an environment may be artificial
– a softbot in a flight simulator will receive input from the flight
simulator but the input is as information-rich as a physical
environment
• An agent situated in a network also senses an artificial
environment but the environment here is limited
– communication passing across the network intended for
different agents or network nodes
– the agent only has to distinguish if a message is meant for it
and then interpret the message
Examples
An environment would be considered semi-static if the environment is
not changing between agent decisions but if the agent is on a time limit –
for instance, in timed chess, the agent has to watch the clock or else be
penalized (or lose) if time runs out
The Problem of Mobility
• True mobility means some degrees of freedom
– This may be physical motion like a robot that has a
robotic arm, or an autonomous vehicle
– Or it may be a process that is able to move from one
processor to another – it’s freedom is in that it can choose
to migrate elsewhere
• If we restrict “mobile” to the above two forms of
degrees of freedom, then we disallow most forms of
software as not being agents, or we have to remove
this attribute from the list of what agents should do
– Communication is not mobility and most software on the
Internet (or other networks) do not move from processor
to processor but instead send out messages/requests
• Is the distinction important?
– If a process cannot migrate but can communicate, why
should we care?
What is and What is Not an Agent?
• We have to be careful in defining an agent
– All too often, the definition is so loosely based that it can
include any software product
– For instance, any computer program can be thought to be the
following
• autonomous – program works on its own to solve the problem
• communicative –program communicates with other programs
• perceptive – program receives input from various sources
• goal-oriented – program has an implicit function (goal)
• So how do intelligent agents differ?
– For one, we hope that an intelligent agent can plan and handle
surprising circumstances
– For another, the environment might be more than merely user
input
Examples: Are They All Agents?
An Agent Classification
• Some comments
– Viruses have goals and mobility, but are they
communicative or perceptive?
– Artificial life forms may not qualify as their only goal
is to survive and they may not be perceptive
How Does an Agent Differ from AI?
• Many AI systems have been developed that are autonomous,
goal-oriented (in that they plan actions) and perceive their
environment
• Why create a distinction between ordinary AI and agents?
– the KBS sits in isolation, communicating with a user to solve its
problem
– an agent communicates with other agents and interprets what those
agents communicate to them
– the agent will reason (plan out) how to solve the problem by using
its own mechanisms as well as drawing upon other agents
• On the other hand
– an agent will not typically require the depth of knowledge that a
KBS will
– an agent may not need to utilize uncertainty handling
– an agent may require worldly knowledge, common sense
knowledge, or natural language capabilities that the KBS does not
require
• Generally, an agent should be easier to implement than a KBS
Agent Architecture
• The agent operates as follows given a goal to accomplish
– sense the environment
– plan out a course of actions
– select the next action to perform which will modify the
environment and state
– repeat until Goal has been reached
How difficult is it to
sense the environment?
Will actions necessarily
accomplish the plan step
Environment
as expected?
Can other agents influence
the environment?
How are the plans stored
and selected?
Types of Agents
• Reflex Agent
– simplest form, the agent merely reacts to its environment – no
memory, no internal states, no planning
• State-based Agent
– the next step up is an agent that keeps track of its current (and
possibly previous) state(s), this can help with planning and
understanding
• Goal-oriented Agent
– this agent has the ability to plan out a sequence of states to
achieve in order – planning might be based on a table-lookup
approach or something more elaborate using a search
mechanism and available planning knowledge
• Utility-based Agent
– the agent has the ability to determine the usefulness of a plan
step toward achieving its goals so that it can achieve the goals
in a more optimal fashion, and possibly have better final results
for goals
Comparison
Representative Agents
• An agent which represents your interests
– This implies that the agent has some knowledge or
understanding of your desires, goals, interests
– Examples:
• email filter agent – not only to filter out spam, but to prioritize
messages
• shop-bot agent – knows your preferences on the items being
shopped, and knows your monetary restrictions
• FAX – an email responding agent (or even a phone answering
agent) that will mimic your responses to anticipated inquiries
– Representative agents may require
• the ability to communicate in natural language
• the ability to explain itself to the person being represented
• some common sense reasoning capability
• the ability to judge what is trivial and therefore does not require
your attention
– Planning capabilities may not necessarily be needed
Learning (Adaptive) Agents
• Reactive learning – based on previous failed attempts
• Caching solutions – case based reasoning or chunking
• Novel learning – learning new ideas as they are faced
– this might including learning new plan steps, learning new agents to
communicate with, learning that previous plan steps can accomplish
goals
• A learning component requires a solution to the utility problem
– How do you know that the new piece of knowledge is worth saving?
– How do you index this new piece of knowledge?
– Do you discard older
knowledge in favor of the new?
• While we prefer adaptive
agents, learning is a very
challenging problem which
may interfere with the
performance of the agent
RETSINA Agents
• RETSINA: Reusable Environment for Task-
Structured Intelligent Networked Agents
– See http://www.cs.cmu.edu/~softagents/intro.htm
– The idea is that communication between agents is
problematic
• how does an agent know who to communicate with in a dynamic
environment and can they communicate correctly?
• RETSINA uses matchmaker (or middleware) agents
to facilitate communication between agents
– The environment being operated on is open and dynamic
so that agents may be added or deleted from the
environment, and agent capabilities might change over
time
– Additionally, the network environment is uncertain – an
agent may or may not be available when next needed
– Agents may fail (that is, an agent is not assumed to
always be correct)
RETSINA Agent Properties
• Types of agents:
– Interface agents interact with users, receive user input, and
display results
– Task agents help users perform tasks, formulate problem-
solving plans and carry out these plans by coordinating and
exchanging information with other software agents
– Information agents provide intelligent access to a
heterogeneous collection of information sources
– Middle agents help match agents that request services with
agents that provide services
• Communication and Coordination module accepts and
interprets messages and requests from other agents
• Planning module takes as input a set of goals and
produces a plan that satisfies the goals
• Scheduling module uses the task structure created by the
planning module to order the tasks
• Execution module monitors this process and ensures that
actions are carried out in accordance with computational
and other constraints
RETSINA Agent Architecture
The Semantic Web
• We now define an improved WWW, the Semantic Web
– The WWW is currently a syntactic structure
• you find information through syntactic URLs
• and you search using search engines that primarily do keyword
(syntactic) matching
– To fully utilize the knowledge of the WWW, we need to add
semantics
• now we have a problem, in providing semantics to a piece of
knowledge, how do I know that my interpretation will match yours?
• this is where an ontology can come in
– The idea behind the Semantic Web is to
• modify the WWW to include semantic information for every available
resource
• the semantic information might be supplied by human, or annotated
automatically through some software process (where possible)
• add intelligent agents to harvest the knowledge from the web
Detailed Example
• From the Berners-Lee/Hendler/Lassila article
• Mom needs to see a specialist and then has to have a
series of physical therapy sessions (biweekly)
• We want our intelligent agent set up the appointments
– Lucy will drop off mom and Pete will pick her up
– Lucy’s agent knows mom’s prescribed treatment (from the
doctor’s agent)
• Lucy’s agent
– looks up several lists of providers
– checks for the ones in-plan for Mom’s insurance within a 20-
mile radius of her (Mom’s) home and with a rating of excellent
or very good on trusted rating services
– begins to find a match between available appointment times
(supplied by the agents of individual providers through their
Web sites) and Lucy’s schedule
Continued
• The initial schedule is compared with Pete’s agent which
detects a conflict: the selected hospital is across town
and the pick up time is during rush hour
• Pete’s agent queries:
– “Can we either change the appointment time or the
appointment location?”
• Lucy’s agent trusts Pete’s agent
• Pete’s agent finds a new location/time but finds
– that Pete would have to reschedule a couple of his less
important appointments
– the hospital selected is not included on the insurance
company’s list of providers under physical therapists
– however, Pete’s agent can confirm that this hospital will be
covered on the insurance company citing a different source
Example Concluded
• Pete must get involved at this point
– he confirms that the less important appointments can be
rescheduled but trusts that the agent found accurate
insurance information
• Pete confirms the new plan to his agent and since
Lucy’s agent trusts Pete’s agent, Lucy’s agent
confirms as well on behalf of Lucy
• Here are some comments on the example:
– Autonomous actions
• each agent was able to come up with a plan given the initial
goal of “make appointment” with the given constraints
– Communication
• the two agents communicated to each other and presumably
to other agents (hospital agents, insurance company agents,
doctor’s agents)
Comments Continued
• Sociability
– When necessary, Pete’s agent communicated to Pete the
problems (appointments needing to be rescheduled, insurance
question)
– But in the case of the insurance problem, the agent was able to
offer a separate source for information
• Use of Ontologies
– Although not stated, it is likely that the agents would have to
appeal to various ontologies to perform their planning
– For instance, Pete’s agent was able to determine that the
doctor/hospital was covered under the mother’s insurance
policy, not through the insurance web portal, but through some
other means
• Notice that neither agent was mobile
– the problem did not call for this
More on the Semantic Web
• There are other issues to consider including trying to
determine the reliability of another agent
– If one representative agent communicates with another
representative agent, we have a situation where the
representative agents are both trying to communicate in favor
of the person they are representing
– In negotiations, this means that both representatives will try to
achieve the goals of the individual they represent though any
justifiable means
• being intentionally or unintentionally misleading
• not divulging all relevant information (unless asked)
• cheating
– There is a whole new problem being studied of determining
whether an agent can be trusted
– This is as much a matter of psychology as it is computer
science as we now must include mental models in our agent’s
environment
• the mental model of the other agent or human that the agent represents
Multi-Agent Systems
• We also need to differentiate between
– an agent that has subroutines to accomplish its task
– and multiple agents that work together to accomplish a task
• In the latter case
– how does one agent know what other agents to communicate
with?
– how do the agents communicate (message passing? remote
procedure calls?)
– what happens if a communication is interrupted?
– will there be multiple agents that could accomplish a given task
so that one agent can call upon several agents and then select
among the responses?
– will there be a single governing agent?
• These problems are similar to any distributed process but
now it becomes more convoluted as we step up from
simple processes to goal oriented processes
How the SW Works: The URI
• The uniform resource identifier
– Somewhat like a URL used in an http statement, this is
the Internet address of a resource (document, web page,
image file, executable, etc)
– The URI may utilize html, xml or xslt
• The syntax is schemetype : address and can
optionally be followed by a query and/or a fragment
that contains a direction for a secondary source
– The scheme type will include http, ftp, mailto, src, tel, file
– The address which is scheme dependent
foo://usr1:pswd@locale.com:8042/pub/stuff/file.dtb;type=animal?name=ferret#nose
\ / \________________/\_____/ \__/\_______/ \_____________/ \__________/
scheme userinfo hostname port path filename query fragment
How the SW Works: RDF
• The resource description framework is a language
for representing information about resources on the
web
– The RDF will include a URI but also metadata that will
help an agent identify if this is the right resource or how
useful the resource might be
• author of the resource, copyright info, licensing info, price,
availability or consumer information, etc
• the metadata is not intended for human eyes
– RDF is written in XML (or XML-like notation)
Eric Miller
Dr.
More on RDF
• An RDF expression is a collection of triples where each
triple is a subject, an object and a predicate (or property)
– The subject or object can be a URI, a literal value, or a blank
(basically a distinct object that is not referenced by any other
RDF expression)
• blanks (known as blank nodes) can be used as a collection of pointers
to other URIs
– Literal values can be names, dates, numbers, etc and while
literal value could be stored in a URI, the ability to use literals
makes an RDF expression more concise, literals can also
contain XML tags
RDF Example
Dave Beckett
RDF/XML Syntax Specification (Revised)
How the SW Works: Ontologies
• Now that we have revamped the WWW to
include the metadata that can be used by
Internet agents, we can populate the web with
knowledge sources
– We use ontologies to describe the knowledge
• DAML (DARPA Agent Markup Language) was a first
attempt at an ontology language, DAML+OIL added the
Ontology Inference Layer, and now DAML+OIL has
become OWL, the primarily used ontology language
– How do we use the ontology?
• the next slide represents the class wine, and we can use
the knowledge to infer, for instance, that wine is a
physical thing, it is a drink, it is made from grape
OWL Entry
1
1
How the SW Works: Inferences
• Much of the knowledge in an ontology is class-
subclass and class-property
• How do we make inferences?
– Inheritance: anything true of a class is true of a
subclass
• what about multiple inheritance?
– Property inference: if a class has a property and we
know X is true about a property, then we infer X is
true of the class (see the next slide for some types of
properties)
– Subset relationships similarly allow property inference
from the set where we can apply transitivity
– Instances: anything true of a class is true of an
instance of the class
Example Ontology Properties
• Aside from subtype of, when given a list attributes
or properties, we can use
– intersection of, union of, complement of, one of
• Cardinality – default value or range, is a property
universal, existential, or qualified?
• Made from – manufactured vs. natural, restrictions
on which entries are made from this thing
• Equivalent class
• Datatype property – specialized property for given
data type, can include data range and domain
• Spatial property(ies) – contained in, adjacent to, on
top of, etc
• Temporal property(ies) – co-occuring, preceding,
overlapping, following, one-time
How the SW Works: Agents
• Finally, we have our Internet agents as described
earlier in these notes
– When given a task, the agent has a plan to accomplish
the task
• the plan may be static or adaptive
– The plan will usually draw upon knowledge sources and
other agents
• seek information from ontologies, possibly translating terms as
needed
• use inferences on ontology information
• find other sources if a given source is not available
– Obtain responses from other agents
• is the response useful? (accurate)
• is the response in a usable format?
• is the response trustworthy?
Real Example: Medical Research
• Research at Cincinnati’s Children’s Hospital
– Downloaded several incompatible databases, all
translated into RDF
– They then used public domain SW software (from
Stanford U and HP labs) to integrate the knowledge
– This was followed by using a ranking algorithm
(similar to Google’s) to sort through the integrated
knowledge
• through this process, they identified four genes with strong
connections that implicated dilated cardiomyopathy
– Similar work is going on at Eli Lilly and the
University of Texas Health Science Center
• Is this the same as using the semantic web as
described earlier?
Strengths of the Semantic Web
• Distributed nature, like the web itself, permits access to any
knowledge anywhere
– This also allows an agent to access different sources of the same
knowledge
– This also allows an agent to find additional evidence for instance by
resolving the insurance question from the previous example by
finding an independent knowledge source
• By allowing anyone to contribute, the knowledge sources
have differing perspectives
– This provides a richer set of knowledge, although may bring about
contradictions that one must reason over
• By building on top of the WWW, we can utilize knowledge
already made available
– Although this presents an enormous challenge – how do you convert
syntactic information as currently found on the web to semantic
information, by hand or by software conversion?
Application Areas for Internet Agents
• Calendar agents and scheduling
– such as the previously covered scheduling example
• Customization of web sites/Recommender agents
– sites that tailor your visiting page based on what it thinks you
will like
• Shopper agents
– finding the best deals, customizing purchases (for instance,
putting together a vacation by finding the best deals that also
match your interests)
• Commerce agents
– that help you with on-line investing by bidding for you
• Personal communications and secretaries
– as covered earlier, agents that communicate on your behalf
and possibly respond to inquiries
Application Areas Continued
• Research tools
– being able to have the search engines do most of the research
for you, finding the documents that you are interested in based
on content, not key words
• Data mining
– using agents to build upon human knowledge by combining the
semantic content of different sites
• Homeland security
– for instance by locating terrorist communications via websites
• Sensor interpretation
– consider a building which has a variety of sensors, agents work
together to ensure the safety of the building (from fire,
vandalism, break ins, etc)
Application Areas Continued
• Tool assisting agents
– consider the paper clip from MS Office, lets expand that into
something that is really helpful
• a programmer’s assistant that finds errors as you enter them
(such as forgetting to declare a variable, or mistyping a reserved
word)
• a composition assistant that helps with your prose
• a music assistant that helps fill in musical passages as you
compose by computer (for instance, providing a bass or
percussion accompaniment)
• a copyright agent which confirms that the contents you are
working on do not violate copyrights or plagiarize
• a research aid which finds sources for you (whether on the
Internet or elsewhere)
Open Problems
• Just about all the problems are still open problems, but
some specific problems being researched include
– How to translate from one ontology format to another (for
instance, there are OWL Cyc and Cyc OWL translators)
– How to make inferences over the knowledge of an ontology
– How to find sources to obtain needed knowledge
– How to add semantics to syntactic documents automatically
especially multimedia documents (how do you automatically
annotate an image in terms of describing its content?)
• and how to confirm the correctness of any of these four operations
– And traditional AI problems applied to the Semantic Web and
agents:
• planning
• sensor interpretation
• learning
• natural language understanding and word sense disambiguation
• uncertainty handling – can you trust or believe what another agent tells
you?