Advanced user agent v clean

23
© Copyright 2012 STI INNSBRUCK www.sti-innsbruck.at Advanced User Agents Nelia Lasierra [Book: Introduction to read-write linked Data Chapter: Advanced User Agents]

Transcript of Advanced user agent v clean

www.sti-innsbruck.at© Copyright 2012 STI INNSBRUCK www.sti-innsbruck.at

Advanced User Agents

Nelia Lasierra[Book: Introduction to read-write linked Data

Chapter: Advanced User Agents]

www.sti-innsbruck.at

What?

Advanced User Agents

“Piece of software that operate autonomously on the web on behalf of theirusers”

“Piece of software to which a user can delegate a task to”

“An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors” [2]

[1] Advanced user Agents[2] Intelligent Agents. Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig, c 1995 Prentice-Hall, Inc.

2

www.sti-innsbruck.at

Why? How?

What for?

- Information gathering/question answering- Recommendation systems- Order shopping- Future activities under certain conditions

If we want this to happen…

1) Agents need to interact with the web need some intelligence.By means of rules, we can specify agents that carry out HTTP operations

2) Agents need to communicate with the user (process input/output information).

3) Agents understand the intend of the user.

3

www.sti-innsbruck.at

Rational agent

Ideally…

A rational agent is the one that does the right thingDirects its activity towards achieving goals.

“For each possible percept sequence, an ideal rational agent should do whatever action is expected to maximize

its performance measure, on the basis of the evidence provided by the percept sequence and whatever built-in

knowledge the agent has.”

Intelligent Agents. Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig, c 1995 Prentice-Hall, Inc

4

www.sti-innsbruck.at

Technologies

Components of a typical mobile user agent.

1) Speech Synthesis/recognition : 2) Natural Language Processing 3) Contextual Awareness4) Declarative Abstraction (reasoning/planning)

5

www.sti-innsbruck.at

1) Speech Synthesis/recognition : Artificial production of the human speech.• A speech recognition module transcribes the user’s speech into a word stream.

The character flow is then processed by a language engine dealing with syntax, semantics, and finally by the back-end application program [1].

• A speech synthesizer converts resulting answers (strings of characters) into speech to the user [1]. “A text to speech system, takes some text as an input and produces the equivalent human speech normally by concatenating pieces of recorded speech that are stored in a database” [2].

1] An Overview of Speech Synthesis and Recognition. http://fileadmin.cs.lth.se/cs/Personal/Pierre_Nugues/ilppp/chapters/speech.pdf[2] http://en.wikipedia.org/wiki/Speech_synthesis

Technologies

6

www.sti-innsbruck.at

Technologies

2) Natural Language Processing

- Natural Language Understanding- “NLP enables computers to derive meaning from human or natural language input”- “Natural language processing (NLP) is the ability of a computer program to understand human speech as it is spoken.”

Included tasks:

• Sentence segmentation, part-of-speech tagging and parsing• Deep analytics.• Named entity extraction.• Co-reference resolution.

7

www.sti-innsbruck.at

Technologies

3) Contextual Awareness

- Concerns with the acquisition of context- Linked with changes in the environment- Context: perceived situation, environmental that may determine which actions should

be triggered.- Advanced User agents make use of this sensors and actuators.

- Sensors: clock, location, temperature, audio, video- Actuators: ring sounds, loudspeakers, screen

4) Declarative Abstraction (reasoning/planning)

8

www.sti-innsbruck.at

Example…

“Who is married to the daughter of Ingrid Bergman?”.

1) Natural processing language block enables to get an accurate reading of the questionand request (Speech act theory)

Speech act theory tries to answer communication patterns. Intention of the speaker

9

www.sti-innsbruck.at

Speech Act theory

Speech act is the minimal functional unit in human communication [1]

• assertives = speech acts that commit a speaker to the truth of the expressed proposition,

• directives = speech acts that are to cause the hearer to take a particular action, e.g. requests, commands and advice

• commissives = speech acts that commit a speaker to some future action, e.g. promises and oaths

• expressives = speech acts that express the speaker's attitudes and emotions towards the proposition, e.g. congratulations, excuses and thanks

• declarations = speech acts that change the reality in accord with the proposition of the declaration, e.g. pronouncing someone guilty

[1] http://instructional1.calstatela.edu/lkamhis/tesl565_sp04/troy/spchact.htm [2] http://en.wikipedia.org/wiki/Speech_act

10

www.sti-innsbruck.at

Example…

“Who is married to the daughter of Ingrid Bergman?”.

