# Dynamic Response Threshold Model for Self-Organized Task Allocation in a Swarm of Foraging Robots
## 1 Introduction  
Nature is full of examples of social insects that cooperate efficiently to complete complex tasks. A typical example is the foraging carried out by ant colonies, in which the ants search for food in their environment and transport it to their nest [1]. Inspired by such foraging behavior, various studies have used simple robots to complete complex foraging tasks [2]. In such tasks, the robots search for certain objects (known as food tokens) that are scattered in the foraging arena [3]. Once a food token is found, the robot captures it and delivers it to a specific area designated as the nest [4]. Swarm foraging can be treated as a comprehensive process of searching, collecting, and transferring. In the future, it could be used to clean up toxic waste, collect samples in unknown regions [5], clear land mines, and in logistics and warehousing [6]. Task allocation (TA) can be observed in social insects such as ants [7]. In an ant colony, when there are fewer food tokens (stimuli) than a certain threshold \(\theta\), many more ants go foraging; when there are more food tokens than this threshold, fewer ants go foraging [8]. Based on this, most studies of swarm foraging analyzed how the food tokens (swarm energy) change. Each food token contains a certain amount of energy that increases the swarm energy upon being collected by a robot. However, some swarm energy is lost to the movement of the active foraging robots and the interference among them (e.g., blocking thepaths of others or collisions that slow the robots down). The swarm's nest can also entail energy being lost at a certain rate (Crate). To maintain the swarm energy at the desired level, the control algorithm of each robot must decide when the robot should search for food tokens and when it should remain in the nest. In a swarm of foraging robots, task allocation (TA) refers to the ability to adjust the number of active foraging robots dynamically based on local decisions made by each robot. The most straightforward TA mechanism is the centralized control approach [9]: a centralized controller collects all task-related data, such as robot positions, sensor readings, and then allocates a specified task to each robot using an optimization method [10]. Generally speaking, this method can achieve better task allocation results for simple tasks in known environments, but there still exist some challenges for other situations. Firstly, the global information required for centralized control is not always available, especially for large and unstructured scenes [11]. Secondly, allocating specified tasks to each robot will reduce the efficiency of task allocation and even cause problems in the system when the centralized controller fails. Therefore, the decentralized control approach has received more and more attention, and most of the current research is based on distributed methods to achieve task allocation. In the decentralized control approach, numerous studies have used an activation-threshold model to implement TA in a swarm of foraging robots [12], whereby robots decide to go foraging when an external stimulus exceeds a threshold value [13]. Among them, the external stimulus could be related to the number of food tokens stored in the nest or the amount of time spent in each state by each robot. To maintain the nest energy at the desired level, [PERSON] and [PERSON] implemented a simple TA mechanism based on an activation threshold, where each robot is given a fixed threshold in advance [14]. When the nest energy is less than the threshold value, the robots begin to search for food tokens. [PERSON] et al. presented a simple adaptation mechanism to adjust the threshold values automatically according to internal, environmental, and social cues [15]. When the time spent in each state exceeds the corresponding threshold, the individual robot switches to the next state. Although such mechanisms generate efficient task allocation (TA), some drawbacks remain [16].