Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    96comments
  2. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    64comments
  3. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    54comments
  4. AI posters don't have to be horrible(john.hartnup.uk ↗)
    5comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    414comments
  6. San Francisco Onion Futures Company(onionfutures.com ↗)
    67comments
  7. Cloudflare Quick Tunnels(cloudflare.com ↗)
    282comments
  8. "The Secret Life of Circuits" is here(coredump.cx ↗)
    7comments
  9. SDCC – Small Device C Compiler(sourceforge.net ↗)
    18comments
  10. Science Is Open Software(jepedersen.dk ↗)
    38comments
  11. Typesafe-computer-use drives a Mac toward a goal for 1/50th of a cent per step(github.com/awlevin ↗)
    50comments
  12. How to Write with an LLM(sockpuppet.org ↗)
    329comments
  13. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    15comments
  14. Saving another 100TB of RAM(cloudflare.com ↗)
    78comments
  15. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    32comments
  16. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    87comments
  17. Apple M6 Pro Achieves the Highest Single-Core CPU Score in Geekbench 7(geekbench.com ↗)
    40comments
  18. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  19. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    2comments
  20. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    105comments
  21. OpenJev(openjev.com ↗)
    265comments
  22. Goroutine Leak Profiles(go.dev ↗)
    4comments
  23. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    88comments
  24. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    70comments
  25. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    13comments
  26. Suppress vulnerabilities applying Kubernetes context to scans(github.com/alegrey91 ↗)
    2comments
  27. Veronese's Dogs(publicdomainreview.org ↗)
    1comments
  28. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    68comments
  29. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    100comments
  30. Cyclomatic Complexity in C#(ndepend.com ↗)
    21comments

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

55 pointsby 2y agogithub.com
21 comments
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)

2y agoHN ↗

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?

2y agoHN ↗

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

2y agoHN ↗

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.

2y agoHN ↗

reminds me of the flocking demos 20 years ago...

2y agoHN ↗

Are the agents independent or are they affected by neighbors? It would be nice to see some classic ABM examples like wolf-sheep population, flocking, and wildfire spread to demonstrate the utility of this.

2y agoHN ↗

Right now it's independent. I just want to provide a playground and people can make more with it. Loves your idea though.

2y agoHN ↗

Are the entities interacting in any way here? That's pretty critical for agent based models as they enable complicated/unexpected emergent behavior from simplified rules due to the interactions of the entities.

2y agoHN ↗

Yeah they should be interact to each other. Right now I just started with it and want to share so everyone can take advantage in their ways.

2y agoHN ↗

This is supercool and beyond what I've done. Thanks for sharing.

2y agoHN ↗

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.

2y agoHN ↗

This's awesome. Happy to know that you're doing the same.

2y agoHN ↗

Wow it's amazing visualization. Thanks for suggestion.

2y agoHN ↗

If you want to create some pretty effects, add the concept of a velocity-texture which is added to agents velocity as they pass over it. Then let the user draw on the texture. Very cheap way to get interactivity. My own version from before compute shades were a thing (https://moritonal.github.io/force-particles/)

2y agoHN ↗

Thanks for your advice. I will update more in the next version.

2y agoHN ↗

Could this work in WebGL and/or WebGPU (and/or WebNN) with or without WASM in a browser?

https://stackoverflow.com/questions/48228192/webgl-compute-s...

https://github.com/conda-forge/glfw-feedstock/blob/main/reci...

pyglfw: https://github.com/conda-forge/pyglfw-feedstock/blob/main/re...

- [ ] glfw recipe for emscripten-forge: https://github.com/emscripten-forge/recipes/tree/main/recipe...

Emscripten porting docs > OpenGL ES 2.0/3.0 *, glfw: https://emscripten.org/docs/porting/multimedia_and_graphics/...

WebGPI API > GPUBuffer: https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API

gpuweb/gpuweb: https://github.com/gpuweb/gpuweb

https://news.ycombinator.com/item?id=38355444 :

It actually looks like pygame-web (pygbag) supports panda3d and harfang in WASM

Harfang and panda3d do 3D with WebGL, but FWIU not yet agents in SSBO/VBO/GPUBuffer.

SSBO: Shader Storage Buffer Object: https://www.khronos.org/opengl/wiki/Shader_Storage_Buffer_Ob...

/? WebGPU compute: https://www.google.com/search?q=webgpu+compute

"WebGPU Compute Shader Basics" https://webgpufundamentals.org/webgpu/lessons/webgpu-compute...

2y agoHN ↗

Basically possible. You have to remove all Cuda code and port C++ code to use glfw with specific library for web. The shader can be reused.