# Virtual Reality Collision Detection Based on Improved Ant Colony Algorithm
## 5 Experiment and Results
### Analysis of the Results  
As described in the previous section, it was verified by experiments that the algorithm designed in this study was able to detect collisions in complex scenes and was also superior to other algorithms. In the first experiment, five feature pairs were selected to test the algorithm. It can be seen from the results that as the number of feature pairs increased, the time was longer. When the efficiency of detection was 80%, the algorithm had a maximum difference of 13.9 ms. However, after comparing the logarithm of detected collisions with the logarithm of actual collisions, it was found that the greater the number of feature pairs, the higher the accuracy of detecting collisions. In the second experiment, different ant colony sizes and sampling feature pairs were selected for collision testing. The results showed that the ant colony size had a significant effect on the rate of detecting collisions, and the detection rate had the shape of first rising and then falling. When the number of feature pairs was 1000\({}^{2}\), the algorithm achieved the highest detection rate when the ant colony's size was 40. When the number of feature pairs was 2000\({}^{2}\) and 3000\({}^{2}\), the algorithm achieved the highest detection rate when the ant colony's size was 50. When the number of feature pairs was 4000\({}^{2}\) and 5000\({}^{2}\), the algorithm achieved the highest detection rate when the ant colony's size was 60. In the third experiment, the algorithm designed in this study was compared with two traditional algorithms. The results showed  
Figure 4: The detection efficiency of three algorithms.  
that the algorithm designed in this study was always better than the traditional collision detection algorithms. The accuracy of detection by the traditional hierarchical bounding box algorithm (sphere-OBB) could only reach 0.65. The accuracy of detection by the ant colony algorithm sphere-OBB-ACO before optimization and the optimized ant colony algorithm sphere-OBB-MACO was 0.8 and 0.85, respectively. In the fourth experiment, the algorithm developed in this study was compared with three published algorithms. The three algorithms are similar to those of this study. They all introduced intelligent algorithms to solve optimization problems. The results showed that the algorithm from this study had the highest accuracy for detecting collisions in complex scenes.  
From the experimental results, it can be seen that it is rational to introduce intelligent algorithms to deal with the problem of detecting collisions, as these can effectively improve the efficiency of detection. However, due to the limitations of the intelligent algorithm itself, researchers need to optimize the intelligent algorithm, so as to further improve the efficiency of the collision detection algorithm. The results of the fourth experiment showed that the ant colony algorithm was more suitable for dealing with the collision detection problem of complex scenes. Therefore, when dealing with the collision detection problem under different conditions, researchers need to flexibly use different algorithms to deal with the problem.