I used pygame for a reinforcement learning course assignment: I built a gridworld simulator where you can input a text file with the origin, goal and obstacles, and watch as an agent learns a policy using Q-learning. It's based on a visualization used in a Berkeley RL bootcamp: https://miro.medium.com/max/992/1*FnCKMEFZC9QRnxLWT3lSCA.png
I never got to open-sourcing it though
Fast forward to two days ago, when I was idly watching George Hotz design a monocular visual SLAM prototype in 11h. Much to my surprise, one of the first things he fires up is pygame for visualization [1]!
[1] https://youtu.be/7Hlb8YX2-W8?t=701