Closed uniq10 closed 8 years ago
I think the behavior of OffenseOnBall is a bit non-intuitive. Why not make it a boolean where 0 = no offense on ball and 1 = randomly pick offense player?
Alternatively, hfo could provide a flag --offense_on_ball=player_num with the following behavior: -1/0: don't use offense on ball; 1-num_offense: always give ball to that offense player; >num_offense: randomly choose player to give the ball to.
Were you going for this second option when designing the OffenseOnBall?
Yes, I was going for the second option. If the offense-on-ball <= 0 - don't use offense on ball else if in [1, num_offense] ball with the corresponding player else randomly. I agree this makes the flag a bit non-intuitive but I felt this gave it a bit more functionality.
Okay, the additional functionality is nice. However, HFO needs to be modified to support it. Can you modify the HFO argparse to have the same semantics?
--offense-on-ball=player_num [default player_num=0]
player_num <= 0: Don't give the ball to anyone player_num > num_offense: randomly choose player to give the ball to otherwise: always give the ball to player_num
I added just a couple of small comments. Otherwise, looks good!
If the hfoOffenseOnBall parameter is greater than the number of offense players we pick a random offense player to be on ball.