Efficient Algorithms for Boundary Defense with Heterogeneous Defenders
Abstract
This paper studies the problem of defending (1D and 2D) boundaries against a large number of continuous attacks with a heterogeneous group of defenders. The defender team has perfect information of the attack events within some time (finite or infinite) horizon, with the goal of intercepting as many attacks as possible. An attack is considered successfully intercepted if a defender is present at the boundary location when and where the attack happens. Through proposing a network-flow and integer programming-based method for computing optimal solutions, and an exhaustive defender pairing heuristic method for computing near-optimal solutions, We can significantly reduce the computation burden in solving the problem compared to the previous state of the art. Extensive simulation experiments confirm the effectiveness of the algorithms. Leveraging our efficient methods, we also characterize the solution structures, revealing the relationships between the attack interception rate and the various problem parameters, e.g., the heterogeneity of the defenders, attack rate, boundary topology, and the look-ahead horizon.
Introduction video: https://youtu.be/x0mQD_7RhKI.
I Introduction
Perimeter-defense problems model scenarios where the interior of a region must be defended against a set of incoming attacks. With a team of defenders (i.e., mobile robots and/or agents) located on the perimeter of a given region, an attack is considered successfully intercepted if at least one defender is present at the attack location when the attack happens. This problem finds broad applications, including the protection of endangered wildlife [2], aerial defense [3, 4], and border security [5, 6], to list a few.
The study of perimeter defense problems finds some of its origins in target guarding problems [7], a classical pursuit-evasion game studying the strategies of multiple defenders to guard a static region. In [8], the target-guarding problem was first specialized to produce perimeter defense in which the perimeter is the target to be guarded, and defenders can only move on the perimeter. Various methods have been developed, including region decomposition [8], assignment or matching-based algorithm [9], network flow formulation [10], and coverage control-based method [11].
Perimeter-defense problems may also be considered a variant of the reach-avoid game between two parties, where one party tries to send as many attackers to a region the other party must defend [7]. Studies of the reach-avoid game usually apply specific case analysis, which suffers from the exponential increase in time complexity and size of state space as the number of attackers increase [12, 13, 14]. Recent work leans toward adopting maximum matching or assignment frameworks from graph theory to address this problem for multiple defenders [15, 16, 17].
In this work, we study perimeter-defense problems under a perfect information assumption that the attackers’ attack time and locations on the perimeter are known as soon as attackers appear. The assumption is adopted in several recent related research including [1, 11]. The particular emphasis of our work is on the more challenging case of heterogeneous defenders, where the defenders have different speeds in responding to incoming attacks. We denote the problem as boundary-defense with heterogeneous defenders or BDHD.111We use boundary instead of perimeter since perimeter generally refers to the 1D boundary of a 2D geometry shape. 2D hemisphere has been examined in [4] for constraining defender. The heterogeneous setting for perimeters is first carefully investigated in [1], which carried out the detailed structural study and introduced an algorithm based on dynamic programming (DP) [18] for handling infinite horizon attacking sequences, focusing mostly on two defenders.

