Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Semantic Web Week 18: Web Agents that can reason … Module Website: Practical this week:

Similar presentations


Presentation on theme: "The Semantic Web Week 18: Web Agents that can reason … Module Website: Practical this week:"— Presentation transcript:

1 The Semantic Web Week 18: Web Agents that can reason … Module Website: http://scom.hud.ac.uk/scomtlm/chs2533 Practical this week:

2 Intelligent Agents - Overview Two points from last week: Basic Intelligent (Web) Agents are Programs capable of flexible, autonomous behaviour in dynamic, unpredictable environments SO they should be able to generate plans to solve goals and execute plans WEB SERVICES.. can be considered as “actions” as they have “preconditions” and “effects”

3 Semantic Web Services - Requirements Recap…. A SWS contains a computer-interpretable declarative description of the Service n Agents need to be able to discover the relevant web services that may satisfy their goals – with published costs/resources required to use the service n Agents need to be able to understand the Service protocol so that they can execute the service Agents need to be able to reason with the published capabilities of a service so that they can compose we services

4 Example - Mobile Virtual Agent Virtual Bank Service Booking Service MV Agent Action Book-theatre(T) Pre: seat-price(T,X)&resource(Y)&Y > X & atbooking-service(T) & Effects: ¬resoiurce(Y)&resource(Y-X)&have_ticket(T)

5 Example An intelligent agent has been given the goal of buying a ticket for a production p at Theatre t - formulated as "have_ticket(t,p)". The agent needs to have (i) a knowledge of its current situation and its environment. We can model this as facts about objects (ii) a knowledge of actions (executing web services) that it can take (iii) a knowledge of any events / actions that can result from other agents in the world

6 Action Knowledge This is CENTRAL to planning. Most simply, actions are modelled as PRE and POST conditions in the form of n PRECONDITIONS n EFFECTS u ADD SET u DELETE SET

7 Action Knowledge EXAMPLE Action: Book-theatre-seat(T,P) Precondition: seat-price(T,X)&haveresource(Y)&Y >= X & atbooking-service(T) & freeseat(T,P) Effects: ¬resource(Y)&haveresource(Y-X)&have_ticket(T,P) Action: GetMoney(B,Z) Precondition: have_password(B,P)& balance(B,A) & haveresource(Y) & A >= Z Effects: balance(B,A-Z) & haveresource(Y+Z) & ¬ balance(B,A) & ¬ haveresource(Y) Action: LoginBookings(T) Precondition: ¬ atbooking-service(T) & haveresource(Y)&Y >= 0 Effects: atbooking-service(T)

8 State Knowledge Agents need a knowledge of its current situation and its environment Initial state. A STATE represents a situation or snapshot of an application. This is sometimes called a WORLD STATE. STATES of a planning world are most simply defined as conjunctions of ground predicates (like a relational database for each state). Example: assume the agent knows that the following are true: seat-price(t,35)& haveresource(10) & have_password(ebank,$%)& balance(ebank,100) The agent’s goal is to achieve a state which contains the fact.. have_ticket(t,p)

9 Generative Planning The problem of reasoning with action specifications in order to generate plans containing those actions - involves SEARCH algorithms - is EXPONENTIAL in the size of the solution The area of computer science devoted to this problem is called “generative planning” and is a branch of artificial intelligence. EXAMPLE: GetMoney(ebank,15), LoginBookings(t), Book-theatre(t,p)

10 Exercises 1. Load the program in week 19 into a Prolog interpreter and execute is as follows: % sicstus |- [plan2]. …. Yes |- task1. …. |- task2. 2. Change the parameters in the web service descriptions around and re-run the tasks. Check the solutions have changed as expected. What happens if the agent runs out of money? 3. Use an editor an look at the “trace” file in your directory. Each of the ‘nodes’ represents a searched state. Can you see from the trace how the search takes place? 4. Change the web service knowledge so that the agent must logon to the bank before extracting money. 5. Try to make the web service knowledge more sophisticated by adding more services.


Download ppt "The Semantic Web Week 18: Web Agents that can reason … Module Website: Practical this week:"

Similar presentations


Ads by Google