Algorithm predicts the next shot in tennis