Three-Dimensional Multi-Agent Foraging Strategy Based on Local Interaction

This paper considers a multi-agent foraging problem, where multiple autonomous agents find resources (called pucks) in a bounded workspace and carry the found resources to a designated location, called the base. This article considers the case where autonomous agents move in unknown 3-D workspace with many obstacles. This article describes 3-D multi-agent foraging based on local interaction, which does not rely on global localization of an agent. This paper proposes a 3-D foraging strategy which has the following two steps. The first step is to detect all pucks inside the 3-D cluttered unknown workspace, such that every puck in the workspace is detected in a provably complete manner. The next step is to generate a path from the base to every puck, followed by collecting every puck to the base. Since an agent cannot use global localization, each agent depends on local interaction to bring every puck to the base. In this article, every agent on a path to a puck is used for guiding an agent to reach the puck and to bring the puck to the base. To the best of our knowledge, this article is novel in letting multiple agents perform foraging and puck carrying in 3-D cluttered unknown workspace, while not relying on global localization of an agent. In addition, the proposed search strategy is provably complete in detecting all pucks in the 3-D cluttered bounded workspace. MATLAB simulations demonstrate the outperformance of the proposed multi-agent foraging strategy in 3-D cluttered workspace.


Introduction
This paper considers a multi-agent foraging problem in which multiple autonomous agents find resources (called pucks) in a bounded workspace and carry the found resources to a designated location called the base.Every agent has limited capabilities and lacks sophisticated hardware such as a Global Positioning System (GPS).Every agent executes simple decision procedures in a decentralized manner, and there is no leader.
Foraging has real-world applications, e.g., in the distributed cleanup of hazardous toxins or the automated construction and repair of artificial structures; in both of these situations, agents must first locate and then transport objects of interest (toxins in the former, building blocks in the latter) in a decentralized manner [1][2][3].Collection and transport tasks have various applications, such as mine-clearing, hazardous waste cleanup, and search and rescue.
Our paper handles multi-agent foraging, which involves multiple agents collecting randomly distributed resources (pucks) and carrying them back to a single position (base).We address 3D multi-agent foraging based on local interaction, which does not rely on global localization of an agent.In other words, GPS is not utilized by the agents.In this problem, multiple agents begin moving from the base with the goal of gathering all of the pucks, which are randomly distributed in the workspace.In the proposed solution, each agent is controlled such that they carry the sensed pucks back to the base while moving based on local interaction with their neighbors.In this way, an agent's maneuvering does not depend on global localization.
We assume that each agent has local sensing, local communication, and movement abilities.Each agent can detect a nearby puck using its local sensors, such as a camera.We consider a case in which the agents move in an unknown 3D workspace with many obstacles that are not known in advance.In this case, obstacles can block a communication link between agents and hinder the motion of each agent.Each agent lacks any global localization or global communication.
If an agent moves too far away from any other agent, it cannot communicate with the others due to the limited sense-communication range.Hence, an agent must stay within sense-communication range of at least one other agent while exploring the unknown 3D cluttered workspace.
Our study considers a bounded 3D workspace which contains many unknown obstacles.Our search strategy is provably complete in detecting all pucks in a 3D cluttered bounded workspace which is not known in advance.We prove that under the proposed search strategy all pucks in the unknown bounded workspace are found in finite time.
To the best of our knowledge, no paper in the literature has handled the 3D multi-agent foraging problem in our article.Moreover, our article is novel in letting multiple agents perform foraging and puck carrying in a 3D unknown cluttered workspace while not depending on global localization of an agent.We only use local interaction with maximum sense-communication range.
The proposed foraging strategy has the following two steps.The first step in the proposed foraging strategy is to detect every puck in the 3D cluttered unknown workspace in a provably complete manner.Initially, all agents are located at the base.The search process is performed by moving agents one by one to expand the sensor coverage, until no coverage holes remain in the 3D cluttered bounded workspace.The 3D cluttered workspace is considered completely covered when every puck has been sensed by at least one agent.
The second step in foraging is to collect the pucks and return them to the base.In the collection step, global localization and global communication cannot be utilized.Because the agents cannot use global localization, each agent moves based only on local interactions within its limited sense-communication range.
The novel contributions of this paper are summarized as follows: 1.This article is novel in allowing multiple agents to perform foraging and puck search in a cluttered 3D workspace while not relying on global localization of agents.2.
Our search strategy is provably complete in detecting all pucks in a 3D cluttered bounded workspace which is not known in advance.

3.
Our paper is novel in addressing how to return all pucks to the base in such a way that global localization and global communication are not required.
MATLAB simulations are used to demonstrate the performance of our proposed 3D foraging strategy.
The remainder of this article is structured as follows: Section 2 presents a literature review of related papers; Section 3 describes the preliminary information of this article; Section 4 describes the definitions and assumptions in this paper; Section 5 describes the 3D multi-agent foraging strategy; Section 6 addresses the MATLAB simulations; finally, Section 7 presents our conclusions.

