Disribued Task Negoiaion in Modular Robos Behnam Salemi, eer Will, and Wei-Min Shen USC Informaion Sciences Insiue and Compuer Science Deparmen Marina del Rey, USA, {salemi, will, shen}@isi.edu Inroducion Modular robos are a class of roboic sysems ha consis of many auonomous modules. Each module includes a se of sensors, acuaors, and compuaional resources. Examples of modular robos are (self-) reconfigurable robos [] [] [3], and ec. Driven by he local informaion received from heir sensors, muliple modules may simulaneously iniiae asks ha are compeing even conflicing wih one anoher. For example, in a snake configuraion, he ail module may wish o move forward, while he head module may wan o avoid an obsacle. How o selec he correc ask when here are many compeing choices and also deecing he erminaion of he selecion process are hen criical problems for conrolling he modular robos. Disribued Task Negoiaion is a process by which modules in a modular robo can negoiae o selec a single coheren ask among many differen and even conflicing choices. This is a very challenging problem due o several reasons: he relaionships among modules may no be saic bu change wih configuraions; he number of modules in he robo is no known; modules have no unique global idenifiers or addresses; modules do no know he global configuraion, and can only communicae wih heir immediae neighbors. This paper presens a disribued algorihm called DISTINCT as a soluion for he disribued ask negoiaion problem. The main idea is ha all modules cooperae o build global spanning rees. Each ree is associaed wih a ask. Modules ha have iniiaed asks sar wih building and being he roo of heir own spanning rees, bu as hey exchange messages for ree building, mos modules will give up being he roo and paricipae in merging curren rees o build larger rees for oher asks. In his process, modules repor heir saus o heir paren module of he ree in which hey paricipae. Evenually, only one ree will remain in he enire nework of modules and he module ha does no have paren and receives repors from all is children is he roo. When his roo module receives all of he expeced messages, i can conclude ha he negoiaion process has succeeded and all modules in he ree have agreed on he same ask. The correcness of his algorihm can be proved if he robo configuraion is acyclic (i.e., no loops in he nework of modules). To ensure he correcness for arbirary configuraion, addiional knowledge (such as module Ids) is needed so ha he modules can deec he exisence of loops in he nework. The algorihm is efficien and is ime complexiy is of he low polynomial order respec o he number of compeing asks. The paper is organized as follows: Secion discusses he relaed work, Secion 3 gives a formal definiion of Disribued Task Negoiaion; Secion 4 presens he basic idea of creaing and compeing Task Spanning Trees; Secion describes he DISTINCT algorihm; Secion describes he experimenal resuls in applying DISTINCT o he CONRO self-reconfigurable robos [4] and simulaed neworks of modules; and finally Secion 7 concludes he paper wih fuure research direcions. Relaed Work The disribued ask negoiaion problem occurs in many ypes of disribued sysems including, for example, Selfreconfigurable robos [], sensor neworks [], swarm robos [7], or muli-agen sysems [8]. In disribued mulirobo sysems, previous approaches, such as [9] and [0], ofen assume a designaed cenral agen o dicae a ask for all he conflicing agens. Oher approaches, such as [], preven his problem o occur by allowing only one agen o be he only ask iniiaor. This work is differen from all exising approaches. Unlike cenralized approaches, DISTINCT algorihm scales well wih configuraions and is robus o individual module failures. By leing all modules o be he ask iniiaors, DISTINCT allows cooperaive disribued problem solving [] and can deal wih boh ask negoiaion and erminaion deecion. 3 Disribued Task Negoiaion We define he problem of disribued ask negoiaion in he conex of a nework of nodes (agens) ha have communicaion links (channels). For a modular robo, nodes are modules and links are physical connecions beween modules. Nodes do no have unique global idenifiers or addresses, and hey can only communicae wih heir immediae neighbors hrough exising links (Message propagaion ime is ignored). The links are half duplex, which means ha wo nodes conneced by a link can ransmi messages in boh direcions bu no a he same ime. All nodes in he nework can auonomously iniiae asks and many asks can compee simulaneously in he nework. Formally, a disribued ask negoiaion problem consiss of a uple (, L, T, S), where is a lis of nodes, p i, such ha i {,, N}; L is a lis of communicaion links, l jk, such ha j,k {,, N}; T is a lis of asks, m, such ha
m N, and S is a se of ask selecion funcions, S i : (T') i, such ha i {,,N} and T' T. This means ha he ask selecion funcion need no be global and each node can have is own ask selecion funcion o selec a single ask from a se of given asks. A disribued ask negoiaion problem is solved when all nodes have seleced he same ask from T, called *, and have been noified ha he negoiaion process is erminaed. For example in Figure (a), = {p, p, p 3, p 4, p, p }, L = {l, l 4, l 3, l 4, l 4 }, T = {, }, and S is a selecion funcion ha prefers asks wih larger indexes and shared by all nodes. Iniially, node p and p have iniiaed wo asks, and, respecively. Figure (b) depics a soluion for he given problem where all nodes agreed on ask. Noe ha he nodes indexes are no used in he negoiaion process. l 3 Assigning prioriies o he compeing asks and forcing he nodes o selec asks ha have higher prioriies [3] will no solve his problem since he number of nodes and iniiaed asks in he nework are unknown. In our soluion, nodes propagae heir asks o heir neighbors and generae a Task Spanning Tree (TST) for each propagaed ask. As a resul, when more han one ask is iniiaed, a fores of parial TSTs is creaed. These parial TSTs gradually merge ino one and only one TST, which represens he only seleced ask in he nework. The negoiaion process erminaes when a node ha has no paren has received repors from all of is children. This node is he roo of he final TST, and i hen noifies all oher nodes in he ree wih an end of negoiaion message and all nodes will selec he ask associaed wih he final TST. 4. Disribued Task Selecion For nodes ha have compeing asks o selec a single ask, he goal is o creae a single TST. Each node mus decide on wo issues: ) wha ask o selec and propagae, and ) how o be a par of a TST. Iniially, nodes ha have compeing asks propagae heir asks by sending a Task Message (TM) o heir neighbors and designaing hemselves as he roo of a parial TST. l l 3 Assuming ha he recipien of a TM has no asks and receives only one TM, hen i will adop he received ask and creae a child-of relaionship oward he sender of he TM and propagae he received ask by sending new TMs o he res of is neighbors. Figure shows an example in which nodes and have iniiaed asks and respecively. Node and are he recipiens of TM( ), and herefore have seleced ask. Similarly, and are he recipiens of TM( ), and herefore have seleced ask. arallel arrows show he child-of relaionships. TM( ) l 4 TM( ) l Figure : Task message propagaion. Arrows on he links indicae messages in ransi and arrows parallel o links l 4 l 4 indicae he child-of relaionship. Double circles indicae L 4 L 4 he roos of parial TSTs. l 4 l 4 4 Based on he above assumpion, no message has been sen hrough he link l 4. As a resul wo TSTs have been (a) (b) formed; rooed a and. In each TST, all nodes have seleced he same ask. Figure : An example of a disribued ask negoiaion problem. a) Iniially p and p iniiaed wo asks (, ). b) A his poin, if we relax he above assumpion, wo cases A soluion, when all agens have seleced * =. migh occur: ) eiher a roo node receives a TM from anoher node, or ) a non-roo node receives a TM from a 4 Negoiaion by Creaing Spanning Trees node ha is no is paren. TM( ) TM( ) In he firs case, he recipien, which is a roo node, drops being a roo, adops he received ask, esablishes a childof relaionship wih he sender of he TM and propagaes new TMs o he res of is neighbors. These nodes adop he received ask and propagae i o he res of heir neighbors. NRM( ) NRM( ) NRM( ) NRM( ) NRM( ) Figure 3: Merging parial TSTs from Figure. is he new roo of he merged TST and dashed arrows indicae he AckMs. Figure 3 shows an example of he second case when, receives a TM from. In his case, he received TM is a conflicing message since i was received from a nonparen node. To resolve he conflic, he recipien node delees all of is child-of relaionships, makes a choice beween is previous ask and he received ask (using is
ask selecion funcion), propagaes a NewRoo Message (NRM) conaining he newly seleced ask o all of is neighbors, and hen promoes iself as a new roo for he seleced ask. The role of NRM is o merge parial TSTs and creae a new roo for he resuling TST. The recipien of a NRM adops he received ask, creaes a new child-of relaionship owards he sender of he NRM, becomes a non-roo node, and propagaes a new NRM conaining he received ask o he res of is children. The final resul of he ask selecion process is a single TST wih a specified roo node and a seleced ask. 4. Disribued Terminaion Deecion In order o deec he erminaion of he ask negoiaion process, we use an approach similar o he erminaion deecion algorihm for diffusing compuaion by Dijksra and Scholen [4]. For each received TM and NRM, each node mus reply wih an Acknowledge Message (AckM), afer receiving acknowledges from all is children. For a leaf node, his means ha i will acknowledge immediaely for every received message. A non-leaf node will send an AckM o is paren afer i receives AckM from all of is children. A node ha has no paren is he roo of he final TST and i can conclude ha he ask negoiaion process has succeeded. Dashed arrows in Figure 3 indicae he AckMs. is he roo node and expecs o receive AckMs from all of is children. and are leaf nodes and respond immediaely. Afer receiving all of he expeced AckMs, deecs he erminaion of he negoiaion process and propagaes a Task Seleced Message (TSM), o all of is children. This message will be propagaed o all he nodes in he ree and he ask negoiaion process successfully erminaes. The DISTINCT Algorihm The disribued ask negoiaion process described above has been implemened as an algorihm called DISTINCT. Given a disribued ask negoiaion problem, his algorihm ensures ha all nodes will selec he same ask coherenly; regardless of he number of compeing asks iniiaed in he nework. Figure 4 illusraes he procedures of he DISTINCT Algorihm. Four ypes of messages are used. Firs, a Task Message (TM) is used for propagaing he iniiaed asks. Second, a NewRoo Message (NRM) is propagaed when a conflic is deeced and parial TSTs are o be merged. Third, an Acknowledge Message (AckM) is used for deecing he erminaion even. Finally, a TaskSeleced Message(TSM) is propagaed from he roo of he final TST o all nodes in he nework. Task-iniiaor nodes begin by calling he iniiaed procedure hen wai for incoming messages. The Links variable is he lis of he communicaion links of a node, he arenlink and ChildLinks variables specify he paren-child relaionships among nodes in a TST, and he currenly seleced ask is sored in he SelecedTask variable. In line (a) of he iniiaed procedure, a node designaes iself as a roo node by assigning a null value o is arenlink variable. when iniiaed (ask ( )) do SelecedTask = ; arenlink = null; ChildLinks = Links (a) for each L ChildLinks do send (L,ask ()); end do; end do; when received (ask ( ), link (j)) do if (SelecedTask = null or arenlink = j) SelecedTask = ; arenlink = j; ChildLinks = Links - j; if (ChildLinks is no empy) for each L ChildLinks do send (L,ask ()); end do; else send (arenlink, ack ( )); end if; else SelecedTask = SelecionFuncion (, SelecedTask); arenlink = null; ChildLinks = Links for each L ChildLinks dosend (L,newRoo (SelecedTask)) end do; end if; end do; when received (newroo ( ), link (j)) do SelecedTask = ; arenlink = j; ChildLinks = Links - j; if (ChildLinks is no empy) for each L ChildLinks do send (L,newRoo ()); end do; else send (arenlink, ack (SelecedTask)); end if; end do; when received (ack ( ), link (j)) do for each L ChildLinks do if (ack msg was no received from L) reurn; end if; end do; if (arenlink null) send (arenlink, ack ( )); else send(links, askseleced ( )); end if; end if; end do; when received (askseleced ( ), link (j)) do for each L ChildLinks do send (L, askseleced ( )); end do; erminae; end do; Figure 4:The DISTINCT Algorihm. Example Figure shows a deailed example of how ask selecion and erminaion deecion processes are performed. In Figure a, he roo nodes, and, are he only wo ask iniiaors iniiaing and, respecively. Figures b, c, and d show he TMs and AckMs ha are communicaed by he nodes. On receiving TMs, nodes adop he received asks and creae child-of relaionships wih heir parens. In Figure c, can send an AckM o is paren only afer receiving AckMs from boh of is children. Figure e shows he conflic deeced by as a resul of receiving he TM shown in Figure d. Figures f, and g show he communicaed NRMs and he corresponding AckMs. Figure h shows he las AckM ha receives before is deecs he erminaion of he process. Figures i and j show he communicaed TSMs.. Algorihm Correcness and Opimaliy We now show ha he DISTINCT algorihm will reach a sable sae when all nodes have seleced he same ask and i is an opimal soluion.
NRM( NRM( ) ) NRM( ) NRM() NRM() (f) (g) TM() TM() 3 TM() TM() 4 TM() (a) (b) (c) (d) (e) (h) (i) Figure : The seps of DISTINCT algorihm for ask selecion and erminaion deecion. (j) Afer all iniiaed asks are communicaed, and jus before any conflic is deeced, he nework is pariioned ino a se of non-overlapping parial TSTs. Nodes in he same parial TST have seleced he same ask. Based on he propery ha any wo nodes in a ree are conneced by a unique pah, we may conclude ha here is a mos one connecing link beween any wo parial TSTs. Oherwise here will be more han one pah from a node in one parial TST o a node in anoher parial TST, which conradics he above-menioned propery. Consequenly, if each parial TST is considered o be a single super node, he resuling nework is also a ree; see Figure. We call he connecing links of hese nodes he conflicing links since he messages ha hey ransfer cause conflics in he recipien nodes. Based on he above descripion, and by considering ha his algorihm merges parial TSTs ha have conflicing links beween hem, he DISTINCT algorihm will evenually produce one single TST. Furhermore, since he seleced ask for all merged TSTs is he same, only one ask will be seleced. In addiion, due o he facs ha here are only N- links in a ree wih N nodes, and ha merging will monoonically reduce he number of nodes, he number of conflicing links will monoonically reduce o zero. This means a single TST can be creaed afer a mos N imes merging. Figure : A nework of nodes pariioned by parial TSTs. olygons represen super nodes. The double lines are he conflicing links. The correcness of he erminaion crierion can be seen as follows. Any leaf node of he TST is enabled o generae an AckM as soon as i receives TMs or NRMs. This in urn enables heir paren nodes, and allows heir paren nodes o generae AckMs. As a resul, he roo of he TST will receive all of is expeced AckMs and he erminaion of he ask negoiaion process will be deeced. I is imporan o noice ha as long as nodes are receiving conflicing messages, which represen he exisence of conflicing links and herefore muliple roos, conflicdeecing nodes will no send AckMs. Therefore, when here are sill muliple TSTs in he nework, he roos of parial TSTs will no erminae hemselves premaurely. In his algorihm we have used half duplex communicaion links beween nodes. This is required o avoid cases where wo neighboring nodes communicae simulaneously, which in some siuaions would resul in boh nodes designaing hemselves as roos, producing deadlocks or oher unexpeced resuls. The complexiy of DISTINCT can be esimaed as follows. In he wors case, every iniiaed ask may override all of he oher nodes seleced asks, herefore he wors-case ime complexiy of he DISTINCT algorihm is Ο(NT) where N is he number of nodes and T is he number of iniiaed asks. Similarly, he oal number of communicaed messages is a mos NT. This shows ha DISTINCT algorihm is an order of magniude faser ha cenralized approach, which has he complexiy of he order Ο(N ). Furhermore, assuming ha each node requires receiving a leas one message o learn abou a newly iniiaed ask, we can conclude ha in DISTINCT he number of communicaed messages is opimal. Tha is because in he worse case, each ask is communicaed only once o each node. Experimenal Resuls We have applied he DISTINCT algorihm o he CONRO self-reconfigurable robo and performed an exensive se of experimens in a large-scale Java simulaed selfreconfigurable sysem.
. Task Negoiaion in CONRO Robo Meamorphic robos are modular robos consising of a nework of auonomous modules (nodes), which can auonomously aach and deach each oher o form differen configuraions. CONRO is an example of such meamorphic robos [4]. I consiss of a nework of auonomous modules (nodes) in which all he assumpions described in he inroducion secion hold. Figure 7a shows a CONRO module and Figure 7b shows a four-legged CONRO robo. Configuraion of he neworks is randomly generaed, and for each configuraion we randomly seleced a subse of nodes (wih, N/, N nodes in i) o iniiae asks. a Number of Messages 00000 0000 000 00 0 0 0 00 000 Iniiaor N/ Iniiaors N Iniiaors Figure 7: a) A CONRO module. b) A four-legged CONRO robo. Each module has a se of sensors and acuaors and decision-making is done locally. Therefore, i is possible ha as a resul of received informaion from he environmen individual modules iniiae muliple asks. In our previous work for he disribued conrol of locomoion and self-reconfiguraion of he CONRO robos, we assumed ha only one of he modules in he robo could generae a single ask a a ime []. Wih he DISTINCT algorihm, we can now relax his assumpion. Using he DISTINCT algorihm, a CONRO robo can selec a single ask among muliple iniiaed asks. For example, Figure 8 shows he schemaic view of a fourlegged CONRO robo and is equivalen node nework. Two modules of he CONRO robo have iniiaed forward walk and Obsacle Avoidance asks. The nework for his robo is he same as he nework in he examples given earlier. Therefore, as we saw earlier, he robo is capable of selecing a single ask and deecing he erminaion even. In his experimen, Obsacle Avoidance had a higher prioriy han he forward walk ask. (a) (a) (b Forward walk ask Obsacle Avoidance ask Figure 8: a) he schemaic view of a four-legged CONRO robo. b) The node organizaion for he four-legged CONRO robo. The robo has iniiaed wo asks.. erformance Evaluaion We have also evaluaed he performance of he DISTINCT algorihm in large-scale simulaed self-reconfigurable neworks ha have N = 0, 0, 00, and 000 nodes. Each node has four connecors for connecing o oher nodes. (b) b c d Number of Cycles Number of Cycles/Nodes Number of Messages/Nodes 00000 0000 30 0 0 0 30 0 0 0 000 00 0 0 0 00 000 0 0 00 000 0 0 00 000 Figure 9: a) he oal number of messages; b) he oal number of cycles; c) he number of cycles per node, and d) he number of messages per node. Each experimen is performed five imes and averaged. Configuraion of he neworks is randomly generaed, and for each configuraion we randomly seleced a subse of nodes (wih, N/, N nodes in i) o iniiae asks. Figure 9a shows he number of oal messages sen by he nodes. Configuraion of he neworks is randomly generaed, and for each configuraion we randomly
seleced a subse of nodes (wih, N/, N nodes in i) o iniiae asks. Figure 9b shows he oal number of cycles required for solving each disribued ask negoiaion problem on a logarihmic scale. Cycles are he number of imes ha a node execues a loop o check he received messages and send new messages. Configuraion of he neworks is randomly generaed, and for each configuraion we randomly seleced a subse of nodes (wih, N/, N nodes in i) o iniiae asks. Figure 9c and Configuraion of he neworks is randomly generaed, and for each configuraion we randomly seleced a subse of nodes (wih, N/, N nodes in i) o iniiae asks. Figure 9d show he average number of cycles per node and he average number of messages per node, respecively. As we can see, when here is only one ask iniiaor in he nework, each node needs only wo messages for each child and one message for is paren o build a ree ha links all nodes. When half or all of he nodes are compeing, he number of messages increases, because more modules mus build and merge parial spanning rees and swich heir asks. In all cases, he experimens show ha he DISTINCT algorihm ensures ha all nodes selec one and only one ask and he cos is of he low polynomial order wih respec o he number of compeing asks. 7 Conclusion. Shen, W.-M., B. Salemi, and. Will., Hormone- Inspired Adapive Communicaion and Disribued Conrol for CONRO Self-Reconfigurable Robos. IEEE Transacion on Roboics and Auomaion, 00. 8(): p. 700-7.. Esrin, D., R. Govindan, J. S. Heidemann, S. Kumar, Nex Cenury Challenges: Scalable Coordinaion in Sensor Neworks. Mobile Compuing and Neworking, 999: p. 3-70. 7. Bonabeau, E., M. Dorigo, G. Theraulaz,, Swarm Inelligence: From Naural o Arificial Sysems. 999: Oxford Universiy ress. 8. Tambe, M., Towards Flexible Teamwork. Journal of Arificial Inelligence Research, 997. 7: p. 83-4. 9. Maaric, M., Inegraion of Represenaion Ino Goal- Driven Behavior-Based Robos. IEEE Transacions on Roboics and Auomaion, 99: p. 304-3. 0. Yim, M., Locomoion wih a uni-modular reconfigurable robo (h.d. Thesis), in Deparmen of Mechanical Engineering. 994, Sanford Universiy.. Soy, K., Shen,WM., Will,.,, Using Role-Based Conrol o roduce Locomoion in Chain-Type Self- Reconfigurable Robos. IEEE/ASME Transacions on Mecharonics, 00. 7(4): p. 40.. Durfee, E.H., Lesser, V.R., and Corkill, D.D, Disribued roblem Solving. Encyclopedia of Arificial Inelligence, Second Ediion, 99. 3. Lynch, N.A., Disribued algorihms. Daa Managemen Sysems, ed. J. Gray. Vol.. 000: Morgan Kaufmann. 4. Djiksra, E.W., and Scholen, C.S. Terminaion Deecion for Diffusing Compuaions. in Informaion rocessing Leers. 980. This paper presened a disribued algorihm called DISTINCT as a soluion for disribued ask negoiaion in a nework of auonomous and self-reconfigurable nodes. Such a nework can be inerpreed as a self-reconfigurable robo, a sensor nework, or a muli-agen organizaion. The algorihm allows a large number of disribued nodes o agree and selec a ask from many compeing choices and deec he erminaion of he negoiaion process. The algorihm is proved correc in acyclic graphs and is ime complexiy is of he low polynomial order respec o he number of compeing asks. The fuure direcion of his work is o handle neworks ha have loops. We believe using some addiional knowledge such as adding IDs, nodes can deec he loops and achieve he same resuls shown by he DISTINCT algorihm. 8 References. Yim, M., Y. Zhang, D. Duff, Modular Robos. IEEE Specrum, 00.. Rus, D., Z. Buler, K. Koay, M. Vona,, Self- Reconfiguring Robos. ACM Communicaion, 00. 3. Salemi, B., WM. Shen and. Will. Hormone Conrolled Meamorphic Robos. in ICRA. 00. 4. Casano, A., W.-M. Shen,. Will, CONRO: Towards Miniaure Self-Sufficien Meamorphic Robos. Auonomous Robos, 000: p. 309-34.