munication [Woo02], the Android mobile operating system and the Contract Net Pro- tocol (CNP) ... tal Expert for the task according to its skill set and location.
Scrutable Multi-agent Hazard Rescue System Andrei Mocanu and Costin Bădică
Abstract. Time-efficient and competent intervention in environmental hazard situations is critical. Numerous experts on the field have to be coordinated and the most appropriate one(s) should be sent to the danger zone. A traditional system would require a lot of effort on the part of the people involved, but would also involve the risk of not taking the best decisions under pressure. We propose an automated system that incorporates multiple autonomous agents, negotiation and argumentation techniques that is not only capable of making rational selections, but which can also provide justifications for the decisions it takes. Making transparent decisions is fundamental for gaining the people‟s trust in this solution, but can also be used for learning purposes and for fine-tuning parameters. The system, which involves a command center and a dedicated smartphone app for the field experts, has been tested in a simulated experimental scenario around the area of Craiova, Romania. Keywords: Multi-agent System, Assumption Based Argumentation, Decision Frameworks, JADE, Contract Net Protocol, Location-aware System, Android
1
Introduction
In a typical environmental hazard system the Dispatchers from a Command Center coordinate the Environmental Experts by communicating over the phone or through radio transmitters. As this can waste valuable time and is often difficult to maintain, we have developed a system [Moc12] based on FIPA1-compliant [Got11] agent communication [Woo02], the Android mobile operating system and the Contract Net Protocol (CNP) [Smi80] in order to effortlessly select the most appropriate Environmental Expert for the task according to its skill set and location. A fundamental direction that we wanted to explore was to make rational decisions that the system is able to justify in real time. These justifications can be then inspected by humans who can critique the way the decisions are made and suggest alternative actions, thus contributing to the overall quality of the system. A self-documenting system can also be of great help to authorities in charge of monitoring it, so rather than inspecting cold figures, they would be looking at intuitive graphs and possibly natural language explanations. We are also confident that designing transparent software will gain the users‟ trust at a faster pace and will lead to a better adoption rate compared to traditional software. 1
http://www.fipa.org
Andrei Mocanu and Costin Bădică
2
Related Work
There has been a wide research interest in the area of crisis management. The ALADDIN project [Ada08] is a multidisciplinary project concerned with developing techniques and architectures for multi-agent systems in uncertain and dynamic conditions. While the scope of their work is vast, it differs from ours as they consider agents that are able to perform rescue and evacuation missions themselves, while we consider software agents that simply act on behalf of human field experts by participating in negotiation protocols and performing tasks such as logging messages from the Command Center or fetching directions to the danger zone. The authors also explore decision making for agents, but they use other techniques such as Reinforcement Learning, and do not explore the possibility of agents giving explanations for their actions, which is what we aim to achieve. In [Bad11], the authors explore dynamic negotiation protocol selection and selfconfiguration in the context of disaster management. Although this work is similar in trying to find the appropriate measure imposed by a critical event, it is not concerned with designing and implementing a hazard management system. The authors of [Cam14] describe a method for making autonomous systems transparent which involves argumentation and natural language generation. The authors do not apply their research in the field of disaster management. Finally, argumentation has been applied to numerous application domains including medicine [Fan13, Moc14], law [Zho14] and social networks [Yag14], but to the best of our knowledge it has not been applied in hazard management.
3
Background
Making transparent decisions relies on Assumption based Argumentation (ABA) [Dung09] and decision frameworks with ABA. Decision frameworks [Fan13] are tuples :
a (finite) set of decisions D = {d1,…, dn}, n>0; a (finite) set of attributes A = {a1,…, am}, m>0; a (finite) set of goals G = {g1,…,gl}, l>0; a partial order over sets of goals PS representing the preference ranking of sets of goals; two tables: TDA (size n x m), and TGA (size l x m); We will use the notation T[x,y] for a cell in row x and column y in table T. - For all di D, aj A, TDA[di ,aj] is either: 1, meaning di has attribute aj; 0, meaning di does not have attribute aj; u, if the information is unknown; - For all gk G, aj A, TGA[gk,aj] is either: 1, meaning gk is satisfied by attribute aj; 0, meaning gk is not satisfied by attribute aj;
Andrei Mocanu and Costin Bădică
u, if the information is unknown; Given a decision framework DF = , a decision di D meets a goal gk G wrt DF, iff there exists an attribute ak A, such that TDA[di,ak] = 1 and TGA[gj,ak] = 1. γ(d) = S, where d D, S G, denotes the set of goals met by d. Given a decision framework edf = the most preferred set decisions [Fan13-2] are the decisions meeting the more preferred sets of goals that no other decisions meet, formally defined as follows. For every d D, d is the most preferred set decision iff the following holds true for all d’ D \ {d }: for all s S, if s (d ) , then there exists s’ S such that: - s’ > s PS; - s’ (d ) ; - s’ (d ) ; Assumption-based Argumentation (ABA) frameworks are tuples : • is a deductive system, with L the language and R a set of rules of the form 0 1,, m (m 0, i L) ; • A L is a (non-empty) set, referred to as assumptions; • C is a total mapping from A into 2L – {{}}, where each C( ) is a contrary of , for A . Given a rule of the form 0 1 ,, m , 0 is referred to as the head (denoted Head ( ) = 0 ) and 1 , , m as the body (denoted Body( ) = {1 , , m } ). We focus on flat ABA frameworks, with no assumption is the head of a rule. In ABA, arguments are deductions of claims using rules and supported by sets of assumptions, and attacks are directed at the assumptions in the support of arguments. Informally, following [Dung09]:
• an argument for (the claim) L supported by A A ( A• ⊢ in short) is a (finite) tree with nodes labeled by sentences in L or by 2, the root labeled by , leaves either or assumptions in A , and non-leaves ' with, as children, the elements of the body of some rule with head ' ; • an argument A1 •⊢ 1 attacks an argument A2 •⊢ 2 iff 1 is a contrary of one of the assumptions in A2 . Attacks between (sets of) arguments in ABA correspond to attacks between sets of assumptions, where a set of assumptions A attacks a set of assumptions A' iff an argument supported by a subset of A attacks an argument supported by a subset of A' . With argument and attack defined for a given F = , standard argumentation semantics can be applied in ABA [Dung09], e.g.: a set of assumptions is admissible (in F) iff it does not attack itself and it attacks all A A that attack it; 2
L represents “true” and stands for the empty body of rules.
Andrei Mocanu and Costin Bădică
an argument A ⊢ is admissible (in F) supported by A' A iff A A' and A' is admissible (in F); a sentence is admissible (in F) iff it is the claim of an argument that is admissible supported (in F) by some A A . As shown in [Fan13, Fan13-2, Matt09], ABA can be used to model decision making problems and compute “good” decisions. The ABA framework for computing the most preferred set decisions in a decision framework is defined as AF = for which: R is such that: for all dk D, isD(dk)←; for all gj G, isG(gj)←; for all ai A, isA(ai)←; for all gj G, st S, if gj st then inSet(gj , st)←; for all st , sr S, if st > sr PS, then prefer(gj, st)←; for k=1,..,n; j=1,..,m if TDA[k,i]=1 then hasAttr(dk,ai) ←; for j=1,..m;i=1,..,l if TGA[j,i]=1 then satBy(gj,ai) ←; met(X,Y) ←hasAttr(X,Z),satBy(Y,Z),isD(X),isG(Y),isA(Z) ; notMetSet(X,S) ←notMet(X,Y),inSet(Y,S) ; notSel(X)←metSet(X1,S),notMetSet(X,S),notMetBetter(X,X1,S); metBetter(X,X1,S)←metSet(X,S1),notMetSet(X1,S1), prefer(S1,S); A is such that: for all dk D, sel(dk); for all dk D and st S, metSet(dk,st); for all dk D and gj G, notMet(dk,gj); for all dk,dr D, dk ≠ dr and gj G, notMetBetter(dk,dr,gj); C is such that: C(sel(X)) = {notSel(X)}; C(notMet(X,Y)) = {met(X,Y)}; C(metSet(X,S)) = {notMetSet(X,S)}; C(notMetBetter(X,X1,S)) = {metBetter(X,X1,S)}.
4
System Design
Our initial system [Moc12] in Fig. 1 comprises agent and non-agent software components. Agent components are marked with the letter „A‟ on this figure. At the center of our architecture lie the servers which connect to the database management system, in our case MySQL. The servers are also configured to run the JADE platform
Andrei Mocanu and Costin Bădică
[Bel07] with the Main and Auxiliary Containers hosting a number of agents, being distributed on the available computing nodes.
Fig. 1. System Architecture
The Dispatcher agent is responsible for triggering the negotiation in order to select the best Environmental Expert for completing the task. The Environmental Expert agents connected to JADE‟s Containers can be in one of two interchangeable states: Fixed (when the Expert user is at his/her workstation) and Mobile (when the Expert user is on the field staying connected through his/her Android enabled device). The latter enables the participation of mobile skilled people in the experts‟ selection process facilitated by automated negotiation protocols. Finally, we use Google Maps and Google Directions API for map visualization and navigational capabilities. 4.1
Utility Function Decision
In our original system [Moc12] the Dispatcher agent uses the utility function u : X [0,1] defined by Eq. 1 to evaluate the offer x of each Expert agent and to select the most appropriate one(s) that provides him/her maximum utility: 6 2 2 min( xi , hi ) d i 1 w (1 w), hi 0 6 xtime 2 u ( x) hi i 1 d w (1 w), otherwise x time
(1)
Andrei Mocanu and Costin Bădică
Parameter d has a calibration role and its value is dynamically determined by the Dispatcher based on the offers received from the Experts. If xatime is the value provided by Expert agent a and if A is the set of Expert agents that submitted bids during a certain negotiation then the Dispatcher computes d as: d = minaA xatime. Parameter w represents the weight of the expertise component and was set to 0.5 in our scenario. Another important mathematical equation, the haversine formula (Eq. 2, [Wei15]), allowed us to calculate the distance between two points expressed by their geographical coordinates. The haversine formula, which is quite popular in navigation, returns the flight distance between two points. d 2r arcsin( sin 2 (
2 1 2
) cos( 1 ) cos( 2 ) sin 2 (
2 1 2
))
(2)
Replacing r in the formula with the Earth radius which is 6378 km we can successfully calculate the flight distance between two geographical points expressed in latitude and longitude. 4.2
Assumption Based Argumentation Decision Making
Although selecting the best Expert agent for the job based solely on utility is quite straightforward and quick it would be useful to explain the decisions taken by our hazard management system. We are able to justify the selections made by the Dispatcher agent by converting our initial problem into an ABA framework to which we can apply decision making semantics, more specifically reasoning about preferences over sets of goals. The potential decisions in our framework are going to be the Expert agents that responded to the initial CFP message. We discretize both the response times and levels of expertise of the Expert agents into a fixed number of attributes respectively, in our scenario we have chosen three. Thus, the Expert agent with the fastest response time along with other agents whose response times relative to the former‟s obtain a score of at least 70% gain the attribute timeOver70. In the same manner, the agents who have a relative score between 40% and 70% get the attribute timeBetween40And70, while agents who score below 40% get the attribute timeBelow40. Analogously, the agents with the best expertise level for the task along with those with a relative score of at least 70% gain the attribute expertiseOver70, those with a relative score between 40% and 70% gain the attribute expertiseBetween40And70, while agents who have a score less than 40% get the attribute expertiseBelow40. The goals that the agents need to satisfy are represented by different levels of response times and expertise scores. For our scenario we have chosen the same number of corresponding goals for the previously defined attributes. We introduce the goals: bestTime, goodTime, badTime, bestExpertise, goodExpertise, badExpertise and their relation to the attributes is given by the following empty rules which are going to appear in all generated ABA frameworks corresponding to each instance of the Contract Net Protocol.
Andrei Mocanu and Costin Bădică
Finally, we need to introduce the sets of goals and the preference relationships between them. For generating the sets of goals one possibility is to do a Cartesian product between the set of goals referring to response time and the set of goals referring to expertise levels. In this way, for our scenario we generate nine distinct sets of goals named: bestTimeBestExpertise, bestTimeGoodExpertise, bestTimeBadExpertise, goodTimeBestExpertise, goodTimeGoodExpertise, goodTimeBadExpertise, badTimeBestExpertise, badTimeGoodExpertise, badTimeBadExpertise. In our setup, we wanted to make getting to the hazard site slightly more important than the expertise level of the Expert agent involved. This lead to the preference relationships: bestTimeBestExpertise > bestTimeGoodExpertise > goodTimeBestExpertise > goodTimeGoodExpertise > bestTimeBadExpertise > goodTimeBadExpertise > badTimeBestExpertise > badTimeGoodExpertise > badTimeBadExpertise as can be seen graphically in Fig. 2.
Fig. 2. Goal Sets Preference Ranking
In an ideal case we would like the Dispatcher agent to select an Expert agent that satisfies the set of goals bestTimebestExpertise, but should this not be possible it will try to select an agent that satisfies the next best set of goals bestTimeGoodExpertise, etc. For a simplified scenario having just two possible choices of Expert agents (agent0 and agent1) we generate an ABA framework in order to select the most appropriate agent. To aid understanding, in this sample run agent0 has the quickest response time of 3 minutes, while agent1 has a response time of 5 minutes. This means agent0 will have the timeOver70 attribute, while agent1 will have a relative time score of 3/5 = 60% meaning that it will gain the timeBetween40And70 attribute. In the same scenario, agent0 will have an expertise level of 0.6 while agent1 will have an expertise level of 0.9, thus agent0 will have the expertiseBetween40And70 attribute while agent1 will have the expertiseAbove70 attribute. There is no agent which can simultaneously satisfy goals bestTime and bestExpertise, thus satisfying the set of goals bestTimebestExpertise, and thus the Dispatcher needs to look for a lower ranked set of goals in the preference list. The second most preferred set of goals bestTimeGoodExpertise is satisfied by agent0 who meets both the goals bestTime and goodExpertise.
Andrei Mocanu and Costin Bădică
By computing admissible solutions for the generated ABA framework using the Proxdd solver we are able to produce the dispute derivation graph which is partially illustrated in Fig. 3. By inspecting it we can see that the claim sel(agent0) successfully defends against all attacks (e.g. the attack stating that agent1 meets the set of goals bestTimebestExpertise that is a more preferred set of goals than bestTimeGoodExpertise is refuted by the proponent who points out that agent1 does not meet that set of goals because it does not meet the goal bestTime contained in that set).
Fig. 3. Dispute Derivation Graph
5
Experiments
Since not only the number of Expert agents in the system is important, but also the geographical area that they cover, we can deduce that a useful measure of the system is best expressed by the number of Expert agents per square kilometer (density) that can be efficiently handled by the system. In our experiment we considered a 400
Andrei Mocanu and Costin Bădică
square kilometer area centered in Craiova, Dolj, Romania (10 kilometers in any direction) and we constrained the Expert agents to this area. For testing our argumentation based decision making discretization, we wanted to discover how the attributes of agents will be distributed for the three different densities of experts we had in our initial experiment. We ran a number of 100 iterations for 10 agents on the field, 20 iterations for 50 agents on the field and 10 iterations for 100 agents on the field, thus yielding 1000 separate computations for time and expertise for each of the three scenarios. The outcome of these measurements is detailed in Fig. 4. As can be seen from the graph, the number of agents that satisfy the bestTime goal is always a minority and the phenomenon tends to be more pronounced as the density of agents increases. With the exception of the reduced density case where the numbers tend to be very close, the number of agents that satisfy the goodTime goal is 3-4 times greater than the number of agents that satisfy the bestTime goal. Over 65% of agents fall into the badTime category in all 3 scenarios, with an 86% figure in the last scenario. From this we can deduce that having an efficient relative response time is difficult to attain. The same cannot be said entirely about the expertise level of the agents. Although the expertise levels of the agents and of the hazards are randomly generated in this scenario, by examining the graph we observe that more agents tend to sit in the bestExpertise category, followed by the goodExpertise category. The badExpertise category is represented by a small minority of agents.
Iterations
1000
10 Agents
800
50 Agents
600
100 Agents
400 200 0 BestTime
GoodTime
BadTime
BestExpertise GoodExpertise BadExpertise
Fig. 4. Distribution of Time and Expertise Attributes
6
Conclusions
In this paper we have described an autonomous system that involves Android mobile users in negotiation protocols for task assignment in environmental hazard scenarios. The interchangeable agent state of the Environmental Experts, switching seamlessly from mobile to fixed mode, translates to permanent connectivity and a higher degree of flexibility for the system users. Furthermore, we have equipped our system with the ability to make transparent decisions using decision frameworks relying on assumption based argumentation. To the best of our knowledge, this is the first time that argumentation makes its way into a
Andrei Mocanu and Costin Bădică
system of such complexity designed for environmental hazard management. Such a scrutable system manifests several benefits such as self-documentation, easy introspection, improved maintainability and higher trustworthiness. Simulation runs have been conducted around the area of Craiova, Romania, producing encouraging results. Acknowledgement This work was supported by the strategic grant POSDRU/ 159/1.5/S/133255, Project ID 133255 (2014), co-financed by the European Social Fund within the Sectorial Operational Program Human Resources Development 2007 - 2013.
References [Ada08] Adams, N. M., Field, M., Gelenbe, E., Hand, D. J., Jennings, N. R., & Leslie, D. S., et al. (2008). Intelligent agents for disaster management. In Proceedings of the IARP/EURON Workshop on Robotics for Risky Interventions and Environmental Surveillance (RISE) [Bad11] Bădică A., Bădică C., and Ilie S., Muscar A., Scafeş M. (2011), Dynamic Selection of Negotiation Protocol in Multi-agent Systems for Disaster Management, in Computational Collective Intelligence. Technologies and Applications, vol. 6923, ISBN 978-3-642-23937-3, Springer Berlin Heidelberg [Bel07] Bellifemine, F., Caire, G., & Greenwood, D. (2007). Developing multi-agent systems with JADE. [Cam14] Caminada, M. W. A., Kutlak, R., Oren, N., and Vasconcelos, W. W. Scrutable plan enactment via argumentation and natural language generation. In Proceedings of the 13th International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2014) (Paris, France, 2014). [Dung09] Dung P. M., Kowalski R. A., and Toni F. Assumption-based argumentation. In Arg. in AI, pages 199-218. Springer, 2009. [Fan13] Fan X., Craven R., Singer R., Toni F., and Williams M. (2013) Assumption-based argumentation for decision-making with preferences: A medical case study. In Proc. CLIMA 2013 [Fan13-2] Fan X., Toni F., Decision Making with Assumption-based Argumentation, Second International Workshop on the Theory and Applications of Formal Argumentation (TAFA 2013), August 35, Beijing, China [Got11] Gotta D., Trucco T., Ughetti M., Semeria S., Cucè C., Porcino A. (2011) Jade Android Add-On Guide . Available at http://jade.tilab.com/doc/tutorials/JADE_ ANDROID_Guide.pdf [Matt09] Matt P. A., Toni F., and Vaccari J. Dominant decisions by argumentation agents. In Proc. ArgMAS. Springer, 2009. [Moc12] Mocanu, A.; Ilie, S.; Badica, C., Ubiquitous Multi-agent Environmental Hazard Management, Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2012 14th International Symposium pp.513,521, 26-29 Sept. 2012 [Moc14] Mocanu A., Fan X., Toni F., Williams M., Chen J., RecoMedic: Recommending Medical Literature through Argumentation, 4th International Workshop on Combinations of Intelligent Methods and Applications (CIMA 2014), November 10-11, 2014, Limassol, Cyprus [Smi80] Smith, R.G. (1980). The Contract Net Protocol: High-Level Communication and Control in a Distributed Problem Solver. IEEE Transactions on Computers, vol. C-29, no. 12, pp.1104-1113 [Wei15] Weisstein, Eric W. “Haversine” From MathWorld--A Wolfram Web Resource. Available online at http://mathworld.wolfram.com/Haversine.html [Woo02] M. Wooldridge, An Introduction to MultiAgent Systems, John Wiley & Sons Ltd, 2002. [Yag14] Yaglikc N., Torroni P., Microdebates App for Android: A Tool for Participating in Argumentative Online Debates Using a Handheld Device, Tools with Artificial Intelligence (ICTAI), 2014 IEEE 26th International Conference 10-12 Nov. 2014 [Zho14] Zhong Q., Fan X., Toni F., Luo X., Explaining Best Decisions via Argumentation, European Conferenceon Social Intelligence (ECSI 2014), November 3-5, 2014, Barcelona, Spain