This is a simple boids simulation using PyTorch. It is based on the Craig Reynolds' boids model.
Algorithm is parallelized using PyTorch tensors and CUDA.
Note: This is a work in progress. The code contains bugs and some core features are not fully implemented. Demo of the current state of the simulation:
- Python 3.7+
- PyTorch 2.1+
- pygame 2.5+
- CUDA 12.1
-
- Add separation, alignment and cohesion to boids
- Add simulation using pygame
- Add bias to boids
- Add a GUI to control the simulation
- Add predators
- Add better velocity indicators
- Add a better way to visualize the boids
- Add obstacles