The main contribution of our work lies with the development of efficient computational tools for and an empirical structural study of BDHD. More specifically,
-
•
We developed a network-flow formulation of BDHD, leading to an exact method, based on integer linear programming (ILP), for solving the problem. The IP-based method is much more scalable than the DP-based method (which is only effective for no more than three defenders).
-
•
Using the DP solution as a sub-routine, we developed a highly scalable heuristics method, called exhaustive defender pairing (EDP), that runs in low polynomial time. EDP is demonstrated to compute high-quality (in fact, often optimal or near-optimal) solutions. The design philosophy of EDP is of independent algorithmic interest.
-
•
We further generalize our algorithms to apply to finite-horizon BDHD (more challenging than infinite-horizon BDHD), where only attacks whose attack time is within some time of hitting the boundary are revealed.
-
•
Utilizing the scalable algorithms developed in this work, we performed a thorough empirical study of the solution characteristics of BDHD under various possible problem settings, including (1) different attack densities, (2) different defender speed distributions, and (3) different domain topology, i.e., (circle), (unit interval), (sphere), and (unit square).
The rest of the paper is organized as follows. In Sec. II, we formulate the problems studied in this paper and introduce the notations used. In Sec. III, we describe the previous dynamic programming method in [1], and our ILP-based algorithms and EDP. We discuss the performance of our algorithms and solution characteristics of BDHD under different settings in Sec. IV, and conclude with Sec. V.
II Preliminaries
In boundary defense with heterogeneous defenders (BDHD), there are defenders (which may be robots and/or other types of agents) with speeds , where each defender is modeled as a point in some domain or . The defenders live on a lower dimensional subspace of (i.e., some boundary of a subset of ). There are also attack events , where each attack event is a pair in which is the location of the attack and is the time it happens. The attack is intercepted by a defender only if the defender is located at at time . For initialization, we denote the initial locations of the defenders at as .
Following the definition in [1], we define the horizon of the defenders as follows,
Definition II.1 (Horizon).
The (look ahead) horizon of the defenders is defined as the amount of time defenders can peek into the attack sequence in the future. That is, given the current time , and a horizon , defenders have access to complete information on attacks happening on or before .
Now, we provide formulations of the two versions of the BDHD problem studied in this paper. In the infinite horizon setting, , all attack events are given in a single batch.
Problem II.1 (Infinite-horizon BDHD).
Given defenders with speed and initial locations , and attack events , intercept as many attacks as possible.
In a finite-horizon setting, the attack events are not all revealed at but are given as a stream of attacks . The defenders can only know the attack events within a horizon or time window of in the future.
Problem II.2 (Finite-horizon BDHD).
There are defenders with speed and initial locations , and a stream of attack events. At each time instance , the defenders only know attack events happening no later than time in the future (i.e. ). Intercept as many attacks as possible.
We introduce here two useful notations: and . They are defined as
(1) | |||
(2) |
where denotes the distance between location and . In other words, is the set of attack events that can be reached from the location of the attack event by defender . And is the set of attack events from whose location defender can reach the attack event. Additionally, denotes the set of attack events that can be reached by defender from its initial location. Similarly, contains if defender can reach the location of attack from its initial location. Fig. 2 gives an example for defender .
III Algorithmic Solutions for BDHD
In this section, we describe three methods for solving infinite-horizon BDHD (Problem II.1). Sec. III-A provide a dynamic programming (DP) algorithm based on one developed in [1], followed by Sec. III-B formulating an integer linear programming model, and Sec. III-C discusses a heuristic search algorithm based on the DP algorithm. The extension to an infinite attack stream with a finite look-ahead horizon (Problem II.2) will be discussed in Sec. III-D.
III-A Exact Dynamic Programming Based Method
The DP algorithm builds a recursion formula on the last attacks intercepted by the defenders. Without loss of generality, we assume that each attack is only intercepted by one defender. For a DP state where is the last attack defender intercepts, let store the maximum number of attacks that can be intercepted when the defender’s last intercepted attack events is , and denote as the maximum of . Base on which attack the defender intercepts before intercepting attack , we can write the DP recursion formula as follows.
(3) |
Pseudo-code in Alg. 1 provides a sketch of a possible implementation of the dynamic programming algorithm. Effectively implemented, the time complexity of running Alg. 1 is , which is polynomial when , the number of defenders, is fixed.
The algorithm presented here is a slight modification of the DP algorithm in [1] with two subtle differences. First, we enforce that an attack event can only be handled by one defender. Second, we explicitly use the initial locations of the defenders in the algorithm, which is essential for handling the finite horizon extension.
III-B Solving BDHD with Integer Linear Programming Model based on a Flow Formulation
It is not difficult to see that BDHD can also be seen as a network flow problem by treating each attack event as a node and the reachability between each pair of attack events for each defender as the edges in the graph.
Specifically, there are nodes in the graph, representing the attack events. There are also connections between nodes inside the graph. If defender can reach attack event from , there is an connection between node and . Also, we use a binary variable to denote whether attack event is successfully intercepted. These give rise to the following integer linear programming (ILP) formulation of the problem.
Eq. (4) sets the criteria of an attack being intercepted as at least one defender to come into the node , which means intercept attack . Eq. (5) sets the defender flow conservation rule that the number of type defender exiting node must be larger than or equal to the number of type defender coming to node . Eq. (6) sets the initial constraints on the number of each type of defender used (coming out from node 0).
(4) | |||
(5) | |||
(6) | |||
(7) |
Denote as the number of connections in the graph, clearly . This integer linear programming formulation uses variables, and constraints.
Remark.
The flow formulation of the problem is an NP-hard problem. The proof is similar to the NP-completeness proof of the two-commodity flow in [19]. This seems to suggest that BDHD is NP-hard as well.
III-C Exhaustive Defenders Pairing Heuristic Search Method
We now develop a heuristic search method using the dynamic programming algorithm discussed in Alg. 1 applied on two defenders. The DP algorithm that computes the optimal solution for two defenders is used as a local improvement primitive for the local search heuristic algorithm.
We call the resulting algorithm exhaustive defender pairing (EDP). In each iteration, EDP pick two defenders, and the attack events the two defenders have intercepted and the attack events that have not been intercepted by any defender. Then, EDP uses the DP algorithm in Alg. 1 to increase the number of attack events intercepted by the two defenders selected. The complete algorithm is sketched in Alg. 2.
III-D Handling Infinite Attack Streams with a Finite Look-Ahead Horizon
For Problem II.2 where the attacks may be infinite, and the look-ahead horizon is finite, not all attacks are revealed at once. As such, previous methods cannot be directly applied. As the future attack sequence cannot be foreseen, defenders need to react to information (e.g., the attack events in the next time interval) obtained so far.
Towards addressing the problem, a greedy replanning approach can be applied. Whenever an attack event is observed, the defender team replans the capture sequence given the new attacks added to the attack queue. This gives rise to an online algorithm sketched in Alg. 3.
IV Evaluation and Empirical Study of BDHD
In this section, we describe our experimental study of the methods mentioned or proposed in the paper, which serves two purposes: (1) demonstrating the performance of our fast computational methods, and (2) characterizing the solution structure of BDHD under different problem settings.
The algorithms are implemented in C++ and run on a 3.6GHz quad-core CPU with 16G memory. For integer linear programming, Gurobi [20] is used as the solver with a time limit of 60 seconds applied. In the evaluation, two main factors are considered: computation time and solution quality measured by interception rate.
The instances were generated for up to dozens of defenders, and the defender speeds are sampled uniformly at random from to . The attack sequence was generated according to a Poisson process with parameter (i.e., the time gap between two consecutive attacks conforms with an exponential distribution ), and the locations of the attack are sampled uniformly at random from the boundary. We use 4 types of boundary for testing a) unit circle , b) unit interval c) unit square , and d) unit sphere .
IV-A Infinite-Horizon BDHD: Basic Performance Evaluation
This section provides experimental study and comparisons between the three methods described in the paper: dynamic programming (DP), integer linear programming (ILP), and exhaustive defender pairing (EDP) algorithms.
To test and compare the general performance of these methods, we set the defending task on (i.e., a circular boundary with a distance of ) with the attack sequence’s coming rate (used in the Poisson process) proportional to , the number of defenders. The results on computational time and interception rate are given in Figs. 3 and 4.


