The velocity of the ball changes 4 times that are:
1. When first player kicks the football velocity changes from 0 to u. So, the agent is first player.
2. When second player kicks football towards goal, velocity again changes. So, the agent is second player.
3. When the goalkeeper collects football, velocity becomes 0. So, the agent is goalkeeper.
4. When goalkeeper kicks football towards a player from his team, velocity changes from 0 to v. So, the agent is again goalkeeper.