Live data from Hacker News

Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)

github.com

1–10 of 22 posts

Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)

#1
Demo of agent based model on GPU with CUDA and OpenGL (Windows/Linux)

Agent instances on GPU memory Uses SSBO for instanced objects (with GLSL 450 shaders) CUDA OpenGL interops Renders with GLFW3 window manager Dynamic camera views in OpenGL (pan,zoom with mouse) Libraries installed using vcpkg

(https://github.com/KienTTran/ABMGPU)

Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)
github.com

Re: Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)

#3

What exactly is an "agent based model" in this case? What I see is a lot of triangles moving around, but what exactly drives them?

From my understanding it's the term used for Complex Modelling Systems in Social Sciences.

Re: Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)

#4

What exactly is an "agent based model" in this case? What I see is a lot of triangles moving around, but what exactly drives them?

Hi, thank you for your interest. Agent based model is a term refers to an interaction between multiple object (called agent) with its own property. The triangle is one agent in this case and in this example it moves along a random trajectory (just like people in a crowd). Each triangle also has its own color of its population so agents in the same population will have the same color.

Re: Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)

#9
Super cool, curious to see where you take this! I did some work on GPGPU for agent simulations for an RTS years ago ( https://www.youtube.com/watch?v=P4fKJIrv0J8 ). Doing things like pathfinding on the GPU gets tricky, especially taking into account how agents affect paths of other agents. Happy to jam anytime if you're brainstorming applications.

Re: Show HN: Demo of Agent Based Model on GPU with CUDA and OpenGL (Windows/Linux)

#10
You should work on inter-agent interaction next! It's so much fun.

I have played with this a fair amount and put a couple of my experiments in a repo- both slime mold simulation and "particle life".

Here's the repo: https://github.com/jasonjmcghee/compute-shaders

And a video of the slime mold: https://twitter.com/_jason_today/status/1663378736098738177?...

Post reply on HN