For 2 to 7 defenders, in Fig. 3, we show the computation time of running the algorithms. Each data point is an average of 20 runs. We remind the readers that both DP and ILP guarantee to produce an optimal solution (if they can finish). For the two-defender scenario, which is the main focus of [1], DP is the most efficient. However, DP only fully scales for defenders, and start to peter out for defenders due to memory limit (so its running time is not shown for ). As can be observed, ILP demonstrates much better scalability in comparison to DP, but fails to find a solution for defenders.
As expected, exhaustive defender pairing (EDP) has the least time cost for . Fig. 4 shows the corresponding solution qualities of these methods. We observe that, while EDP does not guarantee solution optimality, it generated solutions that are virtually the same as the exact methods (DP and ILP). Through these empirical evaluations, EDP demonstrates superior scalability with negligible solution optimality loss.
IV-B Scaling up the Number of Defenders
The number of defenders appears in the index term of the time complexity of the DP algorithm, which limits it from scaling up the number of defenders. Hence, we compare the performance of ILP and the local search algorithm when pushing the number of defenders up to dozens. With the main goal being the evaluation of optimality, we limit the attack events to so that the ILP method can return the optimal solution in seconds. At the same time, to make the problem more challenging, is increased to from so that not all attacks can be intercepted. Fig. 5 and Fig. 6 show the corresponding computation time and interception rate, each data point is the average of 20 runs.