1) Natural processing language block enables to get an accurate reading of the questionand request (Speech act theory)

2) We asume there is a component that translates the user intent to a SPARQL query3) This query could be answer using DBpedia.

11

www.sti-innsbruck.at

DBpedia

• DBpedia is a crowd-sourced community effort to extract structuredinformation from Wikipedia and make this information available on theWeb [1]

• DBpedia allows you to ask sophisticated queries against Wikipedia,and to link the different data sets on the Web to Wikipedia data [1]

• DBpedia is a project aiming to extract structured content from theinformation created as part of the Wikipedia project. [2]

• DBpedia allows users to query relationships and properties associatedwith Wikipedia resources, including links to other related datasets [2]

[1] http://dbpedia.org/About

[2] http://wiki.dbpedia.org/About

12

www.sti-innsbruck.at

Example…

“Who is married to the daughter of Ingrid Bergman?”.

1) Natural processing language component enables to get an accurate reading of thequestion and request.

2) This query could be answer using DBpedia.

13

www.sti-innsbruck.at

Example…

“Who is married to the daughter of Ingrid Bergman?”.

1) Natural processing language block enables to get an accurate reading of the questionand request.

2) This query could be answer using DBpedia.

3) Assuming the agent verbalise RDF triples and graph patterns automatically.

14

www.sti-innsbruck.at

Agent’s Behavior

Question…

How the communication is done between the agent and the user in N3 notationsyntax? The user input in N3 is parsed and fed to a rule engine evaluating a set of rules that specify runtime behaviour.

Other Characteristics:

Termination (the agent should be running continously) Negation as failure (check for absence of information)

Needed to know what the agent knows and is true from the view of the useragent.

Store certain information to avoid asking all the time.

15

www.sti-innsbruck.at

Agent = architecture + program

An agent program maps from the percept to an action choices, while updating its internal state. This program will run over an architecture.

Ideal mappings: actions for every percept

• Built-in Knowledge The agent operates successfully when those assumptions hold, and thus lacks flexibility.

• Experience + built-in knowledge autonomy

A system is autonomous to the extend that is behavior is based on his own experience.“An autonomous agent is a system situated within and a part of an environment that senses that environment and acts on it, over time, in pursuit of its own agenda and so as to effect what it senses in the future. “

Agent’s Behavior

16

www.sti-innsbruck.at

Structure of Intelligent agents

How to implement the mapping from percepts to action?

• simple reflex agents• model-based reflex agents• goal-directed agents• utility-based agents• learning agents

http://en.wikipedia.org/wiki/Intelligent_agent

17

www.sti-innsbruck.at

• Reflex Agents

- Simply react on the sensedstate of the world. Act only onthe basis of the currentpercept igoring the rest of thehistory.

- Their behaviour can be specified using rules.

- The agent function is based on the condition-action rule: if condition then action.

- Matches the perceived situation with an available rule and executes the associated action.

- Model-based reflex agents: Actions based on the current situation state.

Structure of Intelligent agents

18

www.sti-innsbruck.at

• Goal-Direct Agents

- The current situation is notenough to decide what to do.

- The agent also needs to knowthe goal. The goal describes the situations that are desirable(right decisión)

- The agent choose amongmultiple posibilites selecting theone which reaches the goalstate.

http://www.stucharlton.com/blog/archives/2010/03/building-a-restful-hypermedia.html

Structure of Intelligent agents

19

www.sti-innsbruck.at

• Goal-Direct Agents

- These agents needinformation of the goal

Hierarchical FSMsBehaviour trees technologies

http://www.stucharlton.com/blog/archives/2010/03/building-a-restful-hypermedia.html

Structure of Intelligent agents

20

www.sti-innsbruck.at

• Goal-Direct Agents

- An agent responds to changes in the environment based on its current state and a set of known transitions.

- Hierarchical Finite State Machine (FSM)

FSM based-systems are great for reactive systems where the correctinterpretation & response to input and events is the intent of the application.

The response to an event generally depends on both the type of the eventand on the internal state of the system and can include a change of stateleading to a state transition.

Provide reusable transitions between states.

http://www.stucharlton.com/blog/archives/2010/03/building-a-restful-hypermedia.html

Structure of Intelligent agents

21

www.sti-innsbruck.at

• Utility based agents

- Goals are not enough to implement a good behavior- Higher utility for the agent == higher quality of being useful.

http://www.stucharlton.com/blog/archives/2010/03/building-a-restful-hypermedia.html

Structure of Intelligent agents

22

www.sti-innsbruck.at

Thank you!

The end

23