Optimal strategies for throwing accurately