As can be observed, EDP, due to its quadratic dependence on the number of defenders, consistently and significantly outperforms the ILP method in terms of computation time. At the same time, it yields virtually the same level of optimality as ILP, which guarantees that the result is optimal.
IV-C Impact of Defender Heterogeneity
To explore the impact of the diversity of defender speeds on interception rate, we focus on a -defender setting and to make the difference more visible, is set to be so that the interception rate no more than 80%. Here, the defender speed diversity is tested by setting the as 1, and from 1 (uniform speed) to 10, and then normalizing the defender speed to make them sum up to (i.e., with an average of ). Each data point is based on 100 runs. The result is summarized in Fig. 7, from which we can observe that uniform speed has the least interception rate, while the interception rate gets into its maximum after or . This suggests that heterogeneity can significantly enhance the interception rate, warrant the effort going into the current study (and previous study of heterogeneous defender setups). At the same time, as heterogeneity continues to increase, the effect becomes negligible. This also follows intuition: when the capability of the defenders varies too much, they can no longer effectively collaboratively intercept attacks.

IV-D Impact of Attack Rate
With the increase of in the Poisson process for the attack sequence, there will be fewer attacks intercepted, and more defenders will be required to reach the same interception rate. In this regard, we test the interception rate computed using EDP for to defenders and different from to . The number of attacks is set to be , and each data point represents an average of 20 runs. Fig. 8 shows the resulting capture rate with respect to the attack rate as a heat map for a different number of defenders , which, unsurprisingly, suggests a gradual change as one might expect. Nevertheless, such a graph can serve as a quick reference for selecting an appropriate number defenders given an expected attack rate.

IV-E Impact of Boundary Topology
EDP applies to BDHD with arbitrary boundary topology; we evaluated EDP on (unit interval), (circle with a total circumference shrinked to ), (unit square), and (sphere with surface area of ) (see Fig. 9) with , and from 1 to 200. The results are shown in Fig. 10, where each data point is the average of 20 runs. We observe that and have similar difficulty to defend, with being a bit more challenging due to having boundaries. The same is observed for and .


IV-F Infinite Attack Stream with Finite Look-Ahead Horizon
Alg. 3 describes an online EDP algorithm for handling the finite horizon version of the problem where the defenders only have the information about attacks in the next time frame. Here, we present some simulation studies using the 5-defender and 400 attacks setup on an boundary with . Fig. 11 gives the interception rate with respect to varying defender horizons. Each data point is an average of 20 runs. The interception rate converges to around with a fairly short horizon, indicating that a long look-ahead horizon may not be necessary for effectively intercepting attacks.

Lastly, in Fig. 12, we provide the interception trajectories of a typical run for ILP, EDP, and online EDP.