Literature Review
Area coverage methods using multiple agents can be applied to detect randomly distributed pucks in the workspace.In [4][5][6][7], the authors handled how to make multiple agents perform area coverage in a 2D workspace.In [8,9], the authors utilized 2D Voronoi tessellations for making agents expand the agent network based on information sharing with neighbors.However, Refs.[8,9] did not consider obstacles in the workspace.The authors of [10] considered multiple agents that are instructed to cover a field of interest (FoI).After agents complete a task at one FoI, they move to a new FoI, which may be far away from the current FoI.According to [10], agents can automatically adjust their deployment density in the new FoI based on the requirements of various tasks or regions.However, coverage strategies for an 3D cluttered unknown workspace were not considered in these papers.Moreover, the authors did not handle multi-agent foraging, which involves multiple agents collecting randomly distributed pucks and carrying them back to the base.
There are many papers on multi-agent foraging strategies inspired by nature, e.g., ant, bee, and physarum polycephalum [2, 3,[11][12][13][14][15][16].Inspired by nature, Refs.[17,18] showed that random searches relying on puck distribution can be optimized by considering individuals in foraging.The superdiffusive property of Levy walks, in which the mean squared displacement increases superlinearly [12,19], is a known mechanism that nature uses to handle low information levels from sensory systems.Inspired by the behaviour induced by pheromones released by ants, navigation methods based on landmarks or markers such as RFID tags were addressed in [15,20,21].Even an extremely sensor-poor and processingpoor robot can perform navigation when accessing markers [21] or RFID tags [20].Inspired by the pheromone trails of ants, Refs.[2, 3,22,23] addressed robotic systems mimicking ants' foraging.In [16], the author developed a virtual pheromone (VP) algorithm inspired by the foraging behavior of ants, with the exception that the agents themselves act as pheromone locations (beacons) and these virtual pheromones are laid and detected through direct local agent-agent communication.The authors of [14] proposed foraging algorithms inspired by bees.In [13], the foraging process (search and contraction) of physarum polycephalum, a unicellular and multi-headed slime mold, was simulated utilizing multi-agent systems.
However, mimicking natural behaviors cannot guarantee that every puck is detected by an agent within a finite time.In other words, mimicking natural behavior is not provably complete for searching all pucks.Moreover, it is not clear what hardware can perform the functionality of a pheromone.In our paper, we specify the sensor systems required for the proposed foraging strategy.
To cover a workspace with large uncertainty, random searches may be beneficial; however, random maneuvering can easily lead to a lost agent in cases where GPS is not available.For maintaining network connectivity, each agent needs to move while considering the maximum sense-communication range of an agent.This inspired us to develop a multi-agent foraging strategy which relies on local sensors with the maximum sensecommunication range.In our paper, the proposed search strategy is provably complete in detecting all pucks in a 3D bounded workspace which is not known in advance.
Advances in reinforcement learning have recorded success in various domains.Considering a 2D small workspace with no obstacles, Ref. [24] formulated multi-robot learning for learning foraging behavior in a group of four ground robots.In [25], the author investigated the application of reinforcement learning as a rehearsal (RLaR) for the multi-agent foraging problem.However, the reinforcement learning approach in [25] cannot assure that every puck is found under the subsequent search strategy.The fundamental problem in multi-agent reinforcement learning is, as always, the curse of dimensionality [26,27].The state-action space and the combinatorial possibilities of agent interactions increase exponentially with the number of agents, which renders sufficient exploration a difficult problem by itself.This is intensified when agents only have access to partial observations of the environment [27].Therefore, open questions remain, such as how to sufficiently explore large and complex spaces and how to solve large combinatorial optimization problems [27].
In our paper, agents explore 3D cluttered environments which are not known in advance.Therefore, each agent only has access to local information, on which individual decisions must be taken.In other words, agents have access to only partial observations of the environment.In our paper, the proposed search strategy is provably complete in detecting all pucks in a 3D bounded workspace which is not known in advance.Our MATLAB simulation shows that the proposed foraging strategy runs quickly and is suitable for real-time applications.

Graph Theory
Utilizing graph theory [28], one can define a graph as G = (V(G), E(G)) such that V(G) is the node set and E(G) is the edge set.Two nodes of an edge e ∈ E(G) are called neighbors.A path is a sequence of connected edges.A graph G is considered connected if a path can be established between any two of its nodes.
A cycle is a graph building a closed chain.A tree T is a connected graph containing no cycles.A spanning tree of a graph G is a tree which contains all nodes in G.
One node of T is set as the root.For convenience, let v denote a node in T and let N (v) denote a neighbor of v, which is one hop distance from v. In T, p(v) (the parent of v) is the neighbor of v along the path to the root.Furthermore, c(v), the child of v is a node such that v is the parent of c(v).
A leaf is a node having no children.A descendant of v is a node which is either c(v) or the descendant of c(v) (recursively).An ancestor of v is a node which is either p(v) or the ancestor of p(v) (recursively).Figure 1 depicts a tree illustrating c(v) and p(v).

Problem Statement and Foraging Strategy Introduction
Our paper handles multi-agent foraging, which involves multiple agents collecting randomly distributed pucks and carrying them back to a base.To make the problem more interesting, in this article we solve the problem of 3D multi-agent foraging in a GPS-denied bounded workspace with many unknown obstacles.The goal of our multi-agent foraging problem is as follows.Considering an unknown 3D cluttered bounded workspace, multiple agents begin moving from the base to search for all of the randomly distributed pucks.Each agent is controlled such that they carry the sensed pucks back to the base.All agents must move based only on local interaction with their neighbors, without relying on global localization.
The proposed foraging strategy has the following two steps.The first step is to detect every puck in the 3D cluttered bounded workspace in a provably complete manner.Initially, all agents are located at the base.As an exceptional situation, we further handle the case where a number of agents are not initially located at the base (Section 5.1.3).
The search process is performed by moving agents one by one to expand the sensing coverage until no coverage holes remain.The 3D cluttered workspace is considered to have been completely covered when every puck has been sensed by at least one agent.This provably complete puck search is presented in Section 5.1.
The second step is to return every puck to the base.In the collection step, no global localization or global communication is utilized.This collection step based on local interaction is presented in Section 5.2.

Assumptions and Notation
We consider discrete-time systems.Let dt define the sampling interval in a discrete-time system.For instance, in the case where our controls are applied at every 2 s, dt = 2 seconds.
Consider the case where the 3D workspace is closed and bounded.There are unknown obstacles inside the 3D workspace.
Suppose that there are initially N agents at the base.Let n i define the ith agent (i ∈ {1, 2, . . ., N}).Let n i ∈ R 3 define the 3D location of n i , where i ∈ {1, 2, . . ., N}.Let n i (k) ∈ R 3 indicate n i at sample step k.The sampling interval between sample steps k and k + 1 is dt seconds.
Because the 3D bounded workspace contains unknown obstacles, it is not possible to derive the number of agents required to cover the entire workspace.Thus, we assume that N is sufficiently large to cover the entire workspace.Section 5.1.3handles the exceptional case in which N is not sufficiently large to cover the full workspace.
The motion model of each agent n i is Here, v i (k) defines the velocity of n i at sample step k.In our paper, each agent moves based on local interaction with its neighbors.Section 5.3 presents how we set v i (k) in this paper.
We acknowledge that (1) does not consider the motion constraints on an agent.Our paper is based on generation of multiple agents' paths, i.e., weconsider high-level control of multi-agent systems.
For instance, consider an agent such as an Autonomous Underwater Vehicle (AUV) with non-holonomic constraints.Along the generated path, each end point of a straight line is set as the waypoint for an agent.With the waypoints set, we can utilize the path following controller in [38,39] while considering the dynamics of the agent to ensure that an agent visits the waypoints.How to ensure that an agent with motion constraints move along the waypoints is beyond the scope of the present paper.
Let the sense-communicate range r cs be defined as the smaller value between the maximum sensing range and the maximum communication range.According to this definition, if n i − n j < r cs , then n i and n j can sense each other while communicating with each other.
We say that a puck is detected by n i in the case where the relative distance between a puck and n i is less than the sense-communicate range r cs .Therefore, our aim is to ensure that every puck is within a distance r cs from at least one agent.In this way, every puck can be found by the deployed agents in a provably complete manner.
Let L(n, m) define a straight line segment with the two end points being two agents, say, n and m.We say that L(n, m) is collision-free when L(n, m) does not cross an obstacle.This implies that an agent can safely travel along L(n, m) without colliding with any obstacles.
Let I = (V(I), E(I)) define the graph presenting the networked system.Every node in V(I) indicates an agent.An edge, say {n i , n j } ∈ E(I), indicates that n i and n j are neighbors.Here, we say that two agents n i and n j are neighbors in the case where the following conditions are met: 1.
L(n i , n j ) is collision-free; 2. n i − n j < r cs , i.e, n i and n j can sense each other while communicating with each other.Let N (n i ) indicate the neighbors of an agent n i .Let S(n i ) define the sphere with radius r cs that has its center located at n i .Here, S(n i ) is called the sensing sphere of n i .We assume that a puck inside S(n i ) is detected by n i .Let ∂S(n i ) specify the boundary of S(n i ).
As we add n i to fp(ψ, θ), we obtain the global position of a point on ∂S(n i ).Note that ψ and θ are respectively selected from among 36 values.Therefore, we derive An open point of n i denotes a point among Q points of n i such that a straight line segment connecting n i and the point does not cross any obstacles.In practice, open points can be detected by an agent's local sensors with range r cs .For instance, lidar sensors on n i can be used to derive the open points of n i .
Consider a case where multiple sensing rays with range r cs are emitted from an agent in order to sense its surroundings.As long as a ray does not cross an obstacle, it can travel a distance r cs .In this case, the ray is related to an open point.
A frontier point F(n i ) denotes an open point of n i which exists outside S(n j ) for all j = i.As Q → ∞, the density of frontier points on ∂S(n i ) increases.Let frontierInf define the set of frontier points as Q → ∞.
A frontierInf is on the border between i∈{1,2,...,N} S(n i ) and an open space covered by no sensing spheres.If every agent has no frontierInf, then all agents' sensing spheres cover the entire open space.

Assumptions for Each Agent
Every agent n i (i ∈ {1, 2, . . ., N}) is assumed to satisfy the following: (A1) n i measures the relative position of its neighbor agent with its local sensors; (A2) n i stores the relative position of its frontier point in F(n i ); (A3) Every puck inside S(n i ) is detected by n i .
We consider an agent which can measure the relative position of its neighbor agent utilizing proximity sensors.For example, an agent n emits signal pings for measuring its neighbor agent.Suppose that the pings emitted from n are reflected from its neighbor agent, say, m ∈ N (n).In this case, n can estimate the elevation angle, azimuth angle, and range to m through the 3D multiple signal classification (MUSIC) algorithm [40].Therefore, Assumption (A1) is viable.
We next show that Assumption (A2) is viable.Recall that a frontier point F(n i ) denotes an open point of n i , which exists outside S(n j ) for all j = i.Because the radius of a sensing sphere is r cs , the sensing sphere of n cannot intersect with that of any other agent which is more than two hops away from n.
Under Assumption (A1), an agent n can access the relative position of m ∈ N (n).Moreover, m ∈ N (n) can access the relative position of its neighbor agent, say, m ∈ N (m), as n and m are two hops distant from each other.The relative vector from n to m is obtained by adding the following two vectors: (1) the vector from n to m (2) the vector from m to m In this way, n can derive the relative position of an agent which is two hops distant from n.
Because n i can measure its adjacent obstacles with its local sensors, n i calculates the relative position of its open point.Therefore, n i can determine an open point which exists outside the sensing sphere of any other agent.In other words, n i can derive the relative position of a frontier point in F(n i ).Accordingly, Assumption (A2) is viable.

3D Multi-Agent Foraging Strategy
This section proposes our 3D multi-agent foraging strategy composed of search and collection steps.

Provably Complete Puck Search
This subsection describes solving the following problem.Generate a network covering the entire 3D cluttered unknown workspace such that no coverage holes remains while maintaining network connectivity.
It is considered that there are no more coverage holes when every puck in the 3D cluttered workspace has been detected.

Distributed Generation of a Spanning Tree
As the first step in solving the above problem, we introduce a distributed Breadth First Search (BFS) algorithm, inspired by [41].In [41], a distributed algorithm introduced to ensure that a node in the network can guide a moving object across the network to the goal.Algorithm 2 in [41] can be applied to make a spanning tree T rooted at an agent.
The goal sensor in Algorithm 2 of [41] represents the root in Algorithm 1.In Algorithm 1, each agent n stores and updates hops g (n), which indicates the hop distance to the root, say, n r .The root n r initializes hops g (n r ) = 0. Initially, every other agent initializes hops g (n) = ∞, where n = n r .In Algorithm 1, ancestor(n) denotes the set of ancestors of n.
Algorithm 1 Distributed BFS algorithm to generate a spanning tree T 1: Every agent n contains hops g (n), which indicates the hop distance to the root; 2: Every agent n contains ancestor(n) = {}; 3: The root n r sets hops g (n r ) = 0 initially; 4: One initially sets hops g (n) = ∞ where n = n r ; 5: Initially, n r transmits ancestor(n r ) and hops g (n r ) to its neighbors; 6: repeat 7: n ← every agent; 8: if the agent n receives ancestor(m) and hops g (m) from its neighbor, say m ∈ N (n) then 9: The agent n updates its hop distance information using (6); The agent n updates ancestor(n) using (7); 12: The agent n broadcasts hops g (n) and ancestor(n) to its neighbors; 13: Initially, the root n r sends its hop distance information hops g (n r ) and ancestor(n r ) to its neighbors.Suppose that an agent n receives a hop distance message from its neighbor, say, m ∈ N (n).Then, n updates its hop distance information under When hops g (n) becomes hops g (m) + 1 under (6), the ancestor set (ancestor(n)) of n is updated: This implies that the set ancestor(n) is generated by adding m to the set ancestor(m).When hops g (n) becomes hops g (m) + 1 under (6), n broadcasts the updated hops g (n) and ancestor(n) to its neighbors.
The tree T is built until hops g (n) = ∞ for all n.In [41,42], it was proved that the number of message broadcasts of each agent in this algorithm is one.This implies that Algorithm 1 has a computational complexity of O(1).

Distributed Puck Search Protocol
In order to find every puck in the 3D bounded workspace, we propose a distributed puck search protocol (Algorithm 2).Algorithm 2 expands the agent network coverage while maintaining the network connectivity until no coverage holes remain in the workspace.For no coverage holes to remain, it must be the case that every puck has been sensed by at least one agent.
In Algorithm 2, all agents are initially at the base.Then, every agent moves one after the other such that whenever each agent turns on its local sensors at its designated position (the target point in Algorithm 2) the unsensed open space is reduces gradually.
In Algorithm 2, all agents are initially at the base.Therefore, every agent is a neighbor to n 1 .In the initial phase of Algorithm 2, n 1 initiates its local sensors with range r cs while staying at the base.Accordingly, frontier points of n 1 are formed using the approach in Section 4.
Algorithm 2 Distributed puck search protocol for all agents N agents are located at the base, thus every agent is a neighbor to n 1 ; AgentsWithPucks = {}; The agent n 1 is at the base's entrance; The agent n 1 initiates its local sensors with range r cs , and frontier points of n 1 are formed; i = 2; repeat By running Algorithm 1 in Section 5.1.1,begin generation of T rooted at n i ; Algorithm 1 runs until an agent, say n , receives a hop distance message from its neighbor in N (n ) and a frontier point exists at n ; if n i cannot find an agent with a frontier point then This puck search algorithm is finished; Since n i is a neighbor to n 1 initially, the path information P is transmitted to n i ; The agent n i moves along the path to n ; Once n i reaches n , one frontier point on n , say tgt n i , is set as target point of n i ; The agent n i moves to tgt n i ; if the agent n i reaches tgt n i then The agent n i initiates its local sensors with range r cs , and detects its neighbors; Frontier points of n i are formed using the approach in Section 4; if n i detects a puck then AgentsWithPucks.append(ni ); Algorithm 2 applies to all agents.In Algorithm 2, every agent initiates its maneuver in the following order: Whenever a new agent, say n i , initiates movement, it continues moving until meeting its target point.After meeting the target point, n i initiates its local sensors with range r cs .This sensor initialization constructs frontier points for n i , as addressed in Section 4. Whenever each agent reaches its target point, the unsensed open space is gradually reduced.This iterates until every agent is located at its designated target point.
In Algorithm 2, AgentsWithPucks denotes the set of agents that have detected a puck.Whenever an agent initiates its local sensor, it may detect a puck.When an agent detects a puck, that agent is added to the agent set AgentsWithPucks.For instance, if an agent n i detects a puck, AgentsWithPucks.append(ni ) is performed as presented in Algorithm 2.
In Algorithm 2, T rooted at n i is generated by running Algorithm 1 from Section 5.1.1.Algorithm 1 runs until an agent, say n , receives a hop distance message from its neighbor, say m ∈ N (n ), and n has a frontier point.In this case, n needs to let n i access a path to n .Algorithm 3 is used to make n i access a path to n .In this algorithm, the initial path P = {n } is generated from n .Algorithm 3 iteratively appends a parent node to P until n 1 receives P. Because n i is initially a neighbor to n 1 , the path information P is transmitted to n i .
The agent n broadcasts P = {n } to its parent p(n ) in T; repeat if an agent n receives the path information P then P.append(n); P is transmitted to p(n); end if until n 1 receives P; Return P; In Algorithm 2, n i travels along the path in T to reach n .For convenience, let P denote this path.Next, we present how n i travels along P. According to the definition of an edge E(I), P is collision-free for n i .Furthermore, the length of every line segment of P is shorter than r cs .As n i encounters an agent in P, n i can move towards the next agent in P utilizing its local sensors.As n i encounters an agent in P, say n l , n i accesses the next agent in P utilizing its local sensors.This is viable due to Assumption (A1).Note that global positioning is not required for this local maneuver.
As n i encounters the last agent in P, n i can move to its target point tgt n i .This maneuver is performed using the local sensors of n i , based on Assumption (A2).After n i encounters its target point tgt n i , n i initiates its local sensors.When n i initiates its local sensors, several frontier points inside S(n i ) are removed.
Next, we verify that this removal is viable.Consider a case where a frontier point in F(n j ) is inside S(n i ).Because the relative distance between n j and a frontier point in F(n j ) is r cs , n j is a neighbor to n i .Under Assumption (A1), n i measures the relative position of n j .The relative vector from n i to a frontier point in F(n j ) is obtained by adding the following two vectors: (1) The vector from n i to n j (2) The vector from n j to the frontier point in F(n j ) The above two vectors are accessible based on Assumptions (A1) and (A2).As n i initiates its local sensors, several frontier points inside S(n i ) are removed.Thereafter, n i+1 is deployed, finds a frontier point, and travels along T until meeting the frontier point.This continues until Algorithm 2 ends.Algorithm 2 is complete if i == N or if no frontier point is found using T. In Algorithm 2, an agent n i travels along a path in T until meeting tgt n i .Consequently, we have the following Theorem 1.
Theorem 1.Every agent maneuvers utilizing Algorithm 2. When an agent n i travels along a path in T until meeting tgt n i , collision avoidance is assured.As n i travels along a path in T, say P, n i moves based on local interaction with sense-communication range r cs .
Proof.Agent n i travels along a path in T, say P, until meeting tgt n i .Let P = {m 1 → m 2 → • • • → m end } define the agents along the path.After n i encounters m j (j ≤ end − 1), n i moves to m j+1 .Furthermore, after n i encounters m end , n i moves to tgt n i .The maneuver of n i is performed using the local sensing measurements of n i under Assumptions (A1) and (A2).
According to the definition of an edge E(I), P is collision-free for n i .Furthermore, the length of every line segment of P is shorter than its sense-communication range r cs .Thus, the theorem is proved.
Consider an ideal case where Q = ∞.We then have Theorem 2. Theorem 2 proves that when the 3D network is fully constructed utilizing Algorithm 2, then no coverage holes remain.When no coverage holes exist, every puck in the 3D cluttered workspace is detected.
Theorem 2. If a frontierInf cannot be detected using the 3D network, then the open space is entirely covered by all sensing spheres such that no coverage holes exist.
Proof.Utilizing the transposition rule, we can prove the following statement.If an open space which exists outside of every sensing sphere exists, then a frontierInf associated with the space can be detected.
We consider a bounded and closed 3D workspace.Consider the case where an open space which is outside of every sensing sphere exists.Let O specify this uncovered open space.A frontierInf is on the border between i∈{1,2,...,N} S(n i ) and an open space covered by no sensing spheres.Therefore, at least one agent, say n j , has a frontierInf intersecting the boundary of O. Utilizing Theorem 1, n j is connected to n r .Accordingly, we can find this frontierInf utilizing T.
Theorem 2 proves that utilizing Algorithm 2, every puck in the 3D cluttered workspace is detected when we cannot detect a frontierInf using the 3D network.However, even in the case where a frontierInf is detected, we require the base to have at least one remaining agent to cover the frontierInf.Thus, Algorithm 2 can only lead to detection of all pucks if N is sufficiently large to cover the entire workspace.

Exception Handling
Up to now, we have considered the case in which all agents begin moving from the base.In practice, it may be the a case that i reaches N when Algorithm 2 is complete.This implies that there may not be sufficient agents in the base.In this case, it may be necessary to deploy new agents from a new point, which can be far from the base.
These new agents run Algorithm 2 starting from their initial locations.As time passes, the network built by new agents, say I, meets with the network built by other agents, say, I c .This implies that an agent in I becomes a neighbor to an agent in I c .In this case, the network built by I is merged with that built by I c .Then, Algorithm 1 in Section 5.1.1 is run to cover the merged network.Using Theorem 2, this merged network keeps expanding until no coverage holes remain.Note that our distributed search strategy is provably complete in detecting all pucks in the 3D cluttered bounded workspace.

Collection of All Pucks
Next, we address the collection step, which involves collecting all of the pucks and returning them to the base.Every puck needs to be collected and returned to n 1 , which is located at the base.In the collection step, no global localization or global communication can be used.Therefore, the agents need to collect the pucks while maintaining network connectivity.
To maintain network connectivity during the collection process, agents are divided into carrier agents and guiding agents.A carrier agent is assigned to a puck and moves along the path to its designated puck in order to carry the puck.Every agent on a path to a puck is called a guiding agent, because the guiding agents' task is to guide the carrier agents which bring the puck to the base.
Guiding agents are utilized for agent maneuvers, as our foraging strategy does not depend on global localization.A carrier agent can reach a puck by iteratively visiting guiding agents along the path to the puck.Note that local interaction between agents is relied on to ensure that the carrier agents move along the path.In this way, a carrier agent can carry its assigned puck to the base by iteratively visiting guiding agents.In summary, every agent on a path to a puck is used as a guiding agent to guide the carrier agents in reaching the pucks and bringing them to the base.

All Agents Except for the Guiding Agents Rendezvous at the Base
When the 3D workspace has been entirely sensed utilizing Algorithm 2, every puck is sensed by at least one agent.Under Algorithm 2, every puck in the 3D workspace is detected by an agent in AgentsWithPucks.
A path can now be generated from the base to every agent in AgentsWithPucks.Every agent on the path to an agent in AgentsWithPucks is utilized as a waypoint for guiding agents in moving between the base and the pucks.
Let path(n 1 , n) ∈ T define a path from n 1 to n.Every agent on path(n 1 , n p ) for all n p ∈ AgentsWithPucks is called a guiding agent.Every agent except for the guiding agents is called a carrier agent, and has the task of carrying a puck to the base.
We first make all agents except for guiding agents rendezvous at the base, as they now need to work as carrier agents.Algorithm 4 is used to make all agents except for guiding agents rendezvous at the base.
Algorithm 4 was inspired by the distributed rendezvous control presented in [43].The distinction between our article and [43] is that here we need to make all agents except for guiding agents rendezvous at the base.The guiding agents need to stay at their position in order to guide the carrier agents in moving between the base and the pucks.Algorithm 4 presents the gathering algorithm used to make all agents except for the guiding agents rendezvous at the base.Algorithm 4 Distributed gathering strategy for all agents except for guiding agents 1: Let n 1 denote an agent located at the base; 2: Apply Algorithm 1 in Section 5.1.1 for generating a tree T rooted at n 1 ; 3: repeat 4: n ← every agent, other than guiding agents; 5: if n is a leaf in T then 6: The agent n moves along a path to n 1 using ancestor(n) (n keeps visiting its ancestors using T); 7: if n encounters all its descendants except for guiding agents then 9: The agent n moves along a path to n 1 using ancestor(n) (n keeps visiting its ancestors using T); end if 12: until every agent, other than guiding agents, visits n 1 ; Assume that an agent, say n, is not a guiding agent.Suppose that n has a guiding agent, say n g , as its ancestor in T. In this case, n can visit agents along the path to the base, which contains n g .This implies that n utilizes n g as a "waypoint" along the path to the base.
Under Algorithm 4, an agent waits until it has met all its descendants except for guiding agents.Because n g is a guiding agent, n g must not move at all under Algorithm 4. Thus, p(n g ) removes n g from its descendants list; p(n g ) starts moving after all of its descendants other than n g have met p(n g ).In this way, all agents except for guiding agents rendezvous at the base.When these agents have gathered at the base, they are used as carrier agents for carrying the pucks to the base.
To implement Algorithm 4, each agent stores its parent in T, its descendant list, and its guiding agents.The following theorem shows that Algorithm 4 is distributed and that every agent is connected to n 1 while it moves.Moreover, collision avoidance is assured while every agent is moving.Theorem 3. Algorithm 4 is distributed, and every agent is connected to the root n 1 while it moves.Moreover, collision avoidance is assured while every agent is moving.
Proof.Suppose that an agent n has been visiting agents along the path to the root n 1 in Algorithm 4. For convenience, let PATH indicate this path.Suppose that PATH consists of a set of agents p 1 → p 2 → p 3 • • • → p end in this order.Here, p end is n 1 .
According to the definition of an edge E(I), PATH is collision-free for n.Furthermore, the length of every line segment of PATH is shorter than sense-communication range r cs .We can show that p i , where i ∈ {1, 2, . . ., end − 1}, starts moving only after n meets p i .Any agent other than a leaf starts moving only after all of its descendants except for guiding agents in T have met it.Any agent in PATH is an ancestor of n.Therefore, p i starts moving only after n has met p i .
If n has just met p i , then n can sense p i+1 utilizing local sensors.Because n moves based on local sensing measurements, Algorithm 4 is distributed.
Next, we show that every agent remains connected to the root during its maneuver.Suppose that n has just encountered p i and starts moving towards p i+1 .Then, n is connected to p i+1 .All agents in p i+1 → p i+2 → p i+3 • • • → p end = n 1 remain stationary.Therefore, p i+1 is connected to n 1 .Because n is connected to p i+1 , n is connected to n 1 .Thus, it is proved that every agent is connected to n 1 during its movement.

Puck Collection Using Carrier Agents
Let n p define an agent in AgentsWithPucks.Then, path(n 1 , n p ) defines a path from n 1 to n p .Each carrier agent at the base is assigned to a puck and moves along the path to its designated puck in order to carry the puck.For instance, if there are C carrier agents in total then we can assign C AgentsWithPucks carrier agents to each puck, ensuring that the puck are assigned an identical number of carrier agents.
Every carrier agent utilizes guiding agents as "static waypoints" along the path between the puck and the base.Guiding agents are utilized because our foraging strategy does not depend on global localization.Note that local interaction between agents is used to make the carrier agents move along the path.The local control in Section 5.3 can be applied to make a carrier agent move along the path to its designated puck.When a carrier agent reaches its assigned puck, the carrier agent carries its assigned puck to the base by iteratively visiting its guiding agents.In this way, each carrier agent transports a puck to the base.
Multiple carrier agents can bring the pucks back to the base simultaneously.While carrier agents are moving, they need to avoid colliding with each other.For local collision avoidance, we can apply reactive collision avoidance controls in [44][45][46][47].Because our paper handles high-level controls of multi-robot systems, developing local collision avoidance controls is not within the scope of this paper.
When all pucks are carried to the base, we need to make all guiding agents rendezvous at the base.Similarly to Algorithm 4, Algorithm 5 can be used to ensure that all guiding agents rendezvous at the base while maintaining network connectivity.
The sense-communication range was r cs = 80 m and the maximum speed MaxS was 5 m/s.The base was located at (30, 30, 0) in meters.
Figure 2 describes the agents' positions after utilizing Algorithm 2 to deploy agents for detecting every puck in the 3D workspace.The spheres represent 3D obstacles in the cluttered bounded workspace.In all, 75 agents begin moving from the base; the 3D position of the agents is described with a small asterisk.In Figure 2, the path of each agent starting from the base is described by line segments with distinct colors.
Figure 3 describes the complete sensor network constructed utilizing Algorithm 2. In Figure 3, the deployed agents are marked with black asterisks.The base is marked with a circle.All agents construct the complete 3D network without coverage holes.This implies that every puck in the 3D workspace has been detected by at least one agent.As a quantitative analysis, Figure 4 presents the path length of every agent under Algorithm 2. The x-axis presents the agent index and the y-axis presents the path length of the agent until it meets the associated target point.In all, 75 agents begin moving from the base.In Algorithm 2, every agent initiates its maneuver in the following order:

Verification of Algorithm 4 (Distributed Gathering Process)
When the 3D workspace is entirely sensed utilizing Algorithm 2, every puck has been sensed by at least one agent.Suppose that all agents in AgentsWithPucks have detected all pucks in the 3D workspace and that AgentsWithPucks is composed of the following agents (n 5 , n 10 , n 15 , n 19 , n 20 ).
Algorithm 4 describes how to make all agents except for guiding agents rendezvous at the base in a distributed manner.The MATLAB simulation result of Algorithm 4 is plotted in Figure 5.In Figure 5, the paths taken by the agent other than guiding agents to gather at the base are marked by circles with distinct colors.It takes only 7 s to run Algorithm 4 using the MATLAB simulation.Therefore, Algorithm 4 is suitable for real-time applications.

Verification of the Puck Collection Process
Section 5.2 has addressed the process of collecting all of the pucks in the 3D workspace.We used MATLAB simulations to verify the puck collection process.Suppose that AgentsWithPucks is composed of agents (n 5 , n 10 , n 15 , n 19 , n 20 ).
Considering this scenario, Figures 3 and 6 describe the guiding agents after the complete 3D network is built.In this figure, a puck is marked with a red diamond.The base is marked with a green circle.The path from the base to the agent in AgentsWithPucks is described by blue line segments.The guiding agents are described by small circles along the blue line segments.Using these paths, the carrier agent can carry the puck to the base without relying on GPS.Each carrier agent is assigned to a puck and moves along the path to its designated puck in order to carry the puck.The local control in Section 5.3 can be utilized to make a carrier agent move along the path to its designated puck.
When all pucks have been carried to the base, all guiding agents then need to rendezvous at the base.Algorithm 5 ensures that all guiding agents rendezvous at the base while maintaining network connectivity.

Effect of Changing R Cs
Up to now, we have used a sense-communication range of r cs = 80 m.For comparison, we next simulated the case where r cs = 120 m. Figure 7 describes the sensor network constructed utilizing Algorithm 2. The path of each agent starting from the base is described by line segments with distinct colors.The agents are more sparsely deployed compared to Figure 2, as now r cs = 120 m. Figure 8 describes the complete sensor network constructed utilizing Algorithm 2; 29 agents begin moving from the base, and the 3D positions of the agents are described by black asterisks.As a quantitative analysis, Figure 9 presents the path length of every agent under Algorithm 2. In all, 29 agents begin moving from the base.It takes only 21 s to run Algorithm 2 using MATLAB simulations.Thus, Algorithm 2 is suitable for real-time applications.
Considering the scenario in Figure 8, the MATLAB simulation results of Algorithm 4 are plotted in Figure 10.In Figure 10, the paths taken by the agents other than guiding agents to gather at the base are marked by circles with distinct colors.Considering the scenario in Figures 8 and 11, this figure describes the positions of the guiding agents after the complete 3D network is built.In Figure 11, a puck is marked with a red diamond.The path from the base to an agent in AgentsWithPucks is depicted with blue line segments.The guiding agents are plotted by small circles along the blue line segments.Using these paths, carrier agents can carry pucks to the base without relying on GPS.

Effect of Changing Obstacle Environments
For comparison, we next used sparse obstacle environments for the case where r cs = 120 m. Figure 12 describes the sensor network constructed utilizing Algorithm 2. The path of each agent starting from the base is described by line segments with distinct colors.Figure 13 describes the complete sensor network constructed utilizing Algorithm 2. In all, 30 agents begin moving from the base; the 3D position of the agents are described by a black asterisks.As a quantitative analysis, Figure 14 presents the path length of every agent under Algorithm 2. In all, 30 agents begin moving from the base.It takes only 27 s to run Algorithm 2 using MATLAB simulations.Therefore, Algorithm 2 is suitable for real-time applications.Considering the scenario in Figure 13, the MATLAB simulation results of Algorithm 4 are plotted in Figure 15.Considering the scenario in Figure 13, Figure 16 describes the positions of the guiding agents after the complete 3D network is built.In Figure 16 , a puck is marked by a red diamond.The path from the base to an agent in AgentsWithPucks is depicted by blue line segments.The guiding agents are plotted by small circles along the blue line segments.Using these paths, carrier agents can carry pucks to the base without relying on GPS.

Conclusions
In this article, we have proposed a 3D multi-agent foraging strategy composed of puck search and collection.The proposed 3D multi-agent foraging strategy is summarized as follows.In the search process, agents move one by one to expand the network until the 3D cluttered workspace is fully covered.When the bounded workspace is entirely covered by deployed agents, every puck is detected by an agent's local sensors.Next, we generate a path from the base to every puck.All agents along a path to a puck are set as guiding agents.Algorithm 4 then runs to let all agents except for guiding agents rendezvous at the base.Thereafter, every carrier agent at the base is assigned to a puck and travels along the path to its designated puck in order to collect the puck.When a carrier agent reaches its assigned puck, the carrier agent can carry its assigned puck to the base by iteratively visiting guiding agents.When all pucks have been carried to the base, Algorithm 5 runs to make all agents rendezvous at the base while maintaining network connectivity.
In our paper, agents are deployed such that the sensing spheres (spheres with radius r cs centered at an agent) of all agents cover the entire workspace.In this article, we prove that every puck in the 3D cluttered bounded workspace is detected in finite time.To the best of our knowledge, this article is novel in letting multiple agents perform foraging and puck gathering while satisfying network connectivity requirements in a cluttered unknown 3D workspace.In our future work, we will perform experiments utilizing real robots in order to more rigorously prove the proposed 3D foraging strategy.
Notably, each carrier agent is assigned to a puck and moves along the path to its designated puck in order to carry the puck.In practice, each puck may have distinct weights and distinct sizes.The maximum weight that can be carried by a carrier agent is limited.In addition, the path length from the base to each puck may be different.Considering these various aspects, it is possible to optimize the assignment of each carrier agent such that carrier agents can carry all of the pucks to the base within a minimum time interval.In the future, we intend to solve this optimal assignment problem.

Figure 2 .
Figure 2.This figure describes the sensor network constructed utilizing Algorithm 2. The path of each agent starting from the base is described by line segments with distinct colors.

Figure 3 .
Figure 3.This figure describes the complete sensor network constructed utilizing Algorithm 2. Deployed agents are marked with black asterisks.The base is marked with a circle.

Figure 4 .
Figure 4.This figure describes the path length of every agent under Algorithm 2. The x-axis presents the agent index and the y-axis presents the path length of the agent until it meets the associated target point.

Figure 5 .
Figure 5. Considering the scenario in Figure 3, the MATLAB simulation result of Algorithm 4 is plotted here.The paths taken by agents, except for guiding agents, to gather at the base are marked by circles with distinct colors.

Figure 6 .
Figure 6.Considering the scenario in Figure 3, this figure describes the positions of the guiding agents after the complete 3D network is built.The base is marked with a green circle.A puck is marked with a red diamond.The path from the base to an agent in AgentsWithPucks is depicted by blue line segments.The guiding agents are plotted by small circles along the blue line segments.

Figure 7 .
Figure 7. Considering the case where r cs = 120 m, this figure describes the sensor network constructed utilizing Algorithm 2. The path of each agent starting from the base is described by line segments with distinct colors.

Figure 8 .
Figure 8. Considering the case where r cs = 120 m, this figure describes the complete sensor network constructed utilizing Algorithm 2. Deployed agents are marked by black asterisks.The base is marked by a circle.

Figure 9 .
Figure 9. Considering the case where r cs = 120 m, this figure describes the path length of every agent under Algorithm 2. The x-axis presents the agent index and the y-axis presents the path length of the agent until it meets the associated target point.

Figure 10 .
Figure 10.Considering the scenario in Figure 8, this figure plots the MATLAB simulation results of Algorithm 4 for the case where r cs = 120 m.The path taken by the agents other than guiding agents to gather at the base are marked by circles with distinct colors.

Figure 11 .
Figure 11.Considering the scenario in Figure 8, this figure describes the positions of the guiding agents after the complete 3D network is built for the case where r cs = 120 m.A puck is marked by a red diamond.The base is marked by a green circle.The path from the base to an agent in AgentsWithPucks is depicted by blue line segments.The guiding agents are plotted by small circles along the blue line segments.

Figure 12 .
Figure 12.This figure describes the sensor network constructed utilizing Algorithm 2 for a sparse obstacle environment in the case where r cs = 120 m.The paths of each agent starting from the base are described by line segments with distinct colors.

Figure 13 .
Figure 13.This figure describes the complete sensor network constructed utilizing Algorithm 2 for a sparse obstacle environment in the case where r cs = 120 m.Deployed agents are marked by black asterisks.The base is marked by a circle.

Figure 14 .
Figure 14.Considering the sparse obstacle environments while setting r cs = 120 m, this figure describes the path length of every agent under Algorithm 2. The x-axis presents the agent index and the y-axis presents the path length of the agent until it meets the associated target point.

Figure 15 .
Figure 15.Considering the scenario in Figure 13, this figure plots the MATLAB simulation results of Algorithm 4. The paths taken by agents other than guiding agents to gather at the base are marked by circles with distinct colors.

Figure 16 .
Figure 16.Considering the scenario in Figure 13, this figure describes the positions of guiding agents after the complete 3D network is built.A puck is marked by a red diamond.The base is marked by a green circle.The path from the base to an agent in AgentsWithPucks is depicted by blue line segments.The guiding agents are plotted by small circles along the blue line segments.
takes 173 s to run Algorithm 2 using the MATLAB simulations; hence, Algorithm 2 is suitable for real-time applications.