"How would you approach this problem" is way too broad for a question. Unfortunately questions like these are closed on Stack Overflow, with the option: question needs more focus. In this case, your question was closed as you provided no additional info on what you actually want.
You would usually show what you attempted, found online or explicitly what you want to achieve instead of being vague.
Also, you provided no additional details as to what algorithm you want. Not only that, SO is not a website that writes code for you. Your question should likely ask for "why isn't this working?" for explicit code that you have made or found online to implement. This way users can better understand, fix and explain your code to you.
I want to build a ML-based algorithm that will help train goalkeepers, by shooting the balls in the best way for them to train.
This is already very complicated. The number of variables you have to keep track and program out is probably insanely large. The algorithm has to be partially coded by you so we can understand, else there is nothing we can help you with unfortunately.
I don't know but it is on a specific type of ML algorithm, with no good answer on the internet.
Please mention it in your question! :3