Boids: Difference between revisions

38 bytes added ,  10 months ago
no edit summary
m (Automated syntax highlighting fixup (second round - minor fixes))
No edit summary
 
Line 2:
A [[wp:Boids|Boids]] algorithm simulates the flocking behavior of birds. This task requires the creation of a graphical or purely textual simulation of a flock of birds navigating the cave with obstacles depicted below.
 
<div style="font-size: .8em;"><pre>
<pre>.......###############...............................................................
.......###############...............................................................
......#################..............................................................
Line 17 ⟶ 18:
............................................................#################........
...........................................................###################.......
............................................................#################........</pre>
</pre></div>
 
If you implement a purely textual simulation, this is a possible board representation, where "O" are the boids that should go toward the right, "#" are fixed walls that should be avoided by the boids, and "." is free space (using a space is also acceptable for free space, if you add some kind of frame around the board).