Academia.eduAcademia.edu

Swarm Robotics for a Dynamic Cleaning Problem

2005, Proceedings 2005 IEEE Swarm Intelligence …

Several recent works considered multi agents robotics in static environments (e.g. \cite{CC}, \cite{GraphSearch1}, \cite{CoopRobot1} and others). In this work we examine ways of operating in dynamic environments, in which changes may take place regardless of the agents' activity. The work focuses on a dynamic variant of the known \emph{Cooperative Cleaners} problem (described and analyzed in~\cite{CC}). This problem assumes a grid, part of which is ``dirty'', when the ``dirty'' part is a connected region of the grid. On this dirty region several agents move, each having the ability to ``clean'' the place it is located in. The dynamic variant of the problem involves a deterministic evolution of the environment, simulating a spreading \emph{contamination}, or \emph{fire}. A cleaning protocol for the problem is presented, as well as several analytic bounds for it. In addition, the work contains simulative results for the proposed protocol.

SWARM ROBOTICS FOR A DYNAMIC CLEANING PROBLEM Yaniv Altshuler and Alfred M. Bruckstein Israel A. Wagner Computer Science Department Technion, Haifa 32000 Israel {yanival , freddy}@cs.technion.ac.il IBM Haifa Labs MATAM, Haifa 31905 Israel wagner@il.ibm.com ABSTRACT Several recent works considered multi agents robotics in static environments (e.g. [2], [4], [5] and others). In this work we examine ways of operating in dynamic environments, in which changes may take place regardless of the agents’ activity. The work focuses on a dynamic variant of the known Cooperative Cleaners problem (described and analyzed in [2]). This problem assumes a grid, part of which is “dirty”, when the “dirty” part is a connected region of the grid. On this dirty region several agents move, each having the ability to “clean” the place it is located in. The dynamic variant of the problem involves a deterministic evolution of the environment, simulating a spreading contamination, or fire. A cleaning protocol for the problem is presented, as well as several analytic bounds for it. In addition, the work contains simulative results for the proposed protocol. 1. INTRODUCTION Significant research effort has been invested during the last few years in design and simulation of multi-agents systems ([7], [8], [9], [10]). Unfortunately, the geometrical theory of such multi-agents systems is far from being satisfactory, as pointed out in [11] and many other papers. In this work we will examine a problem in which the agents must work in dynamic environments — an environment in which changes may take place regardless of the agents’ activity. This work focuses on a dynamic variant of the known Cooperative Cleaners problem [2]. This problem assumes a grid, part of which is ‘dirty’, where the ‘dirty’ part is a connected region of the grid. On this dirty grid region several agents move, each having the ability to ‘clean’ the place (‘tile’, ‘pixel’ or ‘square’) it is located in. The dynamic variant of the problem (described in section 2) involves a deterministic evolution of the environment, simulating a spreading contamination (or spreading fire). In the spirit of [12] we consider simple robots with only a bounded amount of memory (i.e. a finite-state-machine). This work contains a cleaning protocol for the problem (section 3) as well as several analytic bounds for the time it takes agents which use this protocol to clean the entire grid (a summary of the results is presented in section 4 while a full proof appears in section 5). In addition, the work contains simulation results for the protocol (section 6). As a motivator, we present a method of constructing an unsolvable case for each pair of values of k (number of agents) and d (the speed in which the environment changes), regardless of the cleaning protocol employed. Section 7 contains a discussion regarding the problem and details about an extended ongoing research. 2. THE DYNAMIC COOPERATIVE CLEANERS PROBLEM Let us assume that the time is discrete. Let G be a two dimensional grid, whose vertices have a binary property of ‘contamination’. Let contt (v) state the contamination state of the vertex v in time t, taking either the value “on” or “off ”. Let Ft be the dirty sub-graph of G at time t, i.e. Ft = {v ∈ G | contt (v) = on}. We assume that F0 is a single connected component. Our algorithm will preserve this property along its evolution. A discussion regarding simple connectivity appears in section 3.3. Let a group of k agents that can move across the grid G (moving from a vertex to its neighbor in one time step) be placed in time t0 on F0 (we focus on the cleaning problem, and not on the discovery problem). Each agent is equipped with a sensor capable of telling the condition of the square it is currently located in, as well as the condition of the squares in the 8−N eighbors group of the this square. An agent is also aware of other agents which are located in its square, and all the agents agree on a common “north”. Each square can contain any number of agents simultaneously. When an agent moves to a vertex v, it has the possibility of causing cont(v) to become off. The agents do not have any prior knowledge of the shape or size of the sub-graph F0 except that it is a single connected component. Every d time steps the contamination spreads. That is, if t = nd for some positive integer n, then (∀v ∈ Ft , ∀u ∈ 4−N eighbors(v) : contt+1 (u) = on). The agents’ goal is to clean G by eliminating the contamination entirely, so that (∃tsuccess : Ftsuccess = ∅). In addition, it is desired that this tsuccess will be minimal. In this work we demand that there is no central control and that the system is fully ‘de-centralized’ (i.e. all agents are identical and no explicit communication is allowed). 3. THE CLEANING PROTOCOL For solving the Dynamic Cooperative Cleaners problem we suggest the SWEEP cleaning protocol, which can be described as follows. Generalizing an idea from computer graphics (presented in [13]), we preserve the connectivity of the contaminated region by preventing the agents from cleaning critical points — points which disconnect the graph of contaminated grid points (see section 5.1). This ensures that the agents stop only upon completing their mission. An important advantage of this approach, in addition to the simplicity of the agents, is fault-tolerance — even if almost all the agents cease to work before completion, the remaining ones will eventually complete the mission, if possible. At each time step, each agent cleans its current location (assuming this is not a critical point), and moves to its rightmost neighbor — a local movement rule, creating the effect of a clockwise traversal of the contaminated shape. As a result, the agents “peel” layers from the shape, while preserving its connectivity, until the shape is cleaned entirely. 3.1. Cleaning protocol - definitions and requirements Let r(t) = (τ1 (t), τ2 (t), . . . , τk (t)) denote the locations of the k agents at time t. The requested cleaning protocol is therefore a rule f such that for every agent i, f (τi (t), N eighborhood(τi (t)), Mi (t)) ∈ D, where for a square v, N eighborhood(v) denotes the contamination states of v and its 8−N eighbors, Mi is a finite amount of memory for agent i, containing information needed for the protocol (e.g. the last move) and D = {‘lef t′ , ‘right′ , ‘up′ , ‘down′ }. Let ∂F denote the boundary of F . A square is on the boundary if and only if at least one of its 8 − N eighbors is not in F , meaning ∂F = {(x, y) | (x, y) ∈ F ∧ 8 − N eighbors(x, y) ∩ (G \ F ) = ∅}. The requested rule f should meet the following goals : • Full Cleanness : (∃tsuccess : Ftsuccess = ∅). Notice that this demand is limited to cases where this is possible. Since we cannot know whether completing the mission is possible, we can only demand that when d → ∞ the agents should achieve this goal. • Agreement on Completion : within a finite time after completing the mission, all the agents must halt. • Efficiency : in time and in agents’ memory resources. The requested rule should also be fault tolerant. 3.2. The SWEEP cleaning protocol The protocol is being used by the agent ai which in time t is located in τi (t) = (x, y). The term ‘rightmost’ means: “starting from the previous boundary point scan the neighbors of (x, y) in a clockwise order until you find another boundary point”. The additional information needed for the protocol and its sub-routines is achieved from Mi and N eighborhood(x, y). The protocol appears in figure 1. Protocol SWEEP(x, y) : If (not is-critical(x, y)) and ((x, y) ∈ ∂F ) and (there are no other agents in (x, y)) then Set cont(x, y) to off ; /*Clean current position*/ If (x, y) has no contaminated neighbors then STOP; If (there are no other agents in (x, y)) or (the agent has the highest priority among agents in (x, y)) then If ¬((x, y) ∈ ∂F ) and in the previous time step the agent’s square was in ∂F then /* Spread had occurred. Search for ∂F */ Move in 90◦ counterclockwise to the previous movement and skip the rest of the protocol; If ¬((x, y) ∈ ∂F ) and in the previous time step the agent’s square was not in ∂F then /* Keep seeking ∂F */ Move on the same direction as in the previous movement and skip the rest of the protocol; If (x, y) ∈ ∂F then Go to the rightmost neighbor of (x, y); End SWEEP; Function is-critical(x, y) : If (x, y) has two contaminated squares in its 4 − N eighbors which are not connected via a sequence of contaminated squares from its 8−N eighbors then Return TRUE Else Return FALSE; End is-critical; Function priority(i) : (x0 , y0 ) = τi (t − 1); (x1 , y1 ) = τi (t); Return (2 · (x0 − x1 ) + (y0 − y1 )); End priority; Procedure INITIALIZE() : Choose a starting point on ∂F , p0 ; Put all the agents in p0 ; For (i = 1; i ≤ k; i + +) do Start agent i according to the SWEEP protocol; Wait 2 time steps; End INITIALIZE; Figure 1. The SWEEP cleaning protocol The connectivity of the region yet to be cleaned, F , is preserved by allowing an agent to clean only non-critical points. This guarantees both full cleanness and agreement of completion (since having no contaminated neighbors implies that F = ∅). Also, should several agents malfunction and halt, as long as there are still functioning agents, the mission will still be handled, albeit slower. Since we only allow agents to clean points which are in ∂F , we guarantee that no new “holes” will be created. The simple-connectivity of F , if such exists, is thus kept (see section 3.3 for more details). Note that when several agents are located in the same square, only the last one who exits it cleans it, in order to prevent agents from being ‘thrown’ out of the contaminated region. This problem could also be solved by implementing a “contamination seeking mechanism” (i.e. by applying methods such as suggested in [14]). That solution, however, would have been far less elegant and would have added additional difficulties to the analysis process. 4. RESULTS Since we know no easy way to decide whether k agents can successfully clean an instance of the Dynamic Cooperative Cleaners problem, producing bounds for the proposed cleaning protocol is important for estimating its efficiency. The following analytic results are presented in rest of this work. Given a contaminated shape F0 with initial area of S0 , and k agents employing any cleaning protocol, a lower bound for St (the area of F in time t), and thus for the cleaning time of the agents, is presented as Theorem 1 in section 5.2. In addition, an upper bound for tSU CCESS , the cleaning time of k agents, using the SWEEP cleaning protocol, for a given contaminated shape F0 is presented as Theorem 3 in section 5.3. From this bound, an upper bound for the number of agents needed to apply the SWEEP protocol, for a successful cleaning of a given shape F0 is derived. 5. ANALYSIS 3.3. Dynamic and static cleaning problems The work presented in [2] contains a cleaning protocol designed for agents working in static environments (in which d → ∞), called CLEAN. The SWEEP protocol is very similar to CLEAN albeit with a couple of changes. In the CLEAN protocol for static environments (in [2]), p0 was artificially treated as a critical point. This however, was not crucial for the protocol to work but rather just simplified the analysis of it. Since in the dynamic problem p0 will not necessarily remain in ∂F , it looses its use as a point in which every agent must pass in each of its traversals around Ft . This means that unlike the CLEAN protocol, we cannot foretell which point will be the last point to be cleaned, but this however, is not important to us. Thus, unlike the preservation of the pivot point, p0 in the CLEAN protocol, when an agent using the SWEEP protocol reaches the pivot point, it will clean it. If an agent finds itself in the middle of the contaminated region (i.e. not in ∂F ), it ‘turns left’, and moves straight until reaching ∂F . This is required since after a contamination spread, two blocks can merge, capturing an agent inside a contaminated region. Since in the static problem the ‘dirty’ region was not spreading, this problem did not occur. Notice that unlike static environments, we are not concerned with ‘holes’ in F since should there be such holes, the agents will not enlarge them (due to the nature of the protocol), and the holes will be gradually closed (since the contamination spreads). Thus even if F0 is not simply connected, the completion of the mission will not be affected, although the cleaning time might become longer. This however, does not hold for a certain family of initial shapes. A complete discussion regarding a criteria for F0 which guarantees that new holes will not be created can be found in [3]. Notice that analyzing the performance of the protocol is quite difficult. First, due to the preservation of the critical points, such points can be visited many times by the agents without being cleaned. Second, due to the dynamic nature of the problem the shape of the contaminated region can dramatically change during the cleaning process. Another difficulty which arises is that of guaranteeing the completion of the cleaning by the agents. We must show that the agents are cleaning the contaminated region faster than the spreading of the last. For example, for any pair of values of d and k, let F0 be a straight line of length ⌈ 81 d2 k 2 + 12 dk + 1⌉. Then, by applying the lower bound for the cleaning time (presented in Theorem 1), we can see that the size of the shape is continually growing. 5.1. Definitions Let St denote the size of the contaminated region F in time t, namely the number of grid points (or squares) in Ft . The boundary of the contaminated region F is denoted as ∂F , defined as ∂F = {(x, y) | (x, y) ∈ F ∧ (x, y) has an 8−N eighbor in (G \ F )}. Let d denote the number of time steps between two contamination spreads. A path in F is defined to be a sequence (v0 , v1 , . . . , vn ) of squares in F such that every two consecutive squares are 4 − Connected (meaning that the Manhattan distance between them is 1). A length of a path is defined to be the number of squares in it. Let square v be called a critical point if ∃v1 , v2 ∈ 4− N eighbors(v) where all the paths connecting v1 and v2 , which are included in 8−N eighbors(v), pass through v. Let ct denote the circumference of F in time t, defined as follows. Let Ct = (v0 , v1 , . . . , vn ) be the shortest path which contains all the squares of ∂Ft and only such squares, and such that v0 and vn are 4 − Connected. If there are several different shortest paths then let Ct be an arbitrary one. Notice that Ct may contain several instances of the same square, if this square is a critical point. ct is defined as the length of Ct . An example appears in Figure 2. ❄❄❄ and cause new squares to become contaminated. We are interested in the minimal number of squares which can become contaminated at this stage. The minimal number of 4−N eighbors of any number of squares is received when the squares are organized in the shape of a digital sphere, as in figure 3. r r r r r r r r r r r Figure 2. The line in the left chart goes through the squares of Ct where the 3 arrowed squares are included twice. The circles in the right chart denote the squares of ∂Ft . Note that while ∂Ft contains 11 squares, Ct contains 14. For some v ∈ Ft let Stringst (v) denote the set of all paths in Ft that begin in v and end in any non-critical point in ∂Ft . For some v ∈ Ft let w(Ft , v) denote the depth of v, the length of the shortest path in Stringst (v) (unless v is a critical point in which case its depth is defined to be zero). Let W (Ft ) denote the width of Ft and be defined as the maximal depth of all the squares in Ft , meaning that W (Ft ) = max{w(Ft , v) | v ∈ Ft }. Let Ft′ denote the region one could get, having one agent traverse Ft once, using the SWEEP protocol (i.e. when k = 1, Ft′ = Ft+ct ). For the sake of simplicity, Ft′′ will be used instead of (Ft′ )′ , and so on. Let ′ Ft denote the region that would be received had a contamination spread occurred in time t (assuming no squares were cleaned in time t). Figure 3. The left chart shows an example of a ‘sphere’ in the grid. Notice that this sphere has only 16 squares in its 4−N eighbors while the right chart, containing a shape of the same area, has 20 squares in its 4−N eighbors. Let a denote the diameter of a sphere (in the sphere of figure 3 for example, the diameter is 7). The area of 2 a sphere equals a 2+1 while the number of squares in its 4−N eighbors (denoted by △S) is (2a + 2). Thus :  △SSPHERE = 8 · SSPHERE − 4 + 2 After the d-th time steps we thus have the following :  Sd ≥ S0 − d · k + ( 8 · (S0 − d · k) − 4 + 2) and the Theorem is implied.  (End of Theorem 1) 5.3. Upper bound 5.2. Lower bound Following is a general lower bound for the problem. The completion of the cleaning mission in time t means that St = 0. By showing that in a specific time t, St is larger than zero, we prove that the mission could not be completed until that time, regardless of the nature of the cleaning protocol is utilized by the agents. Theorem 1 Using any cleaning protocol, the area of the contaminated region in time t can be recursively bounded by the formula :  St+d ≥ St − d · k + ( 8 · (St − d · k) − 4 + 2) Proof : Notice that a lower bound for the cleaning time is in fact an upper bound for the agents’ performance. Let us assume that the agents are working in 100% efficiency, meaning, each time step every agent cleans a single square. After (d − 1) time steps k agents will thus clean k · (d − 1) squares, and thus we know that Sd−1 ≥ S0 − (d − 1) · k In the d-th time step, the agents clean another portion of k squares, but the remaining contaminated squares spreads Lemma 1 The cardinality of the region’s circumference does not increase after it is being traversed by an agent which is using the SWEEP protocol, namely : |∂F ′ | ≤ |∂F | − 8. Proof : Note that a traversal around F is a closed, simple, rectilinear polygon. ∂F ′ was obtained after deleting all the non-critical points of ∂F . Going along such polygon, an agent either go straight, make an internal turn (“left” turn, if we assume a clockwise movement), or make an external turn (“right” turn). It is easy to see that a “left” turn increases the traversal length by two, while a “right” turn decreases it by two. Since ∂F is a simple rectilinear polygon, it always has four “right” turns more than “left” ones1 . When critical points are met, they are not being cleaned, which means that they exist both in ∂F and in ∂F ′ . Repeating these points, however, does not change the overall size of the set of squares.  (End of Lemma 1) 1 This is a simple consequence of the “rotation index” Theorem (see e.g. [6] pp. 396) : If α : [0, 1] → R2 is a plane, regular, simple, closed  curve, then 01 k(s)ds = 2π, where k(s) is the curvature of α(s) and the curve is traversed in the positive direction. ✲ Lemma 2 Every time a region is traversed by an agent using the SWEEP protocol, its width is decreased by (at least) one, namely : W (Ft′ ) ≤ W (Ft )−1. A corollary of the latest is that the number of tours around a region F that k agents must accomplish before F = ∅ is at most ( W k(F ) + 1). This holds of course only when no spreads occur. Proof : By the definition of the depth of a square, it is the shortest path to a non-critical square in ∂F . According to the SWEEP protocol, after an agent had traversed F , all of the non-critical points in ∂F were cleaned. This means that the depth of every internal square was decreased by (at least) one, meaning that the total width of the shape was decreased by (at least) one. Since the SWEEP protocol preserves the internal order of the agents, when k agents complete a traversal of F , the width of F is decreased by at least k.  (End of Lemma 2) Lemma 3 The time it takes an agent which uses the SWEEP protocol to move along a path of length ct (including delays caused by other agents in the same square) is at most 4 · ct . Proof : According to the SWEEP protocol, an agent is traversing F at a pase of one square every time step. The only exception occurs when several agents are entering the same square. At each time step the number of agents which are not delayed is at most k4 (see a complete proof in [3]). This means that even if an agent collides with other agents continuously, its average traversal time (amortized for the entire group of agents) is at most 4 times its minimal traversal time (in reality, the agents’ traversal time is only slightly more than ct , although an analytic proof is yet to be found).  (End of Lemma 3) Lemma 4 The length of the circumference of Ft never exceeds twice its cardinality, namely : ct ≤ 2 · |∂Ft | − 2 Proof : ∂Ft is a connected graph and thus it has spanning trees. A protocol for constructing a spanning tree for ∂Ft and a Depth First Search (DFS) of it was constructed, such that the path defined by the DFS contains a traversal around Ft (meaning that the DFS is a path which after having several of its squares removed, equals a path which traverses Ft ). An example appears in figure 4. A DFS of a tree can go through each edge at most twice. A tree of |V | vertices contains exactly (|V |−1) edges. Thus, a DFS of a spanning tree of ∂Ft contains at most 2·(|∂Ft |− 1) transitions of edges. Since there exists such a spanning tree that contains a ‘tour’ around Ft then : ct ≤ 2 · |∂Ft | − 2.  (End of Lemma 4) Lemma 5 At any given time, the size of the contaminated region (i.e. St = |Ft |) is bounded by the following rule :   t where η St ≤ S0 + η · c0 + 2(η 2 + η) d X ❄ ✈ Figure 4. An example of the spanning tree protocol. The left chart represents the contaminated region Ft . The middle chart shows the DFS of ∂Ft according to the SPAN-DFS protocol, when the big X marks ps , the non-critical starting point. The right chart shows the traversal path which is contained in this DFS. The drawing on the bottom shows the spanning tree that is created by the protocol and is used for the DFS. See [3] for the SPAN-DFS algorithm. Proof : The only time squares can become contaminated is when spread occurs. When producing an upper bound for St , it is safe to disregard the agents’ cleaning, since they never produce new contaminated squares. The maximal number of new contaminated squares is achieved when the already contaminated squares have the maximal boundary area possible. This happens when the squares are arranged in the form of a straight line. In such a case, whenever the contamination spreads, the area of the shape is increased by (c0 + 2 + 2ι) when ι is a running element of the sequence (1, 3, 5, 7, . . .). Let Ssi denote the area of Ft after the i-th spread. Then for any shape Ft , this is bounded as follows : Ssi ≤ S0 + i(c0 + 2) + 2(1 + 3 + 5 + . . . + (2i − 1)) The last can be simplified to : Ssi ≤ S0 + i · c0 + 2(i2 + i). Since a spread occurs every d time steps, t can be written in a form of : t = i·d+α where i is the number of spreads and α — a delay. Since we are only interested in the number of spreads (i.e. i), we can write : i = ⌊ dt ⌋ By applying this to the previous formula, we get the requested result.  (End of Lemma 5) It is obvious that ∂Ft ≤ St . After combining this with Lemma 4 and Lemma 5 and with the “intra-spreads |∂Ft | preservation” property of Lemma 1, we produce the following bound for ct . Theorem 2 At any given time, the circumference of the contaminated region Ft is bounded as follows :   ct+1 ≤ 2 Λt + η · c0 + 2(η 2 + η) − 1 where   t η d and Λt =  |∂F0 |, S0 , t≤d t>d Proof : According to Lemma 4, between two spreads, ct is bounded by twice it’s original value (from just after the last spread). After a spread occurs, the value of ct is being reset, according to the bound for the total size of Ft (Lemma 5).  (End of Theorem 2) Since the initial shape of the contaminated region is unknown, when a spread occurs its width might grow in more than one. This might happen when several ‘blocks’ merge into one (an example appears in figure 5). Lemma 6 Assuming no agents are cleaning a shape F , the width of the shape can be bounded as following :  W (F0 ), t≤d W (Ft ) ≤ WM AX (t), t > d q q q q q q q q q q q q qqqq qqqq q q q q q q q q q q q q q q q q q q q q qqqq qqqq q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q Figure 5. The squared area represents the original shapes while the the dots represent the new squares which are added after a contamination spread. The left chart shows a shape whose width is 2, which spreads to a shape of width 6. The formula in Lemma 6 produces widths of 7 and 9 respectively. The right chart demonstrates the difficulty of foretelling the new width of a shape — while the original width is 1, the shape that is produced after the spread is a sphere, whose width is 7. This example can be easily enlarged in order to produce any requested value for the width of the shape that is created after the spread. where WM AX (t+1) ≤ 1+  2S0 + 2 t d c0 + 4( t 2 d + 2 t d )−1 Proof : The maximal width of a shape of X squares is achieved when the squares are arranged as a sphere. The 2 size of a sphere of diameter a is a 2+1 . The width of a sphere of diameter a is a+1 2 . Thus : √ 1 + 2 · SSPHERE − 1 WSPHERE = 2 Applying Lemma 5 yields the requested result.  (End of Lemma 6) Figure 5 presents an example for the difficulty of accurately foretelling the new width of a shape after a contamination spread. Notice though that in convex shapes the “merging blocks” phenomenon cannot occur. Thus, after every contamination spread the width can grow by at most 1. This notion appears in Lemma 7. Lemma 8 WREM OV ED (t + 1) ≥ W (Ft+1 ) ≤ W (F0 ) + η η   t d Let WREM OV ED (t) denote the decrease in F ’s width due to the agents activity until time t (i.e. the number of completed traversals around the contaminated region, multiplied by k). Note that in time step t, each agent completes 1 ct of the circumference. Since we know the value of ct for every t, and since we know that the time it takes an agent to move along a path is at most 4 times the length of this path, then the decrease in the original shapes’s width, caused by the agents’ cleaning can be bounded as following : i=1 k 4 · ci  Theorem 3 (F0 )+k) 1. If (t = 8(|∂F0 |−1)·(W + 2k) is not greater than k d, then tSU CCESS = ⌈t⌉. This also holds for static environments, since in such cases d → ∞. 2. Otherwise (t > d) : if F0 is convex, find the minimal t for which : t 8 t 1 ≥ γ+ · i 2 i k d S − 1 + 2⌊ ⌋ + (c + 2)⌊ ⌋ 0 d d i=d+1 0 where γ where t A bound over the cleaning time of a given shape F0 can be produced using the following procedure : Lemma 7 If Ft is convex then : W (′ Ft ) ≤ W (Ft ) + 1  d − 2k 8(k + W (F0 )) − k |∂F0 | − 1 3. Otherwise (t > d, F0 is not convex), find the minimal t for which : t 1 i=d+1 S0 − 1 + + (c0 + 2)⌊ di ⌋ 2⌊ di ⌋2 8 ≥α+ 2k   t β+4 d 2 + ≥ t  d where α  8+ d − 2k 8 − 2k |∂F0 | − 1 and β  2S0 + 2c0 − 1 Proof : In order for F0 to be cleaned, there should exist a time tSU CCESS in which the width of the shape will be 0. Remembering that W (Ft ) is monotonically increasing and disregards the cleaning performed by the agents, and that WREM OV ED (t) denotes the decrease in the width of F0 due to the cleaning of the agents, then we are interested in : W (FtSU CCESS ) + k ≤ WREM OV ED (tSU CCESS ) The purpose of the “+k” is to guarantee the cleaning of the ‘skeleton’ that remains when the width of the shape decreases to zero. In such a time, the agents function as a single agent, and we must guarantee that an additional traversal will be performed. We now apply Lemma 6 (Lemma 7 for convex shapes), and Lemma 8. We first examine the case of tSU CCESS ≤ d. Regarding W (Ft ), ct and WREM OV ED (t) this means that : ∀i ≤ t , W (Fi ) ≤ W (F0 ) and 0| − t∀i ≤kt , ci+1 ≤ 2(|∂F k·t ≥ 1) and WREM OV ED (t) ≥ i=1 4·ci 8(|∂F0 |−1) . Thus, we are interested in :   k · tSU CCESS ≥ W (F0 ) + k 8(|∂F0 | − 1) Since releasing the agents requires an additional 2k time steps, the final bound for this case is : tSU CCESS ≥ ≥  d i=2k i=2k k 4 · ci  ≥  tSU CCESS    (d − 2k) · k k k + ≥ + 4 · ci 4 · ci 8(|∂F0 | − 1) i=d+1 tSU CCESS + i=d+1 k 8 · (S0 + ⌊ di ⌋ · c0 + 2(⌊ di ⌋2 + ⌊ di ⌋) − 1) 1 ≥ i 2 S − 1 + 2⌊ ⌋ + (c0 + 2)⌊ di ⌋ d i=d+1 0   t 2 8 t  ≥α+ β+4 + 2k d d and β  2S0 + 2c0 − 1 In order to find such t, one should add elements to the sum, iteratively, while for every new element, recalculate the value of the right expression. The minimal t for which the above holds is tSU CCESS . Performing the above takes O(tSU CCESS ) time (since every iteration is very cheap). When F0 is convex, a tighter bound can be produced. Since for convex shapes W (Fi+1 ) ≤ W (F0 ) + ⌊ di ⌋, using the previous expression for WREM OV ED yields :  d   t  k k t + ≥ W (F0 ) + k + 4 · ci 4 · ci d i=d+1 i=2k ⇓  t i=d+1 k 4 · ci  ≥ W (F0 ) + k + (d − 2k) · k t − d 8(|∂F0 | − 1) ⇓ t i=d+1 1 S0 − 1 + 2⌊ di ⌋2 + (c0 + 2)⌊ di ⌋ ≥γ+ t 8 · k d d − 2k 8(k + W (F0 )) − k |∂F0 | − 1  (End of Theorem 3) 6. SIMULATIONS A computer simulation, implementing the SWEEP cleaning protocol, was constructed. The simulation examined shapes of various geometric features, and tracked the cleaning time of k agents (k ∈ [1, 100]) which used the SWEEP protocol. Following is a sample of the results, including the predictions of the lower and upper bounds. The sample includes a “cross” of size 2960, “rooms” of size 3959, and a random, semi-convex, shape of size 5000, where d = 1000 :  Requesting the last to be greater than the increasing width of the shape, we receive the following, for which we must find the minimal t which satisfy it : t d − 2k 8 − 2k |∂F0 | − 1 γ If the tSU CCESS received is greater than d, we continue to the next step. Lemma 6 and Theorem 2 supply us with W (Ft ) and ct . As for WREM OV ED (tSU CCESS ), remembering that the actual cleaning begins at t = 2 · k (the time it takes to release the agents) we get : tSU CCESS α8+ where 8(|∂F0 | − 1) · (W (F0 ) + k) + 2k k WREM OV ED (tSU CCESS ) ≥ where The lower curves represent the results predicted by the lower bound, while the upper curves represent the actual cleaning time, produced by the simulations performed (the graphs present the cleaning time as a function of the number of agents). The left graph presents the results that were produced by the “cross”, etc’. 4000 ❵❵ ✻ 12000 3000 2000 1000 ✻ ❵❵ 8000 9000 6000 6000 ❵ ❵❵ ❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵ ✲ 10 20 ❵❵❵ 30 8. REFERENCES ❵ [1] M. Abramowitz, I.A. Stegun: “Handbook of Mathematical Functions”, National Bureau of Standards Applied Mathematics Series 55, (1964) 4000 ❵ 3000 ✻ ❵❵ 2000 ❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵ ✲ 10 20 30 ❵❵❵ ❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵❵ ✲ 10 20 30 The following graph contains the upper bound for the “cross”. Notice that the lower, tighter, curve was produced when taking into account that the “cross” shape is “convex”: 40000 ✻ [2] I.A. Wagner, A.M. Bruckstein: “Cooperative Cleaners: A Case of Distributed Ant-Robotics”, “Communications, Computation, Control, and Signal Processing: A Tribute to Thomas Kailath”, Kluwer Academic Publishers, The Netherlands (1997), pp. 289–308 [3] Y. Altshuler, V. Yanovski: “Dynamic Cooperative Cleaners — Various Remarks”, Technical report, (2005) 30000 20000 10000 ✲ 10 20 30 40 50 60 7. DISCUSSION AND CONCLUSION The paper presents the Dynamic Cooperative Cleaners problem, where a group of simple and limited agents must clean a spreading “contaminated” sub-grid. This problem has several “real world” applications. For example, the coordination of fire-fighting units, or an implementation of a distributed anti-virus system for computer networks. Additional applications are distributed search engines, and various military applications. A cleaning protocol for the problem was presented and analyzed, and several analytic bounds for it, were derived. While examining the dynamic cooperative cleaners problem, new interesting opportunities for an extended research have emerged. We have already started investigating some of the above, producing more valuable results. Following are various aspects of this ongoing and future research, some of which are to be published elsewhere in the near future. An explicit upper bound for the cleaning time based on Theorem 3 has been derived, using the Ψ function (see [1]). In addition, we have recently shown the problem of finding the best cleaning time to be an NP-Hard problem. This increases the motivation of producing analytic bounds for cleaning protocols designed for these problems. Another important result is the discovery of new geometric features, which are invariants with respect to the agents’ activity and the spreading contamination. Their relevance to the problem was demonstrated by developing an improved upper bound for the cleaning time of the agents. An interesting aspect is the feasibility question, i.e. foretelling the minimal number of agents required to clean a given shape (regardless of the cleaning time). In addition, developing new cleaning protocols for the problem and producing tighter bounds are also of interest to us. The authors are currently in the stages of developing a tighter bound for the cleaning protocol. [4] I.A. Wagner, M. Lindenbaum, A.M. Bruckstein: “Efficiently Searching a Graph by a Smell-Oriented Vertex Process”, Annals of Mathematics and Artificial Intelligence, Issue 24 (1998), pp. 211–223 [5] R.C. Arkin, T. Balch: “Cooperative Multi Agent Robotic Systems”, Artificial Intelligence and Mobile Robots, MIT/AAAI Press, Cambridge, MA, (1998) [6] M.P. Do-Carmo: “Differential Geometry of Curves and Surfaces”, Prentice-Hall, New-Jersey, (1976) [7] R.A. Brooks: “Elephants Don’t Play Chess”, Designing Autonomous Agents, P. Maes (ed.), pp. 3–15, MIT press / Elsevier, (1990) [8] S.Levi: “Artificial Life - the Quest for a New Creation”, Penguin, (1992) [9] S.Sen, M. Sekaran, J. Hale: “Learning to Coordinate Without Sharing Information”, Proceedings of AAAI94, pp. 426–431 [10] L.Steels: “Cooperation Between Distributed Agents Through Self-Organization”, Decentralized A.I - Proc. first European Workshop on Modeling Autonomous Agents in Multi-Agents world, Y.DeMazeau, J.P.Muller (Eds.), pp. 175–196, Elsevier, (1990) [11] G.Beni, J.Wang: “Theoretical Problems for the Realization of Distributed Robotic Systems”, Proc. of 1991 IEEE Internal Conference on Robotics and Automation, pp. 1914–1920, Sacramento, CA, April (1991) [12] V.Breitenberg: Vehicles, MIT Press (1984) [13] D.Henrich: “Space Efficient Region Filling in Raster Graphics”, The Visual Computer, pp. 10:205–215, Springer-Verlag, (1994) [14] R. Baeza-yates, R. Schott: “Parallel Searching in the Plane”, Computational Geometry 5 pp. 143–154 (1995)