Maybe, but a simulation is only as good as its model. If this model of boids does not have the same properties as the pandemic, the simulation is probably not good enough.
No, definitely not: ‘boids’ serve to show how synchronised collective behaviour can arise in swarms of agents that can observe only a handful of their closest neighbours whilst following pre-determined rules. Virii have no such perceptive capability.
S-I-R (Susceptible, Infected, Recovered/Removed) models of epidemiology are a far better place to begin for reasonably realistic and tractable modelling and prediction of epidemics.
I think (maybe) a better question might be if a boids strategy could somehow be used to avoid a pandemic(?) - if all information is known. Seems like we are all performing a 6ft. collision detection @ the moment.
Speaking of boids and social distancing, Craig Reynolds (author of Boids) has also developed the open source library/toolkit "OpenSteer: Steering Behaviors for Autonomous Characters". It's based on his GDC 1999 paper, "Steering Behaviors For Autonomous Characters". I think there's a Unity3D plugin that incorporates a derivative of that code.
In OpenSteer terms, social distancing would include "unaligned collision avoidance" and "separation" steering behaviors, which can be combined with other behaviors including "seek", "flee", "pursuit", "evasion", "offset pursuit", "arrival", "obstacle avoidance", "wanderer", "path following", "wall following", "containment", "flow field following", "cohesion", "alignment", and "leader following". You can also implement your own custom plug-ins, if you need something special like "curly floor spinning".
OpenSteer is a C++ library to help construct steering behaviors for autonomous characters in games and animation. In addition to the library, OpenSteer provides an OpenGL-based application called OpenSteerDemo which displays predefined demonstrations of steering behaviors. The user can quickly prototype, visualize, annotate and debug new steering behaviors by writing a plug-in for OpenSteerDemo.
OpenSteer provides a toolkit of steering behaviors, defined in terms of an abstract mobile agent called a "vehicle." Sample code is provided, including a simple vehicle implementation and examples of combining simple steering behaviors to produce more complex behavior. OpenSteer's classes have been designed to flexibly integrate with existing game engines by either layering or inheritance.
OpenSteerDemo's plug-in framework allows a game AI programmer to quickly prototype behaviors during game design, and to develop behaviors before the main game engine is finished. OpenSteerDemo allows the user to interactively adjust aspects of the simulation. The user can: start, stop and single step time, select the vehicle/ character/ agent of interest, adjust the camera's view and its tracking behavior.
OpenSteer is distributed as open source software in accordance with the MIT License. OpenSteer was developed with the generous support of Sony Computer Entertainment America. OpenSteer is supported on Linux, Mac OS X and Windows.
No. It's an unrelated set of rules. The best way to simulate a disease is to model each person in the country as an individual agent. Even a naive movement model for humans won't look like anything like bird flocking.
Physical movement. It struck me that movement of belief systems looks LOTS like boid flocking. It's even possible to map social connectedness by things like Facebook etc. to size of neighborhood, and probably limits on how large a 'neighborhood' can practically be when it represents the belief systems of those in contact with you.
I recommend one of my favourite books, Gary William Flake’s 1998 The Computational Beauty of Nature to anybody interested in boids or other computational models of social, chemical, and physical phenomena.
Therein the author covers boids extensively and in detail. If I am not mistaken it is in section 16.3 that the author treats boids fairly extensively.
I have an implementation here [0] if people want to play with it. Supports dynamically changing the controls, has obstacles and predators. Setting weights for separation, alignment and cohesion to zero and then increasing only one of them nicely shows which role each of them plays. It's actually made as a workshop [1] for my company, where the shell is provided and one has to implement it step by step. In Norwegian, though.
Update: Dang linked other discussions, and I see I commented on one from 2015 [2]. Someone there asked for the course content, and that's available (in English!) in a PDF in [1]. This workshop/implementation is actually an example of what I wanted the students to make at the time. Which I then retrofitted to a fun workshop for my colleagues.
These guys behave just like the implementation I wrote! I worked out how to do separation, cohesion, and alignment based on written descriptions as an exercise.
Works great on my phone. I noticed that flocks tended to split when they wrap around the edge of the field, as if forces weren't being computed wrapped. Makes it hard to accomplish my goal of merging all the boids into a single flock :).
Yeah, the neighbourhood calculation doesn't wrap around. That's trivial to add, but then one has to account for the wrapping when calculating average neighbourposition so it's not completely off. Not too hard, but would have added complexity to the workshop.
>Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behaviour of birds. His paper on this topic was published in 1987 in the proceedings of the ACM SIGGRAPH conference. The name "boid" corresponds to a shortened version of "bird-oid object", which refers to a bird-like object. Incidentally, "boid" is also a New York Metropolitan dialect pronunciation for "bird".
>"The motion of a flock of birds is... simple in concept yet is so visually complex it seems randomly arrayed and yet is magnificently synchronous. Perhaps most puzzling is the strong impression of intentional centralised control. Yet all evidence indicates that flock motion must be merely the aggregate result of the actions of individual animals, each acting solely on the basis of its local perception of the world." - Craig Reynolds
[...]
>References: "Artificial Life : The Quest for a New Creation" - Steven Levy
>A "Boid" is a virtual entity used in "Boids", an artificial life program simulating the behavior of birds or fish in their flocks or schools, respectively (with each other, as well as their environment), developed at Symbolics Inc. in 1986 by Craig Reynolds, an artificial life and computer graphics expert, and named "steering behavior".[1] The source code has been released a few years after 1986, allowing the creation of many variants since then, including Valve's creature (that even resembles the original Boids by Reynolds). It is also implemented in the free C++ library OpenSteer, designed to help construct steering behaviors for autonomous characters in games and animation.
>The term "Boid" is the abbreviation of "birdoid" ("like a bird"), as the program rules applied equally to simulated flocking birds and schooling fish. It was also inspired by a scene from Mel Brooks' 1968 film The Producers where the playwright's landlord complained about his keeping pigeons on the roof, referring to them as "boids", or "bird" in a stereotypical New York accent. The term also linked up with the ellipsoid-based 3D modeling tool by Tom Duff at the Graphics Lab of New York Institute of Technology named "soids".[2] Therefore, in regard of the source of the creature's name, its proper in-universe name remains unknown.
Alvy Ray Smith used Tom Duff's "soids" (short for "ellipsoids") for Chromagnon:
If you're in 3D animation/modeling/whatever and have a little bit of experience, Blender has a pretty stable simulation of Boids that is lots of fun to play around with. It's been built-in into Blender since... For as long as I remember, and it has lots of properties you can play around with, and you can also make the boids be rigid bodies as well so they can interact with other elements in your scene.
I made a Three.js boids implementation for an interview once. The role was for web dev, but the theme was "come and teach us about something that interests you" :)
Slightly OT, but this is a very interesting problem to implement on a GPU because it very much resembles in its structure the implementation of exact N-body simulator on massively parallel machines.
Yes boids are great for parallelization. Each boid must compute a stressor imposed by neighboring boids based on the three rules in the paper (separation, alignment, and drifting towards center of mass). The stressor for each boid is simply applied to each boids velocity. Given a thousand threads / cpus / cuda cores, what have you, each unit can be applied to a single boid
I’ve often pondered the feasibility of using boids (or a boid like rule system) to implement ancient combat formations like pike squares skirmish lines. Is that what you’re doing?
Yes, though I'm not at the formation stage just yet. Boids just know how to stear organically much like Zerglings do.
Boids just provide distancing at the micro level. Astar or Greedy First Best at the macro level ultimately provides the boid with a final destination, and the boids organically work together on path to their respective final destinations.
Rise of Nations did it almost perfectly in the early 2000s with left box drag for selection and right box drag for retangular placement. Rome Total War upped the antics a bit with 10,000 unit scales over Rise of Nations 200 unit scales, but suffered some serious bugs. In my opinion no one except Julius Caesar can "program" so many units to properly do their bidding!
Oskar’s tweets showing his city-builder are some of my favourite things on the internet. His combination of 3D rendering and artistic style is just black magic to me.
Might be a dumb thing to post on hacker news, but I tried using the word boid or boids in Scrabble and my competitive wife wouldn't let me because it wasn't in the dictionary. It fit so well too!
Previously we played with the Australian reference, the Macquarie Dictionary. Subsequently, as an international family finding that an expensive and static resource insufficiently engaged with international usage we began to play admitting anything in either dictionary.com or wiktionary with an English entry, excepting proper names and non-naturalized acronyms. As official scrabble cheat words cover a lot of random Scots/Welsh, you might choose to permit those (single result page on Wiktionary). It starts to get ridiculous fast. I personally love the learning aspect and we do not play the traditional "challenge" rule, in fact we actively encourage consultation of reference works before and after each play. I am a big fan of Wiktionary, occasionally adding to existing English and Middle Chinese entries.
For example, according to Wiktionary, boid (and its plural) should be permitted under etymology two, ie. member of the family Boidae of non-venomous snakes or etymology three, ie. Nonstandard spelling of bird representing the New York City pronunciation. We would not permit it under etymology one (computer program name). Now look - you learned something! https://en.wiktionary.org/wiki/boid#English
I recently implemented boids in a compute shader [1]. It’s using Apple’s Metal framework, and rendered in 3D. The boids are simple triangles, and I added a bit of specular shading to give them a little bit of a “shimmer” as they flock.
I implemented an NVIDIA algorithm for running n-body simulations on the GPU. The constraint is memory access, which can freeze up in a case like this. [2]. Converting from CUDA to Metal wasn’t too bad.
Love it, and the others on your instagram. You should start a dedicated account for them. I would like to follow your art, but feels weird seeing family photos of someone I don't know :/
Good old Boids! I implemented a clone of Boids in C as my senior project in high school. It included 3D wireframe graphics from scratch. My teacher said it was "A nice screensaver".
83 comments
[ 64.4 ms ] story [ 1525 ms ] thread2011: https://news.ycombinator.com/item?id=2504652
2014: https://news.ycombinator.com/item?id=7293350
One comment from 2018: https://news.ycombinator.com/item?id=17167077
(Links for the curious. Reposts are ok after a year: https://news.ycombinator.com/newsfaq.html)
For a nice visualization and simulation of a spreading virus and why social distancing is a good idea: https://www.washingtonpost.com/graphics/2020/world/corona-si...
S-I-R (Susceptible, Infected, Recovered/Removed) models of epidemiology are a far better place to begin for reasonably realistic and tractable modelling and prediction of epidemics.
In OpenSteer terms, social distancing would include "unaligned collision avoidance" and "separation" steering behaviors, which can be combined with other behaviors including "seek", "flee", "pursuit", "evasion", "offset pursuit", "arrival", "obstacle avoidance", "wanderer", "path following", "wall following", "containment", "flow field following", "cohesion", "alignment", and "leader following". You can also implement your own custom plug-ins, if you need something special like "curly floor spinning".
https://www.youtube.com/watch?v=T2iZPRif2i4
http://www.red3d.com/cwr/steer/
http://www.red3d.com/cwr/papers/1999/gdc99steer.html
http://www.red3d.com/cwr/steer/gdc99/
https://forum.unity.com/threads/opensteer-for-unity3d.26906/
https://code.google.com/archive/p/opensteerdotnet/
https://github.com/ricardojmendez/UnitySteer
http://opensteer.sourceforge.net/
OpenSteer is a C++ library to help construct steering behaviors for autonomous characters in games and animation. In addition to the library, OpenSteer provides an OpenGL-based application called OpenSteerDemo which displays predefined demonstrations of steering behaviors. The user can quickly prototype, visualize, annotate and debug new steering behaviors by writing a plug-in for OpenSteerDemo.
OpenSteer provides a toolkit of steering behaviors, defined in terms of an abstract mobile agent called a "vehicle." Sample code is provided, including a simple vehicle implementation and examples of combining simple steering behaviors to produce more complex behavior. OpenSteer's classes have been designed to flexibly integrate with existing game engines by either layering or inheritance.
OpenSteerDemo's plug-in framework allows a game AI programmer to quickly prototype behaviors during game design, and to develop behaviors before the main game engine is finished. OpenSteerDemo allows the user to interactively adjust aspects of the simulation. The user can: start, stop and single step time, select the vehicle/ character/ agent of interest, adjust the camera's view and its tracking behavior.
OpenSteer is distributed as open source software in accordance with the MIT License. OpenSteer was developed with the generous support of Sony Computer Entertainment America. OpenSteer is supported on Linux, Mac OS X and Windows.
Last modified: October 25, 2004
https://youtu.be/gxAaO2rsdIs
Therein the author covers boids extensively and in detail. If I am not mistaken it is in section 16.3 that the author treats boids fairly extensively.
Update: Dang linked other discussions, and I see I commented on one from 2015 [2]. Someone there asked for the course content, and that's available (in English!) in a PDF in [1]. This workshop/implementation is actually an example of what I wanted the students to make at the time. Which I then retrofitted to a fun workshop for my colleagues.
[0]: https://matsemann.github.io/boids-workshop/ [1]: https://github.com/Matsemann/boids-workshop [2]: https://news.ycombinator.com/item?id=9300142
Wallpaper Engine [0] might be your next best bet.
0. https://store.steampowered.com/app/431960/Wallpaper_Engine/
https://m.youtube.com/watch?v=zN2bhKyCJwk
It looks really good even though the "fish" are just made from two pyramids.
https://github.com/SebLague/Boids/blob/master/Assets/Scripts...
If so, then awesome :)
[0]: http://gpuweb.github.io/gpuweb/wgsl
https://www.youtube.com/watch?v=mhjuuHl6qHM
https://www.youtube.com/watch?v=aL6mTMShVyk
>"He's up on the roof with his boids. He keeps boids. Doity, disgusting, filthy, lice ridden boids." -The Concierge, not a Madam
https://en.wikipedia.org/wiki/Boids
>Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behaviour of birds. His paper on this topic was published in 1987 in the proceedings of the ACM SIGGRAPH conference. The name "boid" corresponds to a shortened version of "bird-oid object", which refers to a bird-like object. Incidentally, "boid" is also a New York Metropolitan dialect pronunciation for "bird".
https://web.archive.org/web/19990117095925/https://http1.bru...
>Craig Reynolds' Boids
>"The motion of a flock of birds is... simple in concept yet is so visually complex it seems randomly arrayed and yet is magnificently synchronous. Perhaps most puzzling is the strong impression of intentional centralised control. Yet all evidence indicates that flock motion must be merely the aggregate result of the actions of individual animals, each acting solely on the basis of its local perception of the world." - Craig Reynolds
[...]
>References: "Artificial Life : The Quest for a New Creation" - Steven Levy
https://books.google.nl/books/about/Artificial_Life.html?id=...
Steve Levy's page on his "Artificial Life" book (with glorious 1997 web site design):
https://web.archive.org/web/19981202151154/http://www.echony...
Tal Cohen's Bookshelf: Artificial Life: The Quest for a New Creation / Steven Levy
http://neuro.bstu.by/ai/To-dom/My_research/failed%201%20subi...
Bruce Sterling. Artificial life.
http://lib.ru/STERLINGB/f_sf_04.txt
Half Life Wiki: Boid
https://half-life.fandom.com/wiki/Boid
>A "Boid" is a virtual entity used in "Boids", an artificial life program simulating the behavior of birds or fish in their flocks or schools, respectively (with each other, as well as their environment), developed at Symbolics Inc. in 1986 by Craig Reynolds, an artificial life and computer graphics expert, and named "steering behavior".[1] The source code has been released a few years after 1986, allowing the creation of many variants since then, including Valve's creature (that even resembles the original Boids by Reynolds). It is also implemented in the free C++ library OpenSteer, designed to help construct steering behaviors for autonomous characters in games and animation.
>The term "Boid" is the abbreviation of "birdoid" ("like a bird"), as the program rules applied equally to simulated flocking birds and schooling fish. It was also inspired by a scene from Mel Brooks' 1968 film The Producers where the playwright's landlord complained about his keeping pigeons on the roof, referring to them as "boids", or "bird" in a stereotypical New York accent. The term also linked up with the ellipsoid-based 3D modeling tool by Tom Duff at the Graphics Lab of New York Institute of Technology named "soids".[2] Therefore, in regard of the source of the creature's name, its proper in-universe name remains unknown.
Alvy Ray Smith used Tom Duff's "soids" (short for "ellipsoids") for Chromagnon:
http://alvyray.com/Art/Chromagnon.htm
>I modeled the skeletal hands from cyli...
Some links if you want to try it out:
- https://docs.blender.org/manual/en/latest/physics/particles/...
- https://www.blendernation.com/2019/07/06/how-to-use-boids-in...
- https://www.blendernation.com/2008/01/05/simulating-flocks-h...
- http://feeblemind.tuxfamily.org/blog/index.php?post/2007/12/...
https://youtu.be/imkSdlbXB_U
https://github.com/juanuys/boids
github.com/glouw/openempires
Boids just provide distancing at the micro level. Astar or Greedy First Best at the macro level ultimately provides the boid with a final destination, and the boids organically work together on path to their respective final destinations.
Rise of Nations did it almost perfectly in the early 2000s with left box drag for selection and right box drag for retangular placement. Rome Total War upped the antics a bit with 10,000 unit scales over Rise of Nations 200 unit scales, but suffered some serious bugs. In my opinion no one except Julius Caesar can "program" so many units to properly do their bidding!
https://twitter.com/OskSta/status/1219340987299966976
https://twitter.com/OskSta/status/1219343599336333319
https://twitter.com/OskSta/status/1225037781858234368
https://forums.tigsource.com/index.php?PHPSESSID=qvfvkcqtfr9...
Long before the flocking model, “boid” referred to snakes of the Boidae family, like boas and anacondas.
https://scrabble.merriam.com/finder/boid (for the USA and Canada)
https://www.collinsdictionary.com/scrabble/ (for English in the rest of the world)
For example, according to Wiktionary, boid (and its plural) should be permitted under etymology two, ie. member of the family Boidae of non-venomous snakes or etymology three, ie. Nonstandard spelling of bird representing the New York City pronunciation. We would not permit it under etymology one (computer program name). Now look - you learned something! https://en.wiktionary.org/wiki/boid#English
[0] http://jzlabs.com/
I implemented an NVIDIA algorithm for running n-body simulations on the GPU. The constraint is memory access, which can freeze up in a case like this. [2]. Converting from CUDA to Metal wasn’t too bad.
1: https://www.instagram.com/p/B4t4ewCplfR/?igshid=1uxnng6idsqb...
2: https://developer.nvidia.com/gpugems/gpugems3/part-v-physics...
edit: Here's a low-res animated GIF for anyone who doesn't want to click an instagram link: http://gregorywieber.com/assets/images/art/murmuration.gif