A simple heuristic to find efficiently k-nearest neighbors in flocking behaviors

  • Authors:
  • Jae Moon Lee;Hye-Kyung Cho

  • Affiliations:
  • Dept. of Multimedia Engineering, Hansung University, Seoul, Korea;Dept. of Multimedia Engineering, Hansung University, Sungbukgu, Seoul, Korea

  • Venue:
  • AMERICAN-MATH'12/CEA'12 Proceedings of the 6th WSEAS international conference on Computer Engineering and Applications, and Proceedings of the 2012 American conference on Applied Mathematics
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Flocking behaviors are used in games and computer graphics for realistic simulation of massive crowds. Simulation of massive crowds in real time is a computationally intensive task. This intensity mostly comes from the O(n2) complexity of the traversal algorithm. It is because each agent in crowd has to decide for itself which neighbors fall into its environment. There are several algorithms to enhance the simulation of flocking behaviors. One of the efficient algorithms adapted the characteristic of the flocking behaviors which two agents may share many common neighbors if they are spatially close to each other. It ran up to two times faster than the conventional flocking algorithm based on spatial subdivision method. In this paper we present a noble flocking algorithm that yields an improvement in the execution time over the previous algorithm based on the characteristic. To do this, we analyzed the weakness of the previous algorithm and proposed the simple heuristic to overcome the weakness. A number of experiments were conducted to evaluate the performance of the proposed algorithm. The experimental results showed that the proposed algorithm outperformed the previous method by about 20%.