How to hit a moving target? This problem comes up in many games. Here is a missile command autoshooting AI which solves that problem. The solution is to solve a quadratic equation. We find the angle to shoot so that we hit the moving target.
Source files for the Tuts+ tutorial: link
Available on Tuts+ 30 Oct, 2017