3.2.1. Problem Description
Let’s consider the warehouse that stores grain. The stacks of grain often change place due to normal warehouse operation. The warehouse is infested with rats. We introduce a swarm of empathetic guarding robots that collaborate in order to detect rats and find their nests. The robots operate without a central control system but can communicate between themselves. They patrol the dynamic environment. When a rat is spotted, the robot broadcasts a signal about a spotted target, its own chance of success in chasing it and other information, like battery level. Robots that received that signal calculate whether it is better to continue the current action (e.g. patrolling another part of the warehouse, going to the charging station) or to approach the broadcasting robot and help it in chasing the rat. The described environment is an enclosed space with a static obstacle in the form of grain, defined walls, and mobile hostile objects (rats). The robot’s task is to detect and follow the rat, engaging in group encirclement. The rat’s goal is to reach the grain. Different views on virtual experimentation environment are given in
Figure 2.
The analysis of robot behavior regarding the influence of artificial empathy was conducted only on chasing robots, as they had the most possible actions to perform and could process the most information among all the robots. In physical experiments, rats were also represented by robots, but they were not equipped with empathetic modules.
Patrolling robots could perform their task individually or through communication with other robots. Each robot could signal its own state through an LED strip, displaying information such as the robot class or the currently performed action. This included:
Call for help
Encircling the rat
Helping
Another robot nearby
Rat nearby
In contrast to the control group, where robots were not equipped with empathetic modules, experiments on empathetic robots indicate that robots have much more information to process before taking specific actions. Similar to the control group, the rat is searched for in the camera image. The empathetic model difference lies in the fact that each patrolling robot additionally signals information about its state and surroundings on the LED strip. It also has the ability to analyze this information from other robots.
This enables robots to make decisions based not only on their own observations but also on those collected from the surrounding environment. Before taking any action, the robot calculates the reward for performing a specific action, i.e., how much it contributes to achieving the global goal. Rewards are calculated for both the currently performed action and the planned action. If the reward for the new action is greater than the currently performed action, the robot interrupts it and starts a new one. Using the artificial empathy module, robots could make decisions that were optimal for the entire group.
Performed experiments considered the following list of scenarios:
-
Detection of a rat in the warehouse – solitary pursuit
- −
Robot 1 patrols the warehouse
- −
Robot 1 notices a rat
- −
Robot 1 starts chasing the rat
- −
Robot 1 catches the rat, meaning it approaches the rat to a certain distance
-
Detection of a rat in the warehouse – pursuit handover
- −
Robot 1 patrols the warehouse
- −
Robot 1 notices a rat in the adjacent area
- −
Robot 1 lights up the appropriate color on the LED tower to inform Robot 2 that there is a rat in Robot 2’s area
- −
Robot 2, noticing the appropriate LED color, starts chasing the rat
- −
Robot 2 catches the rat, meaning it approaches the rat to a certain distance
-
Detection of a rat in the warehouse – collaboration
- −
Robot 1 patrols the warehouse
- −
Robot 1 notices a rat
- −
Robot 1 starts chasing the rat
- −
The rat goes beyond Robot 1’s patrol area
- −
Robot 1 lights up the appropriate color on the LED tower to inform Robot 2 that the rat entered its area
- −
Robot 2, noticing the appropriate LED color, continues chasing the rat
- −
Robot 2 catches the rat, meaning it approaches the rat to a certain distance
-
Change of grain color
- −
Robot 1 patrols the warehouse
- −
Robot 1 notices that the grain color is different than it should be
- −
Robot 1 records the event in a report
- −
Robot 1 continues patrolling
-
Change of grain color - uncertainty
- −
Robot 1 patrols the warehouse
- −
Robot 1 notices that the grain color is possibly different than it should be – uncertain information
- −
Robot 1 lights up the appropriate color on the LED tower
- −
Robot 2, noticing the appropriate LED color, expresses a willingness to help and approaches Robot 1
- −
Robot 2 from the adjacent area checks the grain color and confirms or denies Robot 1’s decision
- −
Robot 1 records the event in a report if confirmed by Robot 2
- −
Robot 2 from the adjacent area returns and continues patrolling
- −
Robot 1 also continues patrolling
-
Weak battery
- −
Robot 1 has a weak battery
- −
Robot 1 lights up the appropriate color on the LED tower, expressing a desire to recharge its battery
- −
Robot 2, noticing the appropriate LED color, agrees to let Robot 1 recharge the battery
- −
Robot 1 goes to recharge
- −
Robot 2 additionally takes over Robot 1’s area for patrolling
-
Exchange of patrol zones
- −
Robot 1 has passed through its patrol area several times without any events.
- −
Robot 1 lights up the appropriate color on the LED tower, expressing a desire to exchange the patrol area
- −
Robot 2, noticing the appropriate LED color, expresses a desire to exchange the patrol area
- −
Robot 1 and Robot 2 exchange patrol areas
3.2.2. Implementation
The simulations were performed in CoppeliaSim (V4.4.0). Up to ten robots, equipped with virtual cameras, LED communication and touch sensors were to detect and chase four rats in a synthetic warehouse environment. Robots broadcast state signals to other agents, which receive them via camera and decide whether to take egoistic or empathetic action.
The YOLOv2 real-time object detection system [
46] was used to detect objects in the camera images, and the VGG16 [
47] convolutional neural network to determine the status of other robots (sent via LED strip). All simulation scripts were implemented in Lua (internal CoppeliaSim scripting) and Python (external backend service).
All the fuzzy descriptions like "far" or "long" are modelled with linguistic variables and terms - the value of a parameter is actually the value of a membership function for each of the considered terms.
Vectors of parameters in
Table 1 and
Table 2 are used as initial knowledge. Each new state that arises is compared to those, and the similarity is calculated to decide if the new state has a chance of success, or not. Here we use the similarity measure:
3.2.3. Results
Robots cooperate in order to detect and chase the rats, and empathetic behaviours are visible. Due to the limitations of CoppeliaSim, mainly lack of repeatability and poor performance when using virtual cameras, simulations did not allow for a reliable comparison between egoistic and empathetic behaviour. These problems lead directly to the OPEP project. OPEP allows for the inclusion of such factors as acceleration, friction, light intensity and reflections, while maintaining high control over the environment and experiment course.
During the simulation, the time in which the robots achieve the global goal, i.e., detecting and catching all rats, was measured. For each case, empathic and non-empathic models, 10 experiments were conducted, measuring the time to achieve the global goal. An important aspect was that objects in the arena were randomly distributed each time to ensure diversity in the observed behaviors.
After conducting experiments on a swarm of 5 robots, it was decided to double the number of objects in the scene. This change introduced more opportunities for interactions between individual units, and the simulation could proceed differently. Additionally, the larger the group of patrolling robots, the more the positive impact of empathic behaviors could be observed, allowing for a focus on the analysis of behaviors between neighboring objects.
As in previous experiments, objects before each simulation were randomly distributed, and the simulation ended when the global goal was achieved, i.e., when all rats were detected and surrounded.
In this way, a total of 40 experiments were conducted in 4 variants. This material was further analyzed, with a primary focus on the analysis of models’ behaviors using artificial empathy and those without it. In many cases, the empathic model recorded lower times to achieve the global goal. However, the differences are small, with the effectiveness of empathy being most visible in larger groups. In such situations, the true power of unit cooperation, forming the entire swarm, can be observed.
An interesting phenomenon was the significant differences in times between individual simulations. The shortest simulation time for 5 patrolling robots was only 58 seconds, while the longest was as much as 116 seconds, nearly a twofold difference. The average simulation time in the egocentric model was 84.1 seconds, and in the empathy-utilizing model, it was 81.6 seconds. Summing up all experiments in this section, the empathic swarm of robots performed its tasks, on average, 2.5 seconds faster. For 10 patrolling robots, the fastest achievement of the goal occurred after 88 seconds, while the longest took 205 seconds. In this case, there were many more possible interaction scenarios for 10 robots, influencing the disparities in simulation times. The average neutralization time for all viruses in the egocentric model was 148.5 seconds, while for the empathic model, it was 137.3 seconds. The significant positive impact of using the artificial empathy module is evident, with a difference of 11.2 seconds, confirming the effectiveness of the empathic model.
We prepared few visualisations of proposed empathetic model, along with comparison with egoistic one.
1.
Egoistic, two rats. Shortly after starting a patrol, both robots spot the same rat and start chasing it. Meanwhile, the second rat destroys the grain located in the middle of the arena. After neutralizing the first rat, one of the robots begins chasing the second pest.
Empathetic, two rats. The robot on the right spots a rat and signals it with an LED strip. The second robot, noticing this, continues to patrol the surroundings in search of other pests. After a while, it detects the second rat and starts following it. As a result, both rats are neutralized and grain loss is reduced.
Egoistic, robots run out of battery. Robots detect the same rat. During the chase, the robots interfere with each other, making it difficult to follow and neutralize the rat. Eventually, the rat is neutralized, but before the robots can spot and begin their pursuit of the other pest, both of them run out of battery and the second rat escapes.
Empathetic, low battery help. The robot on the right starts chasing the detected rat. During this action, the agent signals with an LED strip that it needs assistance, due to a low battery level. The other robot notices this and decides to help to catch the weaker rat. After neutralizing it, the second robot starts searching for other pests.