170 likes | 284 Views
Agent Oriented Design. Agents, Mobility, Ubiquity & Virtuality. COMP 30240 Multi-Agent Systems Lectures: Gregory O’Hare School of Computer Science & Informatics, University College Dublin (UCD). Gregory O’Hare Department of Computer Science, University College Dublin.
E N D
Agent Oriented Design Agents, Mobility, Ubiquity & Virtuality COMP 30240 Multi-Agent Systems Lectures: Gregory O’Hare School of Computer Science & Informatics, University College Dublin (UCD) Gregory O’Hare Department of Computer Science, University College Dublin
A Modal Logic Classification K K5 KD K4 KT = KDT K45 KD5 KD4 KT5 = KT45 KDT5 KDT45 KD45 Notation A B Means that B is a strict superset of A that is every theorem of A is a theorem of B but not vice versa A = B Means that A and B contain exactly the same theorems KT4 = KDT4
Common Pitfalls of Agent oriented Design • Over selling of the agent metaphor and a failure to fully appreciate where agents can usefully be deployed in the design • Overly dogmatic and evangelical in the adoption of AOD. • Unsure as to why agents ought to be used • A desire to build generic solutions for what is in essence a one off problem; • The believe agents are a panacea or silver bullet; • One forgets that agent systems are indeed but one class of software and demand all the same methodological approaches. This is compounded by the immature nature of AOD methodologies.
Common Pitfalls of Agent oriented Design • Agent designs are inherently multi-threaded and as such must be respectful of the dangers of making the same mistakes that dog multi-threaded software • Designers often fail to exploit concurrency; • An unwillingness to exploit off the shelf architectures and software components; • The designer can see agents everywhere • The designer can see too few agents; • Agents interact too freely and in an undisciplined manner;
The Logical Omniscience Problem The logical omniscience problem occurs as a consequence of: • Knowing all valid formulae; and all knowledge/belief deriving from such under closed logical consequence. • Refers to the fact that such logics suffer from the fact that according to this model that if agent X believes/knows a set of axioms to be true then they must therefore believe that all the logical consequences of this set of axioms to be true. Thus the associated problems of computational tractability. Given a implies b Believes(w,a) Then Believes(w, b).
The Logical Omniscience Problem • Two well recognized approaches to representing Models of Belief are those of:- (i) Possible Worlds Model and (ii) Sentential Semantics. • Several approaches have been taken to try and circumvent the problem of ‘Logical Omniscience’ These can be characterised as :- • Syntactic Approach - Moore and Henderix (1979), Konolige (1986) • Semantic Approach- Levesque (1984)
Possible Worlds Model • Differentiate between the • Necessarily true operator (P) is true at wi in the frame <{w0,w1...} R> iff P is true in all worlds wj in this frame such that wj is accessible from wi (written R(wi,wj)) • Possibly true operator (P) is true at wi in the frame <{w0,w1...} R> iff P is true in wi or a world(s) wj in this frame such that wj is accessible from wi (written R(wi,wj))
Possible Worlds Model • Within the possible worlds model there is not merely one world but multiple worlds. Each world represents a different conceptualisation of the same base symbols and sentences. • Associated with each world w1..wn there is an Interpretation I1..In. • Within this model a wff is either true or false wrt a given world. • A wff has a value true with respect to a world wi when it evaluates to be true using the interpretation associated with that world. • An accessibility relation R exists which: • R(a, wi, wj) is satisfied when a world wj is accessible from world wi for agent a. • Differentiate between the • Necessarily true operator possibly • (P) is true at wi in the frame <{w0,w1...} R> • iff P is true in all worlds wj in this frame such that wj is accessible from wi (written R(wi,wj)) • Possibly true operator (P) is true at wi in the frame <{w0,w1...} R> • iff P is true in wi or a world(s) wj in this frame such that wj is accessible from wi (written R(wi,wj))
Agents and Wireless Sensor Networks Agents, Mobility, Ubiquity & Virtuality COMP 30240 Multi-Agent Systems Lectures: Gregory O’Hare School of Computer Science & Informatics, University College Dublin (UCD) Gregory O’Hare Department of Computer Science, University College Dublin
Agilla • Agilla is a middleware that provides a mobile-agent paradigm for programming and using wireless sensor networks (WSNs) it was developed at the University of Washington St Louis. • Agilla applications consist of mobile agents that can proactively migrate their code and state across the network. • Agilla runs on top of TinyOS and allows multiple agents to execute on each node. The number of agents is variable and is determined primarily by the amount of memory available. Each agent is autonomous, but shares middleware resources with other agents in the system.
Agilla Agilla provides two fundamental resources on each node: • a neighbour list. The neighbor list contains the addresses of neighboring nodes. This is necessary for agents to decide where they want to move or clone to next. • a tuple space The tuple space provides an elegant decoupled-style of communication between agents. It is a shared memory architecture that is addressed by field-matching rather than memory addresses. A tuple is a sequence of typed data objects that is inserted into the tuple space. The tuple is remains in the tuple space even if the agent that inserted it dies or moves away. Later, another agent may retrieve the tuple by issuing a query for a tuple with the same sequence of fields. Note that tuple spaces decouples the sending agent from the receiving agent: they do not have to be co-located, or even aware of each other's existence, for them to communicate.
Agilla • Agilla is the first mobile agent middleware for WSNs that is implemented entirely in TinyOS. • It has been tested on Mica2 and MicaZ motes. It abstracts away complexities associated with developing WSN applications, and provides mechanisms that overcome the challenges associated with limited resources and unreliable network communication. • It demonstrates the feasibility of using mobile agents within WSNs and, furthermore, it takes the first steps at identifying a minimal set of primitives that should be provided for facilitating highly flexible WSN applications.
Motivation for Mobile Agents within WSNs • Mobile agents offer more flexibility by allowing applications to control the way they spread. They can position themselves in the optimal locations for performing application-specific tasks. • They can save energy by bringing computation to the data rather than requiring that the data be sent over unreliable wireless links. • They can increase the utility of a WSN by constraining themselves to the specific locals that are relevant to their application's requirements (in contrast to spreading throughout an entire network), and sharing the resources of a single node, i.e., multiple mobile agents can reside on each WSN node. • Other systems like Deluge and Maté allow in-network reprogramming. Agilla, however, goes one step further by allowing programs to control where they go and to maintain both their code and state across migrations.
Motivation for Mobile Agents within WSNs • Since new agents can be injected into a pre-existing network, the network can be re-tasked. Since each agent executes autonomously and multiple agents can simultaneously run on a node, multiple applications can co-exist. • Since mobile agents can move and clone, they can quickly morph an application's installation base to handle unexpected changes in an environment. There are many other inherent advantages of using mobile agents, especially in a wireless sensor network.
Challenges for Agents and WSNs However, there are also many challenges: • the foremost being the lack of computational resources description of the resource constrained nature of a typical mote (Mica Mica2) and unreliable network connectivity (lossy and unpredictable). • Issues of serialization should (encoded in an appropriate form for transmission), • Issue of security and protecting against malicious mobile code
Comparison of AFME & Agilla Key Comparisons: • AFME supports BDI style strong agents with an explicit mental state unlike Agilla agents that are of a much weaker genre. • AFME is not dependent upon TinyOS. Agilla is and therefore can only operate on restricted platforms; • AFME is implemented in Java and is thus extremely portable though it would be argued that JVM requirements places an unnecessary expectation on the computational power of the host device; • AFME only supports weak migration because of Java and the prohibition of access to system variables;