V Conclusion
This paper studied the heterogeneous perimeter defense problem, as formulated in [1], with the aim of significantly boosting the scalability to work on many defenders while achieving high levels of solution optimality. Toward achieving this goal, we developed an exact integer programming-based algorithm with better scalability than the original dynamic programming (DP) based algorithm from [1]. We then further developed a fast and highly-effective heuristic based on the pairwise application of DP for computing near-optimal solutions, scaling to dozens of defenders. This pairwise application of DP is of independent algorithmic interest. In addition, we extend our solution to a more realistic online version in which only attackers within a finite time window are visible. The algorithms are thoroughly evaluated on a diverse set of boundary topologies including circles, intervals, spheres, and squares. The evaluation not only confirms that EDP is highly effective but clearly demonstrates the benefit of employing heterogeneous defenders.
References
- [1] A. Adler, O. Mickelin, R. K. Ramachandran, G. S. Sukhatme, and S. Karaman, “The role of heterogeneity in autonomous perimeter defense problems,” arXiv preprint arXiv:2202.10433, 2022.
- [2] R. N. Haksar, S. Trimpe, and M. Schwager, “Spatial scheduling of informative meetings for multi-agent persistent coverage,” IEEE Robotics and Automation Letters, vol. 5, no. 2, pp. 3027–3034, 2020.
- [3] G. Lykou, D. Moustakas, and D. Gritzalis, “Defending airports from uas: A survey on cyber-attacks and counter-drone sensing technologies,” Sensors, vol. 20, no. 12, p. 3537, 2020.
- [4] E. S. Lee, D. Shishika, and V. Kumar, “Perimeter-defense game between aerial defender and ground intruder,” in 2020 59th IEEE Conference on Decision and Control (CDC). IEEE, 2020, pp. 1530–1536.
- [5] N. Agmon, S. Kraus, and G. A. Kaminka, “Multi-robot perimeter patrol in adversarial settings,” in 2008 IEEE International Conference on Robotics and Automation. IEEE, 2008, pp. 2339–2345.
- [6] S. W. Feng and J. Yu, “Optimally guarding perimeters and regions with mobile range sensors,” in Robotics: Science and Systems, 2020.
- [7] R. Isaacs, Differential games: a mathematical theory with applications to warfare and pursuit, control and optimization. Courier Corporation, 1965.
- [8] D. Shishika and V. Kumar, “Local-game decomposition for multiplayer perimeter-defense problem,” in 2018 IEEE conference on decision and control (CDC). IEEE, 2018, pp. 2093–2100.
- [9] D. Shishika, J. Paulos, and V. Kumar, “Cooperative team strategies for multi-player perimeter-defense games,” IEEE Robotics and Automation Letters, vol. 5, no. 2, pp. 2738–2745, 2020.
- [10] A. K. Chen, D. G. Macharet, D. Shishika, G. J. Pappas, and V. Kumar, “Optimal multi-robot perimeter defense using flow networks,” in International Symposium Distributed Autonomous Robotic Systems. Springer, 2021, pp. 282–293.
- [11] D. G. Macharet, A. K. Chen, D. Shishika, G. J. Pappas, and V. Kumar, “Adaptive partitioning for coordinated multi-agent perimeter defense,” in 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2020, pp. 7971–7977.
- [12] K. Margellos and J. Lygeros, “Hamilton–jacobi formulation for reach–avoid differential games,” IEEE Transactions on automatic control, vol. 56, no. 8, pp. 1849–1861, 2011.
- [13] Z. Zhou, R. Takei, H. Huang, and C. J. Tomlin, “A general, open-loop formulation for reach-avoid games,” in 2012 IEEE 51st IEEE conference on decision and control (CDC). IEEE, 2012, pp. 6501–6506.
- [14] R. Yan, Z. Shi, and Y. Zhong, “Reach-avoid games with two defenders and one attacker: An analytical approach,” IEEE transactions on cybernetics, vol. 49, no. 3, pp. 1035–1046, 2018.
- [15] M. Chen, Z. Zhou, and C. J. Tomlin, “A path defense approach to the multiplayer reach-avoid game,” in 53rd IEEE conference on decision and control. IEEE, 2014, pp. 2420–2426.
- [16] ——, “Multiplayer reach-avoid games via low dimensional solutions and maximum matching,” in 2014 American control conference. IEEE, 2014, pp. 1444–1449.
- [17] R. Yan, X. Duan, Z. Shi, Y. Zhong, and F. Bullo, “Matching-based capture strategies for 3d heterogeneous multiplayer reach-avoid differential games,” arXiv preprint arXiv:1909.11881, 2019.
- [18] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to algorithms. MIT press, 2022, ch. 14.
- [19] S. Even, A. Itai, and A. Shamir, “On the complexity of time table and multi-commodity flow problems,” in 16th annual symposium on foundations of computer science (sfcs 1975). IEEE, 1975, pp. 184–193.
- [20] G. Optimization, “Gurobi optimizer 9.0,” Gurobi: http://www.gurobi.com, 2019.