Programming with Structures

Endassignment - swarm

The result of this assignment was an implementation of a flocking algorithm (swarm algorithm) with interaction using a kinect in openFrameworks.

What is a flocking algorithm?

flocking algorithms The core of the flocking algorithm is four steering behavior rules, which give a group of autonomous agents a realistic form of group behavior:

  1. Separation:
    Steer to avoid crowding local flockmates. An agent should maintain a certain distance from nearby agents to avoid collisions with them.
  2. Alignment:
    Steer towards the average heading of local flockmates. An agent should move in the same direction as nearby agents and match its velocity accordingly.
  3. Cohesion:
    Steer to move towards the average position of local flockmates. An agent should stay close to the nearby agents.
  4. Avoidance:
    Steer to avoid running into local obstacles or enemies. An agent should escape dangers when they occur.

After the course the student:

  • Has fluency in programming in C++.
  • Has done a number of projects in Open Frameworks.
  • Is familiar with using libraries, such as the STL standard library.
  • Is fluent in using abstract data structures, such as queues, stacks, arrays, and hash tables.
  • Can use standard algorithms related to these data structures, fluently.
  • Is aware of complexity of algorithms, knows the complexity of standard algorithms.
  • Can decide for suitable data structures and algorithms based on complexity considerations.
  • Is able to find alternative programming solutions making different use of resources.