cycle, the larger the expected efficiency gains. In the worst case in which all queries areonly performed once in a cycle, i.e. n = 1, the cache will incur an increase in the costwhich is linear in the number <strong>of</strong> queries, i.e. N · (c ins + c hit ).4.2 Experimental EvaluationTo estimate values for c ins and c hit and the potential improvement in performancethat may be obtained from caching, we implemented the caching mechanism describedin algorithm 1.1 and evaluated its performance by simulating the execution <strong>of</strong> eachagent platform with caching using the query and update logs for the Blocks World andElevator Sim experiments. The cache is implemented as a single hash table that is filledthe first time a query is performed in a query phase and cleared when the first update isperformed in the subsequent update phase.As might be expected, the cost <strong>of</strong> both cache insertions and hits were low. For ourimplementation, the cost c hit was about 1 microsecond (0.45 − 1.16µs) with a similarvalue for c ins (0.29 − 0.83µs).Even in the experiment with the lowest value <strong>of</strong> n (the Elevator Sim agent programmedin GOAL with 10 people to be transported) the condition <strong>of</strong> equation 3 issatisfied and performance is improved by caching. In this case, n = 1.16 and c Q = 29(see Table 3b), and we have 29 > 1/0.16 + 1 = 7.25. The average estimated gain percycle in this case is 42µs, which can be computed using equation 2 and subtracting thefirst from the last. The performance gained even in this case is about 10%. In all othercases the gains <strong>of</strong> using single cycle caching are substantially larger.5 Related WorkThere is almost no work that directly relates to our study <strong>of</strong> the performance <strong>of</strong> knowledgerepresentation and reasoning capabilities incorporated into agent programming.As far as we know, our study is the first to investigate patterns in the queries and updatesthat are performed by agent programs. In [15] it was observed that agent programsappear to spend most <strong>of</strong> their time in evaluating conditions for adopting plans,although the author’s proposed solution was to adopt a plan indexing scheme, ratherthan to optimize query evaluation in general. In [16] the performance <strong>of</strong> the FLUX andGOLOG agent programming languages is studied. Another GOLOG-style language,Indi-GOLOG, implements caching [17]. GOLOG-like languages, however, do not implementa deliberation cycle based on the BDI paradigm.Performance issues <strong>of</strong> BDI agents have been studied in various other contexts. Tomention just a few examples, [18] proposes an extended deliberation cycle for BDIagents that takes advantage <strong>of</strong> environmental events and [19] proposes the incorporation<strong>of</strong> learning techniques into BDI agents to improve their performance in dynamicenvironments. The focus <strong>of</strong> these papers is on integrating additional techniques intoan agent’s architecture to improve the performance <strong>of</strong> an agent instead <strong>of</strong> on the KRTcapabilities <strong>of</strong> those agents.129
6 ConclusionWe presented an abstract performance model <strong>of</strong> the basic query and update operationsthat define the interface to a logic-based BDI agent’s underlying knowledge representation.Using this model, we analysed the performance <strong>of</strong> a variety <strong>of</strong> different agent programsimplemented using three different agent platforms. To the best <strong>of</strong> our knowledge,our study is the first to analyse query and update patterns in existing agent programminglanguages. Although preliminary, our results suggest that in logic-based agentplatforms, knowledge representation and reasoning capabilities account for a large part<strong>of</strong> the execution time <strong>of</strong> an agent. In particular, three key observations suggest thatintegrating memoization into agent programming languages have the potential to significantlyincrease the performance <strong>of</strong> logic-based agent platforms: the same queriesare performed more than once in a single update cycle, large number <strong>of</strong> queries arerepeated in subsequent cycles, and the number <strong>of</strong> queries is typically much larger thanthe number <strong>of</strong> updates performed.We showed how the interface to the underlying knowledge representation <strong>of</strong> anagent platform can be modified to incorporate caching, and extended the abstract performancemodel to quantify the potential performance improvements that can be achievedby memoization <strong>of</strong> queries. Our results indicate that even simple query caching techniqueshave the potential to substantially improve the performance across a wide range<strong>of</strong> application domains.The work presented here is limited to a single agent update cycle. Our results, andin particular the observation that a significant number <strong>of</strong> queries are repeated in subsequentagent cycles, suggests that further performance improvements may be obtainedby extending caching to multiple cycles. Extending our abstract performance model andimplementation to account for such queries is an area <strong>of</strong> further work.References1. Forgy, C.: Rete: a fast algorithm for the many pattern/many object pattern match problem.Artificial Intelligence 19(1) (1982) 17–372. Miranker, D.P.: TREAT: A better match algorithm for AI production systems. In: Proceedings<strong>of</strong> the Sixth National Conference on Artificial Intelligence (AAAI’87), AAAI Press(1987) 42–473. Laird, J.E., Newell, A., Rosenbloom, P.S.: SOAR: An architecture for general intelligence.Artificial Intelligence 33 (1987) 1–644. S<strong>of</strong>tware Technology Branch, Lyndon B. Johnson Space Center Houston: CLIPS ReferenceManual: Version 6.21. (June 2003)5. Jena. http://jena.sourceforge.net/ (2011)6. Bordini, R.H., Hubner, J.F., Wooldridge, M.: Programming Multi-Agent Systems in AgentSpeakusing Jason. Wiley (2007)7. Dastani, M.: 2APL: a practical agent programming language. International Journal <strong>of</strong> Autonomous<strong>Agents</strong> and Multi-Agent Systems 16(3) (2008) 214–2488. Hindriks, K.V.: Programming Rational <strong>Agents</strong> in GOAL. In: Multi-Agent Programming.Springer (2009) 119–1579. Dastani, M., de Boer, F.S., Dignum, F., Meyer, J.J.C.: Programming agent deliberation.In: Proceedings <strong>of</strong> the Second International Joint Conference on Autonomous <strong>Agents</strong> andMultiagent Systems, ACM (2003) 97–104130
- Page 2 and 3:
Proceedings of the Tenth Internatio
- Page 4 and 5:
OrganisationOrganising CommitteeMeh
- Page 6:
Table of ContentseJason: an impleme
- Page 10 and 11:
in Sect. 3 the translation of the J
- Page 12 and 13:
init_count(0).max_count(2000).(a)(b
- Page 14 and 15:
For instance, a failure in the ERES
- Page 16 and 17:
{plan, fun start_count_trigger/1,fu
- Page 18 and 19:
single parameter, an Erlang record
- Page 20 and 21:
1. Belief annotations. Even though
- Page 22 and 23:
decisions taken during the design a
- Page 24 and 25:
Conceptual Integration of Agents wi
- Page 26 and 27:
Fig. 2. Active component structurep
- Page 28 and 29:
the service provider component. As
- Page 30 and 31:
Fig. 4. Web Service Invocationretri
- Page 32 and 33:
01: public interface IBankingServic
- Page 34 and 35:
tate them in the same way as in the
- Page 36 and 37:
01: public interface IChartService
- Page 38 and 39:
implementations being available for
- Page 41:
deliberative behavior in BDI archit
- Page 44 and 45:
layer modules (i.e. nodes) can be d
- Page 46 and 47:
different methods to choose the cur
- Page 48 and 49:
also a single scheduler module, imp
- Page 50 and 51:
andom choice (OR), conditional choi
- Page 52 and 53:
- Dealing with conflicts based on p
- Page 54 and 55:
5. Brooks, R. A. (1991) Intelligenc
- Page 56 and 57:
An Agent-Based Cognitive Robot Arch
- Page 58 and 59:
It has been argued that building ro
- Page 60 and 61:
EnvironmentHardwareLocal SoftwareC+
- Page 62 and 63:
a cognitive layer can connect as a
- Page 64 and 65:
can reliably be differentiated and
- Page 66 and 67:
4 ExperimentTo evaluate the feasibi
- Page 68 and 69:
learn or gain knowledge from experi
- Page 70 and 71:
A Programming Framework for Multi-A
- Page 72 and 73:
exchange and storage of tuples (key
- Page 74 and 75:
Although some success [13] [14] hav
- Page 76 and 77:
as well as important non-functional
- Page 78 and 79:
component plans have been instantia
- Page 80 and 81: A in the example) can evaluate all
- Page 83 and 84: 1. robot-1 issues a Localization(ro
- Page 85 and 86: ACKNOWLEDGMENTThis work has been su
- Page 87 and 88: The code was analysed both objectiv
- Page 89 and 90: a conversation is following. Additi
- Page 91 and 92: the context of a communication-heav
- Page 93 and 94: Table 1. Core Agent ProtocolsAgent
- Page 95 and 96: statistically significant using an
- Page 97 and 98: to the conversation and has a perfo
- Page 99 and 100: principal reasons. Firstly, it is a
- Page 101 and 102: 2. Muldoon, C., O’Hare, G.M.P., C
- Page 103 and 104: In the following section we will at
- Page 105 and 106: DevelopmentProductionHuman Readabil
- Page 107 and 108: will then evaluate this new format
- Page 109 and 110: encoder, it is first checked if the
- Page 111 and 112: nents themselves. However, since th
- Page 113 and 114: optimized for this format feature s
- Page 115 and 116: Java serialization and Jadex Binary
- Page 117 and 118: 10. P. Hoffman and F. Yergeau, “U
- Page 119 and 120: Caching the results of previous que
- Page 121 and 122: querying an agent’s beliefs and g
- Page 123 and 124: or relative performance of each pla
- Page 125 and 126: were run for 1.5 minutes; 1.5 minut
- Page 127 and 128: Size N K n p c qry U c upd Update c
- Page 129: epresentation. The cache simply act
- Page 133 and 134: Typing Multi-Agent Programs in simp
- Page 135 and 136: 1 // agent ag02 iterations (" zero
- Page 137 and 138: 3.1 simpAL OverviewThe main inspira
- Page 139 and 140: 3.2 Typing Agents with Tasks and Ro
- Page 141 and 142: Defining Agent Scripts in simpAL (F
- Page 143 and 144: that sends a message to the receive
- Page 145 and 146: * error: wrong type for the param v
- Page 147 and 148: Given an organization model, it is
- Page 149 and 150: Learning to Improve Agent Behaviour
- Page 151 and 152: 2.1 Agent Programming LanguagesAgen
- Page 153 and 154: choosing actions is to find a good
- Page 155 and 156: 1 init module {2 knowledge{3 block(
- Page 157 and 158: of a module. For example, to change
- Page 159 and 160: if bel(on(X,Y), clear(X)), a-goal(c
- Page 161 and 162: mance. Figure 2d shows the same A f
- Page 163 and 164: the current percepts of the agent.
- Page 165: Author IndexAbdel-Naby, S., 69Alelc