Replace the current math actions like pow, sqrt, sin, etc. with it's NumPy equivalents.
This also means replacing all the python float and int variables with the correct numpy data types.
These changed need to be made without breaking the pygame drawing ofcourse.
PyGame could have support for using numpy data types directly since it uses them for pygame.surfarray.
Tests will be logged bellow to find the best approach for this conversion.
Summary
Change to be NumPy version:
Data types (int, float)
Math calculations (sqrt, sin, etc.)
Vector coรถrdinates (tuple)
NOT to be changed:
Tuples used for colors
Reason for enhancement
This should improve the compatibility with AI frameworks.
Add an option to Env to disable rendering in the environment.
The environment should still execute all actions, except graphical drawing.
This would be useful for faster processing of the physics and in the getting the results and training the AI model.
Add the code from examples edge.py and bounce.py into the Env class.
Make it easy to creata a closed off environment (no exceeding of borders), instead of having to write custom code in the update callback.
When the FPS param in Env is set to -1, the env should try and run at a 'as high as possible' FPS instead of a fixed FPS.
This is probable possible by just dropping the pygame.time.Clock().
PyGame (and this project) does not use the GPU for graphics rendering, this makes it not possible to have thousands of objects on the screen at a time.
A version that uses OpenGL (in the distant future) would be great for more graphical demanding use cases.
However, this should be a new repo based on this one.
Because for training AI models, the GPU is used and we don't want to take away any (or too much) of it's available resources to rendering the result.