This is a swarm simulation written on Python3 with Pygame2 and Numpy.
ESC key for exit.
I included several customizable parameters in the code.
You can configure the size of the window, the full -screen mode, frame rate and the number of fish created, as well as whether they will avoid the edges of the screen or turn over to the other side, change the background color or turn the swarm into fish! ;)
The new version of Pynboids_Sp.py implements a spatial separation grid to increase the efficiency of detecting other boids. The most effective version at the moment!
Added a version of Pynboids2.py, updating the source Pynboids, with Numpy Numpy massifs from Pixelboids.py to increase efficiency. 2 times the BODS than B4.
Added a version of Pixelboids.py, drawing fish like pixels in Surfarray, which disappear when moving. Distance by distance and mathematics of the FOR cycle are replaced by the mathematics of the Numpy array. Uses the fading Surfarray to create tails, pixelization makes them animated.
Complete code:
#machinelearning #articalIlinTelling #ai #DatAstascience #PROGRAMMMING #TECHNOLOGY #DEEPLEARNING #CODING