SIS08 sci-arc project 1

From KokkugiaWiki

outline

This project involves research into and the simulation of a system of swarm intelligence. The project will be undertaken in groups of 2 or 3 people. Each group will choose a system which is based on the principles of swarm intelligence and use it to develop a simulation. Examples of possible systems include: flocking/schooling/crowds, ant colonies, convection (eg. heat transmission through fluid, or panic through a crowd), slime mold, diffusion limited aggregation etc.


There are 3 components to the project: research + analysis of a swarm system, writing the pseudo code for the system, and algorithmic simulation of the system.


What is pseudo code?


deadlines

All work is to be posted to the wiki

Part A: research into a swarm system
Due Monday the 21st of January

Part B: write the pseudo code for a swarm system
Due Monday the 28th of January

Part C: complete the working code for the swarm system
Due Saturday the 1st of March


pseudo code example

class kAgent{
  //variables 
      velocity, acceleration, position, max velocity and max force  

  // functions

  void update(){
    calculates a new position of the agent by adding together the returned steering behaviors
    weighting them and adding them to the current position
  }


  void seek() {
    calls the steer behavior and adds the returned vector to the acceleration vector
  }
   

  kVec steer() {
    returns a vector to steer the agent toward a target
  }


  kVec separate() {
     returns a vector to steer away from the surrounding agents
  }
 
 
  kVec align() {
     returns a vector to align with the direction and velocity of the surrounding agents     
  }


  kVec cohesion() {
     returns a vector to steer towards the center of the surrounding agents
  }


  void render() {
     draws a circle at the agents position
  }
  
  
  void borders() {
     adjusts the position of the agent such that if it exceeds the edge of the applet it 
     returns on the opposite side.
  }

}
Views