Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas.

Similar presentations


Presentation on theme: "1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas."— Presentation transcript:

1 1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas & BinNet Corp.

2 2 Summary Agents = Objects + Logic + Inference Engines + Coordination + Remote Action Jinni 2002 Agent Programming Infrastructure: distributed, modular, component based, scalable, secure A Uniform Framework for Knowledge Processing and Reactive behavior

3 3 Jinni 2002 Jinni 2002: a fast Java based knowledge processing and agent programming software infrastructure distributed Prolog processes centered around active, constraint processing enabled blackboards high-level knowledge exchange protocols for mobile agents

4 4 Motivation networked, mobile computing increasingly complex patterns of interaction large scale knowledge processing tasks => agent programs with increasingly sophisticated inference capabilities, autonomy and self-reliance

5 5 Key Agent Programming: Reactive Behavior no need for interleaving thinking and action stages in the agent programming model itself. The availability of multi-threading, local and remote blackboard based coordination mechanisms, and multiple reentrant language interpreters allows a logical separation of concerns: inference mechanisms and reaction to events (expressed as patterns waiting for matching blackboard data) are expressed by orthogonal language constructs and can be programmed as loosely coupled components.

6 6 Multi-Agent Mechanisms Cyclic Multiple Depth First Inheritance Complex Agents are built by importing from a library of behaviors, roles and event processors Traditional inheritance: trees/lattice model Dominant information sharing model - the Web – directed graph structure multi-agent context: components developed by independent programmers: inheritance from a small set of similar "neighbors“, without being aware of the complete component library

7 7 Agent Negotiation Blackboard based programming provides natural building blocks for agent negotiation, search and market-style result optimizers. Our blackboards are enhanced with "blackboard constraint processing" - small chunks of additional code to be tested once the "waiting" pattern has been matched against new data produced by independent local or remote threads.

8 8 Jinni 2002: fast distributed Prolog in pure Java 1 million LIPS pure Java based Prolog - runs on.NET (with J#), on Windows, Unix, Pocket PC Blackboards, threads, remote predicate calls Support for agent programming: –flexible OO model – Cyclic Multiple Depth First Inheritence –orthogonal Programming Language Constructs

9 9 Objects and Logic Objects: –program composition and code reuse mechanisms and allow extension of a libraries of behaviors and knowledge processing components. Logic: –well understood, resolution based inference mechanisms –unification: flexible search, pattern matching

10 10 Inference Engines execution of multiple independent goals is needed for implementing complex reactive patterns in agent programs Engines are lightweight and highly autonomous instances of language interpreters - running through various scheduling models - in particular through blackboard coordinated multi-threading

11 11 Remote Action: a simple client-server style remote call mechanism a building bloc for various forms of remote action - in particular for supporting remote event propagation agent security layers: a combination of server side sandboxing, strong cryptography and password controlled server access the infrastructure provides P2P interaction patterns

12 12 Remote Calls run_server(Port,Pwd): ask_server(X,GX,Pwd,Host,Port,Result) abstract transport layer –unicast sockets –RMI, Corba, multicast sockets

13 13 Coordination agent coordination can (and should) be separated from the details of agent communication and the agent's computational mechanisms (engines). coordination through blackboards - databases with intelligent, constraint based search - instead of conventional message passing

14 14 Basic Linda Operations out(X): puts X on the blackboard in(X): waits until it can take an object matching X from the blackboard all(X,Xs): reads the list Xs matching X currently on the blackboard derived operations: cin/1, rd/1

15 15 Beyond Linda: Blackboard Constraint Operations wait_for(Pattern,Constraint): waits for a Pattern on the blackboard, such that Constraint holds, and when this happens, it removes the result of the match from the blackboard notify_about(Pattern): notifies about this Pattern one of the blocked threads which waits for it with a matching constraint

16 16 Coordination with Blackboard Constraints Two threads: T1 (prod) and T2 (cons) ?-notify_about(stock_offer(aol,11)). %T1 ?-notify_about(stock_offer(aol,9)). %T1 % action triggered in T2 => Price=9 ?-wait_for(stock_offer(aol,Price), %T2 less(Price,10)).

17 17 Secure Server and Client classes Communication through serialized sealed objects Server Window: ?- new(secure_server(8888,tweety),S), S:serve. hello Client Window ?- new(secure_client(localhost,8888,tweety), C), C:ask(println(hello)), C:disconnect.

18 18 Agents: Basic Agent Class :- [prolog_object,client,server]. % inheritance agent(Goal, LocalPort, RemoteHost, RemotePort, Password):- server(LocalPort, Password), client(RemoteHost, RemotePort,Password), bg(serve), bg(Goal). behave(N):- for(I,1,N), sleep(1), ask( println(message(I))), I=N.

19 19 Conclusion Logic Programming based Agent Programming Infrastructure: –Object oriented layer + inference engines –Secure peer-to-peer agent communication, coordination and goal execution –Blackboards with constraints and associative search have been suggested as an alternative to message passing agent architectures –Component technology – seamless integration of Java and Prolog classes


Download ppt "1 Object Oriented Logic Programming as an Agent Building Infrastructure Oct 12, 2002 Copyright © 2002, Paul Tarau Paul Tarau University of North Texas."

Similar presentations


Ads by Google