Live data from Hacker News

Show HN: Genetic Boids Web Simulation

attentionmech.github.io

41–46 of 46 posts

Re: Show HN: Genetic Boids Web Simulation

#42
I quite like Boids, but recently I started playing with RVO2 ORCA (optimal reciprocal collision avoidance). I made some changes to it and moved it to a compute shader to make this: https://www.youtube.com/watch?v=BavnPOPcHlk

The entities in the video are running super fast for testing purposes, so usually they'd be going a lot slower. They can produce some really pleasing patterns as they move through each other etc.

On the downside its quite expensive vs Boids, for example the video is from a slightly older version and every agent is looking at the closest 32 neighbours + 32 obstacles to compute its own velocity. At high densities you can drop that to e.g. 4 neighbours without appreciable difference, which allows for running e.g. 32k entities at 120fps.

Re: Show HN: Genetic Boids Web Simulation

#43
post #3

how are genetic (algorithms) used?

so, i just used them like conceptually.. each boid has a string, when boids come close , they produce a offspring with mixed string + mutation age lets boids die too nothing fancy, just for sake of sim

I was playing around, and inspected the boid count control to see if I might manually update it and see what unreasonably large and small populations look like. I saw the connected callback triggered updateProperty. Running updateProperty("boidCount", 10) in the console yielded a field with 10 boids, as expected, but apparently it doesn't update something else the natural code would, as as soon as two of the boids collided, a humongous explosion of boids occurred, like a firework.

Re: Show HN: Genetic Boids Web Simulation

#44
post #43

Earlier quoted context omitted.

so, i just used them like conceptually.. each boid has a string, when boids come close , they produce a offspring with mixed string + mutation age lets boids die too nothing fancy, just for sake of sim

I was playing around, and inspected the boid count control to see if I might manually update it and see what unreasonably large and small populations look like. I saw the connected callback triggered updateProperty. Running updateProperty("boidCount", 10) in the console yielded a field with 10 boids, as expected, but apparently it doesn't update something else the natural code would, as as soon as two of the boids co…

[deleted]

Re: Show HN: Genetic Boids Web Simulation

#45

I really like it, though I'm finding it dies consistently after about 30s (Vivaldi on an intel iMac with a decent GPU).

dies in the sense machine gets hung or all boids vanish? EDIT: also pushed some fixes in params (allow offsprings at larger distance, etc), but basically if the boids don't end up closer, they won't reproduce and the population dies so play with that and lmk

Boids vanishing

Re: Show HN: Genetic Boids Web Simulation

#46

I quite like Boids, but recently I started playing with RVO2 ORCA (optimal reciprocal collision avoidance). I made some changes to it and moved it to a compute shader to make this: https://www.youtube.com/watch?v=BavnPOPcHlk The entities in the video are running super fast for testing purposes, so usually they'd be going a lot slower. They can produce some really pleasing patterns as they move through each other etc.…

I've done a lot of work on realtime obstacle avoidance that scales well (targeting ~60-100k agents) -- steering behaviors, flow fields, RVO2/ORCA, and lots more -- for agent-based "old school" tycoon-style simulation games. :)

I'm super intrigued by what you've created, especially to hear about running it in a compute shader! I'd love to talk with you more about it, if you're open to it? I briefly looked for a way to get in touch directly but didn't see any contact info -- my email is in my profile, I'd love to connect! :)

Post reply on HN