FLAMEGPU/FLAMEGPU2

Example Readme(s)

Closed this issue · 1 comments

Within this repo, the purposes of each example and what they do is unclear to someone out of the loop.

I.e. there is nothing which says "the circles readme is this model. This version shows spatial comms" etc.

It might be nice to add this, either as examples/readme.md describing all of them in very little detail, or adding a per example readme with more info?

work in progress, will likely finish tomorrow AM

FLAME GPU Examples

This document briefly summarises the purpose of each example model provided, and links to any additional resources.

The examples directory has four subdirectories, corresponding to different model language options:

  • cpp: Pure c++ models.
  • cpp_rtc: C++ models with agent functions implemented as runtime compiled CUDA.
  • python_native: C++ models with agent functions implemented as runtime transpiled and compiled agent python.
  • python_rtc: Python models with agent functions implemented as runtime compiled CUDA.

Boids

The Boids example is a classic agent based model, first published by Craig Reynolds in 1986. Agent's represent birds flying in a flock according to three simple rules:

  • Separation: Avoid crowding local neighbours
  • Alignment: Follow the average direction of local neighbours
  • Cohesion: Move towards the centre of mass of local neighbours

As a classic model, this has been implemented in many frameworks and provides a means of comparison.

This example is available using both brute force and spatial messaging, and is only available in 3 dimensions.

<iframe width="942" height="539" src="https://www.youtube.com/embed/eE646_6NfqQ" title="FLAMEGPU Agent Based Simulation of Boids with 100k agents on GPU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Versions

  • cpp/boids_bruteforce: 3D, BruteForce messaging, Bounded environment
  • cpp/boids_spatial3D: 3D, Spatial messaging, Bounded environment
  • cpp_rtc/boids_bruteforce: RTC, 3D, BruteForce messaging, Bounded environment
  • cpp_rtc/boids_spatial3D: RTC, 3D, Spatial messaging, Bounded environment
  • python_native/boids_spatial3D_wrapped: RTC, 3D, Spatial messaging, Wrapped environment
  • python_rtc/boids_spatial3D_bounded: RTC, 3D, Spatial messaging, Bounded environment

Circles

The Circles example was developed as a simple agent model for benchmarking communication strategies. It is an improvement over the version published in 2017, which smooths agent movement to reduce jitter.

<iframe width="941" height="539" src="https://www.youtube.com/embed/ZedroqmOaHU" title="FLAME GPU 2 Circles benchmark model" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Versions

  • cpp/circles_bruteforce: 3D, BruteForce messaging, Bounded environment.
  • cpp/circles_spatial3D: 3D, Spatial messaging, Bounded environment
  • FLAME GPU Tutorial: 2D, Spatial messaging, C++, Python with RTC, Python with Agent Python

Diffusion

Game of Life

Sugarscape

<iframe width="941" height="539" src="https://www.youtube.com/embed/tSLV19AWfwg" title="Sugarscape Agent Based Model in FLAME GPU 2" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Pedestrian Navigation

The pedestrian navigation example implements a copy of the original FLAME GPU 1 pedestrian navigation example.

It was created to demonstrate keyframe animation and user interface support within FLAME GPU. Previously in FLAME GPU 1 much of this visualisation functionality had to be hand coded.

Pedestrian agents walk between pairs of entrances whilst avoiding collisions with one another.

<iframe width="942" height="539" src="https://www.youtube.com/embed/9jPfBs81XmE" title="Pedestrian Navigation Example in FLAME GPU 2" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Versions

The pedestrian navigation exists as a C++ model in a standalone GitHub repository.

Ensemble

Host Function

CodeGen