Spheres are nice and all, but there comes a time when more complex shapes are needed. One popular algorithm for testing collisions is the Gilbert–Johnson–Keerthi algorithm, or GJK for short. With it we can detect collisions between any two convex polygons.
Check out the full article: https://blog.winter.dev/2020/gjk-algorithm/
Apriori is an algorithm for frequent item set mining and association rule learning over relational databases. It proceeds by identifying the frequent individual items in the database and extending them to larger and larger item sets as long as those item sets appear sufficiently often in the database.
This book explains the algorithms behind those collisions using basic shapes like circles, rectangles, and lines so you can implement them into your own projects.
S. Jaiswal, and Y. Simmhan. IEEE International Workshop on High-Performance Big Data, Deep Learning, and Cloud Computing (HPBDC), Co-located with IEEE International Parallel and Distributed Processing Symposium (IPDPS), page 452--459. (2019)
T. Sabsch, C. Braune, A. Dockhorn, and R. Kruse. 2017 IEEE Symposium Series on Computational Intelligence, SSCI 2017 - Proceedings, page 1--6. (January 2018)
S. Puthanveettil, M. Cho, and A. Suresh. International Journal on Soft Computing, Artificial Intelligence and Applications (IJSCAI), 5 (1):
25 - 32(February 2016)
A. Belfodil, A. Belfodil, and M. Kaytoue. Joint European Conference on Machine Learning and Knowledge Discovery in Databases, page 500--516. Springer, (2018)
A. Hunt, and A. Black. Proceedings of the 1996 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 1, page 373-376. Atlanta, GA, USA, (May 1996)