This is a personal interest project that aims to gain a better understanding of how and when oscillations occur in a common Rugby warmup drill called infinite passing. The key features here are a Pygame demonstration of the drill and a brute force script which runs different combinations of lines and players for a number of iterations each and records the results.
Players will line up in lines (typically no more than 5 or 6) and pass the ball according to the following steps.
The ball can start in any line.
- the player with the ball passes to the adjacent line in the current direction (typically starts with right)
- the player who just passed the ball goes to the end of the line they just passed to
- repeat steps 1 and 2 until the ball reaches the last line in that direction
- switch directions
- repeat steps 1-4
This goes on indefinitely until the coach stops the drill (or you get bored of watching the demo). To see the demo, see the Usage section.
When I was first introduced to this drill, I noticed that some players would be stuck passing between two lines while others would visit multiple lines. This project is interested in understanding the conditions that lead to a player oscillating between two lines. While oscillation is not necessarily a bad thing (since you end up getting to pass in both directions anyways), it is interesting to see how the number of players and lines affect whether a player oscillates.
Formally, a player
A demonstration of an oscillating player and a non-oscillating player can be seen in the Usage section.
Notes:
- the indices of lines goes from 0 to
$n-1$ from left to right where$n$ is the number of lines. - the indices of the players goes from left to right and then top to bottom.
line 1 line 2 line 3 line 4
0 1 2 3
4 5 6 7
8 9 10 11
Install the required packages with
pip install -r requirements.txt
These scripts both have command line arguments that can be used to modify the parameters of the drill. Use the -h
flag to see the available options.
Note: The different colors just help to differentiate the players. They have no other significance.
python3 simulation.py
For full documentation on command line arguments, use the -h
flag.
Example of a player oscillating (follow the player in red)
python3 simulation.py --example1
The player in red goes from the second line to the third line and back to the second line without having reached the rightmost line. This is an example of a player oscillating between two lines.
Example of a player not oscillating (follow the player in green)
python3 simulation.py --example2
The player in green goes from the second line to the third line. This is an example of a player not oscillating between two lines.
Given a valid drill run for
To run the projection, use the following command:
python3 will_oscillate.py
For full documentation on command line arguments, use the -h
flag.
python3 brute_force_drills.py
- The starting line must have at least two players. Since the starting line is the only line that loses a player without gaining one, it must have at least two players to ensure that it is not empty when the ball returns to it. this will never happen to any other line since they will always gain a player before losing one.
My observations and insights can be found in Insights.md.