Jump to content

User:Prob2prob/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Prob2prob (talk | contribs) at 02:53, 17 September 2018 (50 shots of a real life match). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Description

The Offensive Play Index is meant to be an objective measurement of the quality of a player's offensive play during a match of continuous 14.1 also known as straight pool. The measurement takes the form of a decimal value between 0.000 and 1.000, 1.0 being perfect play and 0.0 the worst possible play. Good amateurs will typically score between 0.600 and 0.750 and professionals between 0.750 and 1.000 but in a race to 150 or more, only top professionals can hope to score better 0.900 on a regular basis. The measure of OPI is not only meaningful after a match but also during a match provided that enough offensive play has already occurred.

The measure is objective as it relies only on objective events in the game:

1. Whether a player is:

playing offensively (attempting to pocket a ball by calling it or by obvious intention) -or-
playing defensively (with a safety shot or an intentional foul)

2. For offensive shots, what the result is:

1 or more balls pocketed legally -or-
no ball pocketed (on a legal shot or on a foul)

The measure will yield a higher value when balls are pocketed in long runs. For example, in a race to 100 a player that wins the match but pockets only 4 balls and then misses for each of his 25 turns at the table will end up with an Offensive Play Index measure of only 0.444 compared 1.000 for the player who runs 100 and out.

Model

Offensive vs Defensive play

To come up with a reasonable measure for the quality of offensive play in the game of continuous 14.1, shots will be put in 2 categories:

  • Offensive play: The player attempts to pocket one or more balls while leaving the cue ball and the remaining object balls in a disposition which will allow more balls to be pocketed
  • Defensive play: The player does not attempt to pocket any balls but instead attempt to leave the cue ball and the objects ball in a disposition that will make it difficult for the opponent to pocket any balls on his turn. This might be achieve by intentionally committing a foul.

The measure Offensive Play Index is concerned only with Offensive play shots. The Defensive play shots are considered only as ending a sequence of successful Offensive play shots.

Offensive Play Index definition

Each Offensive play shot is given a value between 0.0 and 1.0 (see calculation below). The average of this value over all the Offensive play shots by a player is calculated, resulting in a value between 0.0 and 1.0. This value is squared (see explanation below) resulting in another smaller value between 0.0 and 1.0. This value is called the Offensive Play Index (OPI hereafter) for the player.

Offensive play value for a shot

Although reality is much more complex, during the continuity of Offensive play shots, we will say that, to pocket a ball on shot #s, a player has to acquire position on shot #s-1 and acquire position for the position (p4p hereafter) on shot #s-2. Failure to acquire position on shot #s-1 and p4p on shot #s-2 results on the ball for shot #s to be missed or the player switching to a Defensive play shot.

In more details, a total of 6 tasks must be accomplished successfully in order for a ball to be pocketed on shot #s

Model of tasks to be completed to pocket a ball b
Shot #s-2 Shot #s-1 Shot #s
Pocket ball b-2 Pocket ball b-1 Pocket ball b
Get position for ball b-1 Get position for ball b
Get p4p for ball b

Since all of these 6 tasks are mandatory for shot #s to be successful, we will grant 1/6 of point for each. If all are successful, a ball is pocketed on shot #s.

Conversely, the tasks that a player is trying to complete on shot #s, not only with respect to ball b but with respect to other balls as well are as follow:

Tasks to be complated on shot #s
1. Pocket ball b (task for shot #s)
2. Pocket ball b (task for shot #s+1)
3. Pocket ball b (task for shot #s+2)
4. Obtain position for ball b+1 (task for shot s+1)
5. Obtain position for ball b+1 (task for shot s+2)
6. Obtain p4p for ball b+2 (task for shot s+2)

That is a total of 6 tasks worth each 1/6 of a point for a maximum of 1 point to be attributed per shot. This total will constitute the value from 0.0 to 1.0 that will be given to an Offensive play shot.

Since the concepts of obtaining position and obtaining position for the position are subjective in nature while OPI is meant to be measured objectively, the test as to whether task #4, #5 and #6 have been completed will be as follow:

Subjective tasks completion test
Obtain position for ball b+1 Was ball b+1 pocketed?
Obtain p4p for ball b+2 Was ball b+2 pocketed?

To summarize, during continuous Offensive play, for a shot #s, a player will be give 3/6 of a point if a ball is pocketed on shot #s, 2/6 of a point if a ball is pocketed on shot #s+1 and 1/6 of a point if a ball is pocketed on shot #s+2 for a maximum of 1 point for shot #s.

Effect of missing

When a player misses (pockets no ball legally on an Offensive play shot), all 6 tasks are considered incomplete. Task #1, #2 and #3 are incomplete because ball b was not pocketed, task #4 and #5 are incomplete because shot #s+1 will not even be played and task #6 because shot #s+2 will not be played either. So a player gets 0 for a missed shot.

Effect of going to a Defensive play shot

As mentioned before, the OPI measure is only concerned with Offensive play so when a player plays a Defensive play shot after a sequence of 1 or more successful Offensive play shots, the player obviously gets no point for the Defensive play shot. However, the shot is not considered in the calculation of OPI, it does not add 1 to the denominator in the calculation of the average of OPI values. Consequently, the negative effect of playing a Defensive play shot is much less than missing on an Offensive play shot.

Starting an Offensive play run

According to this model, a player needs position to pocket a ball. The player also needs p4p in order to acquire position on a second ball and pocket it. So when a player is able to start an Offensive play run of 1 ball or more, who is considered to have provided the position (and the position for the position if the player pockets 2 balls or more)?

It is consider that the position and the p4p was provided -accidentally- by his opponent, the player receives no point for this. If the player does not have position when the opponent loses his turn it is assumed that the player will not attempt an Offensive play shot and so, it has no impact on the calculation of OPI. It could be argued that when a player pockets a ball on the first shot of a run and misses (or switches to Defensive play) on the second shot, it might be because the opponent provided position but not the p4p on his last turn-losing shot and thus, it can be argued that the player should not be penalized for missing his second shot. For simplicity, it is assumed that the opponent always accidentally provides position -and- p4p when he loses his turn -or- neither of them.

Shots not played yet

In the course of a match, to calculate OPI, shots that have not been played yet will all be calculated as successful until they are played. This will elegantly keep the value of OPI at 1.0 until the player misses or switches to Defensive play for the first time.

Shots that will never be played

In order to make the value of 1.0 for OPI possible, at the end of a match, the points granted for getting position -and- p4p for shots that will not be played (because the match ended) will nevertheless be granted.

So let's say a match ends with a player pocketing a ball on shot #241 and another ball on shot #242 and so winning 150 to 92. The player will be granted 1.0 point (instead of 5/6 of a point) for shot #241 even tough shot #243 was not played and there is no way to judge if the player got position for the position on shot #241.

The player will also be granted 1 point (instead of 3/6 of a point) for shot #242 even tough shot #243 and shot #244 were not played and there is no way to judge if the player got position -and- position for the position on shot #242.

Pocketing more than 1 ball

Sometimes more than 1 ball are pocketed on an Offensive play shot. In reality this is almost always accidental so, for the purpose of calculating OPI, pocketing more than 1 ball gives no additional points.

Squaring the average

As mentioned before, the Offensive Play Index is calculated by squaring the average of the Offensive play shot values. This is done because even an absolute beginner who always pockets only 1 ball and then misses would still be attributed an OPI of 0.250 if the value was not squared, making the entire range of values 0.000 to 0.250 almost never used and the range from 0.250 to 0.500 rarely used. Squaring a value between 0.0 and 1.0 results in a smaller number still between 0.0 and 1.0. That gives more definition at the top of the OPI range where most players perform.

Flaws

  • Assumption of continuous offensive play intention

The model assumes that any time a player attempts an Offensive play shot, his intentions are to continue pocketing balls and run out. In really it is not uncommon for a player to pocket 1 or 2 balls fully intending to play safe on the next shot. Here the model assumes that the player lost position and he is granted only partial points for the 2 successful shots. This can have a big impact on the OPI measure if it happens more than once or twice in a match. A better model could give full points for short runs of 1 or 2 if they are followed by a safety shot.

  • Assumption of player having good position after opponent misses

The model assumes the any time a player attempts and Offensive play shot after an opponent's turn at the table ends, he has not only position to pocket a ball but also the position for the position to pocket the ball after. In reality, a player might be forced to attempt a very difficult shot with no obvious next shot as it is his best option. This could be because the opponent played an extremely good safety with no safety answer -or- the opponent "missed well" leaving no easy shot and no safety to the player by pure luck. As OPI is not meant to measure the safety play or the level of luck of the opponent this can be considered a flaw in the model. A better model could give less importance to shots that are after opponent turn-losing shots.

Examples

Perfect match

In a race to 100 between Alice and Bob, the match goes as follow:

Shot #001: Bob calls safe, makes legal break
Shot #002: Alice pockets 1 ball legally
Shot #003: Alice pockets 1 ball legally
Shot #004: Alice pockets 1 ball legally
..... .....
Shot #099: Alice pockets 1 ball legally
Shot #100: Alice pockets 1 ball legally
Shot #101 Alice pockets 1 ball legally, wins 100-0

Alice

Alice attempted 100 Offensive play shots, shots #002 to #101

For shots #002 to #099, Alice obtains 3/6 of a point for pocketing the ball, 2/6 for pocketing the ball after and 1/6 for pocketing the 2nd ball after. That's 98 times 1 point so 98 points.

For shot #100, Alice obtains 3/6 of a point for pocketing the ball, 2/6 for pocketing the ball after on shot #101. As explained above, she is also given 1/6 or a point for free because there is no shot #102, the match having ended. This is another 1 point.

For shot #101, Alice obtains 3/6 of a point for pocketing the ball. As explained above, she is also given 2/6 of a point and another 1/6 or a point for free event because there are no shot #101 and #102, the match having ended. This is another 1 point.

OPI for Alice = (100 points / 100 shots) ^ 2 = 1.000

Bob

Bob attempted no Offensive play shots. His only shot was the break shot where he called safe, a Defensive play shot which is not considered for the calculation of OPI. This is a rare case where OPI remains undefined for an entire match. This result can be represented as N/A or any other symbol or expression that signifies 'no value can be calculated'.

OPI for Bob = N/A


Almost perfect match (1 safety)

In a race to 200 between Alice and Bob, the match goes as follow:

Shot #001: Bob calls safe, makes legal break
Shot #002: Alice pockets 1 ball legally
Shot #003: Alice pockets 1 ball legally
Shot #004: Alice pockets 1 ball legally
..... .....
Shot #099: Alice pockets 1 ball legally
Shot #100: Alice pockets 1 ball legally
Shot #101: Alice pockets 1 ball legally
Shot #102: Alice calls safe. Makes legal shot.
Shot #103: Bob calls a ball, misses.
Shot #104: Alice pockets 1 ball legally
Shot #105: Alice pockets 1 ball legally
..... .....
Shot #201 Alice pockets 1 ball legally
Shot #202 Alice pockets 1 ball legally
Shot #203 Alice pockets 1 ball legally, wins 200-0

Alice

Alice attempted 200 Offensive play shots, shots #002 to #101 and #104 to #203

For shots #002 to #099, Alice obtains 3/6 of a point for pocketing the ball, 2/6 for pocketing the ball after and 1/6 for pocketing the 2nd ball after. That's 98 times 1 point so 98 points.

For shot #100, Alice obtains 3/6 of a point for pocketing the ball, 2/6 for pocketing the ball after on shot #101. This is 5/6 point. For shot #101, Alice obtains 3/6 of a point for pocketing the ball. This is 3/6 point.

For shots #104 to #201, Alice obtains 3/6 of a point for pocketing the ball, 2/6 for pocketing the ball after and 1/6 for pocketing the 2nd ball after. That's 98 times 1 point so 98 points. For shot #202, Alice obtains 3/6 of a point for pocketing the ball, 2/6 for pocketing the ball after on shot #101. As explained above, she is also given 1/6 of a point for free because there is no shot #204, the match having ended. This is another 1 point. For shot #203, Alice obtains 3/6 of a point for pocketing the ball. As explained above, she is also given 2/6 of a point and another 1/6 or a point for free event because there are no shots #204 and #205, the match having ended. This is another 1 point.

OPI for Alice = (98 + 5/6 + 3/6 + 98 + 1 + 1) / 200 ^ 2 = (199 / 200) ^ 2 = 0.99334444

Bob

Bob attempted 1 Offensive play shot, shot #103.

For shot #103, Bob gets no points.

OPI for Bob = (0 / 1) ^ 2 = 0.00000000


Almost perfect match (1 miss)

Same match as above except that on shot #102, Alice misses instead of playing safe. Shot #102 is now an Offensive play shot so point must be attributed to it.

Shot #102: Alice calls a ball, misses.

Alice

Alice attempted 201 Offensive play shots, shots #002 to #102 and #104 to #203

All the points attributions are the same except for the following addition:

For shot #102, Alice gets no points.

OPI for Alice = (98 + 5/6 + 3/6 + 0 + 98 + 1 + 1 / 201 ) ^ 2 = (199 / 201) ^ 2 = 0.98348500


Bob

Bob attempted 1 Offensive play shot, shot #103.

For shot #103, Bob gets no points.

OPI for Bob = (0 / 1) ^ 2 = 0.000

50 shots of a real life match

In a race to 200 between Alice and Bob, the first 50 shots of the match are as follow:

Rack # Shot # At the table Intent Result Score OP shot count OP value for shot Total of OP values OPI (real time)
Alice Bob Alice Bob Alice Bob Alice Bob Alice Bob
1 1 Alice Safe Legal break & Legal shot 0 0 0 0 - 0.0000 0.0000 N/A N/A
2 Bob Make Pocket 1 ball 0 1 0 1 1 0.0000 1.0000 N/A 1
3 Bob Make Pocket 1 ball 0 2 0 2 1 0.0000 2.0000 N/A 1
4 Bob Make Pocket 1 ball 0 3 0 3 5/6 0.0000 2.8333 N/A 1
5 Bob Make Pocket 1 ball 0 4 0 4 3/6 0.0000 3.3333 N/A 1
6 Bob Make Miss (Legal shot) 0 4 0 5 0 0.0000 3.3333 N/A 0.444
7 Alice Safe Legal shot 0 4 0 5 - 0.0000 3.3333 N/A 0.444
8 Bob Take Foul Foul 0 3 0 5 - 0.0000 3.3333 N/A 0.444
9 Alice Take Foul Foul -1 3 0 5 - 0.0000 3.3333 N/A 0.444
10 Bob Safe Legal shot -1 3 0 5 - 0.0000 3.3333 N/A 0.444
11 Alice Make Pocket 1 ball 0 3 1 5 1 1.0000 3.3333 1 0.444
12 Alice Make Pocket 1 ball 1 3 2 5 1 2.0000 3.3333 1 0.444
13 Alice Make Pocket 1 ball 2 3 3 5 1 3.0000 3.3333 1 0.444
14 Alice Make Pocket 1 ball 3 3 4 5 1 4.0000 3.3333 1 0.444
15 Alice Make Pocket 1 ball 4 3 5 5 1 5.0000 3.3333 1 0.444
16 Alice Make Pocket 1 ball 5 3 6 5 1 6.0000 3.3333 1 0.444
17 Alice Make Pocket 1 ball 6 3 7 5 1 7.0000 3.3333 1 0.444
18 Alice Make Pocket 1 ball 7 3 8 5 1 8.0000 3.3333 1 0.444
19 Alice Make Pocket 1 ball 8 3 9 5 1 9.0000 3.3333 1 0.444
20 Alice Make Pocket 1 ball 9 3 10 5 1 10.0000 3.3333 1 0.444
2 21 Alice Make Pocket 3 balls 12 3 11 5 1 11.0000 3.3333 1 0.444
22 Alice Make Pocket 1 ball 13 3 12 5 1 12.0000 3.3333 1 0.444
23 Alice Make Pocket 1 ball 14 3 13 5 1 13.0000 3.3333 1 0.444
24 Alice Make Pocket 1 ball 15 3 14 5 1 14.0000 3.3333 1 0.444
25 Alice Make Pocket 1 ball 16 3 15 5 1 15.0000 3.3333 1 0.444
26 Alice Make Pocket 1 ball 17 3 16 5 1 16.0000 3.3333 1 0.444
27 Alice Make Pocket 1 ball 18 3 17 5 1 17.0000 3.3333 1 0.444
28 Alice Make Pocket 1 ball 19 3 18 5 1 18.0000 3.3333 1 0.444
29 Alice Make Pocket 1 ball 20 3 19 5 1 19.0000 3.3333 1 0.444
30 Alice Make Pocket 1 ball 21 3 20 5 1 20.0000 3.3333 1 0.444
31 Alice Make Pocket 1 ball 22 3 21 5 1 21.0000 3.3333 1 0.444
32 Alice Make Pocket 1 ball 23 3 22 5 1 22.0000 3.3333 1 0.444
3 33 Alice Make Pocket 2 balls 25 3 23 5 5/6 22.8333 3.3333 1 0.444
34 Alice Make Pocket 1 ball 26 3 24 5 3/6 23.3333 3.3333 1 0.444
35 Alice Safe Foul 25 3 24 5 - 23.3333 3.3333 0.945 0.444
36 Bob Take Foul Foul 25 2 24 5 - 23.3333 3.3333 0.945 0.444
37 Alice Take Foul Foul 24 2 24 5 - 23.3333 3.3333 0.945 0.444
38 Bob Take Foul Foul 24 1 24 5 - 23.3333 3.3333 0.945 0.444
39 Alice Safe Foul - 3rd foul 15 pts penalty 8 1 24 5 - 23.3333 3.3333 0.945 0.444
4 40 Alice Safe Illegal break - Bob demands re-rack 6 1 24 5 - 23.3333 3.3333 0.945 0.444
41 Alice Safe Legal break & Legal shot 6 1 24 5 - 23.3333 3.3333 0.945 0.444
42 Bob Make Pocket 1 ball 6 2 24 6 3/6 23.3333 3.6667 0.945 0.522
43 Bob Make Miss (Legal shot) 6 2 24 7 0 23.3333 3.6667 0.945 0.3
44 Alice Make Miss (Legal shot) 6 2 25 7 0 23.3333 3.6667 0.871 0.3
45 Bob Make Pocket 1 ball 6 3 25 8 1 23.3333 4.6667 0.871 0.365
46 Bob Make Pocket 1 ball 6 4 25 9 1 23.3333 5.8333 0.871 0.42
47 Bob Make Pocket 1 ball 6 5 25 10 1 23.3333 6.8333 0.871 0.467
48 Bob Make Pocket 1 ball 6 6 25 11 1 23.3333 7.8333 0.871 0.507
49 Bob Make Pocket 1 ball 6 7 25 12 1 23.3333 8.8333 0.871 0.542
50 Bob Make Pocket 1 ball 6 8 25 13 1 23.3333 9.8333 0.871 0.572

OP value for shot

The column OP value for shot shows the Offensive play value taking into account the shots played after. For example on shot #4 and #5 the values given are 5/6 and 3/6 because it is taken into account that shot #6 is a miss. During play, just before shot #6 it is not known that shot #6 will be a miss shot and the values for shot #4 and #5 would be 1.0 and 1.0.

OPI (real time)

The column OPI (real time) shows the OPI value that would be shown during play, not knowing what is the results of the shots after the current one. For example, after shot #5 the OPI for Bob is still 1.000 although he will miss the next shot. This is because, as explained above, shots that have not been played yet are assumed to be successful Offensive Play shots.

Software support

Data collection

A software that calculate OPI must not only record the results of each shot ( Ball made / Legal shot-No ball made / Foul ) but also what was the intention of the player on the shot ( Make ball / Safe / Take foul). Although the "Ball made" result implies a "Make ball" intent, a "Legal shot-No ball made" result can have had a "Make ball" intent, a "Safe" intent and even in some rare case a "Take foul" intent. A "Foul" result can have had all 3 possible intents as well. But not all distinctions are necessary to calculate OPI. The results "Legal shot-No ball made" and "Foul" need not be differentiated (both are failed Offensive play shots). The intent "Safe" and "Take Foul" (both Defensive play shots) do not need to be differentiated either.

Software tools calculating OPI