Optimal strategies in sports