Skip to content
TobyReayPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Boids Simulation

image

This is a simple boids (bird object oid) simulation that you can try out and read to figure out how boids work. They are a simple swarm intelligence, where each boid has knowlege of each other boid and there actions are affected by the whole population.

the rules are:

  1. Coherence - For each boid in the boids view, we will take our center of mass which is the averge position of each boid and then move towards that point

  2. Seperations - We dont want to clump up all together then we can see each boid and the boids would hit eachother and they all need some personal space, so we subtract the distance between the other boid in our personal space and save that so we have a vector that moves us away

  3. alignment - this is the same as coherence, but instead of averaging the positions we average the velocities and move a small percentage of our velocity towards the average

Parameters

SCREEN WIDTH = 2560 SCREEN HEIGHT = 1660 Max Speed = 6 Min Speed = 3 Max Distance (bird.java) = the distance we want to keep away from another boid Turn Factor = 0.2 Bird View Distance = 200 Boid Population = 50

cohesion factor = 0.0005 seperation factor = 0.5 alignment factor = 0.05

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages