Logic for tie breakers/ ranking

S

SteveS

Hi all..

I've searched Google groups on dealing with ranking and
tie breakers, but no luck. I hope someone can get me going
in the right direction, since I am stuck right now.


In our tournament, we have 5 judges. We write down the
five scores (paper way), mark out the highest and the
lowest (they are never used again) and sum the remaining 3
scores. If there is a tie, we compare the lowest scores.
If they are equal (still tied), then the highest scores
are compared. If they are still tied, the two contestants
compete again and the process (summing/comparing) is done
again. If they are still tied, the 5 judges make a
decision.

Example:

(A)
Scores after the low/high are thrown out:

S1 S2 S3 Total
Bill 5.5 5.4 5.4 16.3
Sam 5.4 5.1 5.5 16.0
Tom 5.1 5.4 5.5 16.0

Bill is in 1st place (no matter what happens in the tie
breaker)

Comparing Sam's and Tom's low scores: both 5.4

then hi scores: both 5.6


Sam & Tom tied for 2 place

(B)

They compete again. Remaining 3 scores:

S1 S2 S3 Total
Sam 5.6 5.4 5.6 16.6
Tom 5.5 5.5 5.6 16.6

Total tied again. Compare low scores

Sam 5.4

Tom 5.5 ***

Tom's low score is higher tha Sam's low score so Tom is
2nd place and Sam is 3rd place.


Note: that Bill is still in 1st place even though Sam's
and Tom's total for the second set of scores is highter
than Bill's first total score.


How do I keep the tie breaker scores (B) out of the first
set of scores (A) ? It has to work for ties for 1st place,
third place, three way ties, etc.

Do/should I add 1 or 2 more fields to some how keep track
of place and level of ties (second/third tie - see
example)?


Any ideas, examples, code snippets, etc more than
welcome....

TIA

Steve
 
S

Sam

A few thoughts....

1. Create a rank field that intially holds a rank of 1 (or maybe 0) for all
contestants.

2. Write a function to do the ranking for all contestants, this function
stores the calculated ranks in your rank field. This function includes code
for ignoring the highest and lowest scores and for calculating your low
score/high score comparsion stuff when needed. Initially this function would
store equal ranks for tied contestants.

3. Your function should only operate on tied ranks (which is intially the
case for all contestants). Say, open a recordset in rank order. I'd include
the highest, lowest and sum of all 5 scores in my SQL when generating this
recordset; you can use these calculated values to simplify you're ranking
code stuff. You'd do MoveNext operations to determine ties in the rank data,
once found these records are then processed to try and resolve the tie. In
this way you'd know the magnitide of the ranks to assign to previously tied
contestants without altering any existing non-tied ranks.

4. In practice, the five scores are edited for any tied contestants and then
your rank function is once again called for all the records. A single
function can then be called repeatedly to eventually resolve all ties.

HTH
Sam
 
S

SteveS

Thanks, Sam

Replies in line...
-----Original Message-----
A few thoughts....

1. Create a rank field that intially holds a rank of 1
(or maybe 0) for all contestants.

Did this. But I'm stuck on the tie breakers.
2. Write a function to do the ranking for all contestants, this function
stores the calculated ranks in your rank field. This function includes code
for ignoring the highest and lowest scores and for calculating your low
score/high score comparsion stuff when needed. Initially this function would
store equal ranks for tied contestants.

Did this. Works great for the first round, but again stuck
when a tie occurs.
3. Your function should only operate on tied ranks (which is intially the
case for all contestants). Say, open a recordset in rank order. I'd include
the highest, lowest and sum of all 5 scores in my SQL when generating this
recordset; you can use these calculated values to simplify you're ranking
code stuff. You'd do MoveNext operations to determine ties in the rank data,
once found these records are then processed to try and resolve the tie. In
this way you'd know the magnitide of the ranks to assign to previously tied
contestants without altering any existing non-tied ranks.

4. In practice, the five scores are edited for any tied contestants and then
your rank function is once again called for all the records. A single
function can then be called repeatedly to eventually resolve all ties.

Once the lowest and the highest are discarded (but still
in the table), they cannot be used for any calculations
again.

I know I'm not explaining my problem very well....

On the form, I display the top 5 scores desc. If there are
ties, the background is set to red and the font is set to
yellow.

The constant's (id) & scores have to be re-entered in the
table. (The 1st tie breaker round).

1 How can/should/would I know not to use the tie scores to
find the top 5 scores (first round)?

2 If there is a 2 way tie for 1st place and a 2 way tie
for 3rd place, how do/can I identify which are the 1st
place tie breaker scores and which are the 3rd place
scores tie breakers scores?


Worst case has been a 2 way tie for 1st place and a 3 way
tie for 3rd place.

Thanks

Steve
 
S

Sam

Steve,
I think (hope) I understand your problem! More comments inline....

SteveS said:
Thanks, Sam

Replies in line...

Did this. But I'm stuck on the tie breakers.


Did this. Works great for the first round, but again stuck
when a tie occurs.

Does your function assign the same rank for ties? eg. If two contestants tie
for 3rd place then they both should have a rank of 3 and then the next rank
would be 5.
Once the lowest and the highest are discarded (but still
in the table), they cannot be used for any calculations
again.

OK, I understand that. Maybe my comments were unclear. I meant that your SQL
could calculate the sum of all 5 scores and then subtract the highest and
the lowest from that sum. This gives you your first result, which is all you
need for ranking when there is no tie. I think your SQL would be ordered
ascending on rank then descending on this result.
I know I'm not explaining my problem very well....

On the form, I display the top 5 scores desc. If there are
ties, the background is set to red and the font is set to
yellow.

Do you mean the top 5 ranked contestants??? Or do you only want the top 5
contestants?? Aren't there 5 scores for each contestant, one from each
judge? I'm a touch confused!!
The constant's (id) & scores have to be re-entered in the
table. (The 1st tie breaker round).
In my system, you'd edit each contestant's existing 5 scores, is that what
you mean? (You may well blank each score for tied contestants first, maybe
even as part of your function)
1 How can/should/would I know not to use the tie scores to
find the top 5 scores (first round)?
Not sure what you mean???
2 If there is a 2 way tie for 1st place and a 2 way tie
for 3rd place, how do/can I identify which are the 1st
place tie breaker scores and which are the 3rd place
scores tie breakers scores?

The two records with a rank of 1 are the first place tied records, which
when eventually resolved will have ranks 1 and 2. Those with a rank of 3 are
the third place ones, they will eventually have ranks 3 and 4. In my system,
the fact that two or more records have identical ranks would be the
indicator for the function to recalculate those ranks. Contestants with
unique ranks should be ignored.
Worst case has been a 2 way tie for 1st place and a 3 way
tie for 3rd place.
Why not just award two 1st places and 3 third places!!!!
Sam
 
S

SteveS

Why not just award two 1st places and 3 third places!!!!

Not an option....<g> I'm only a worker bee...


This is for a Karate Tournament.
A tournament has events, Events have divisions, divisions
have contestants (which can be in multiple divisions).

A division will have 2 or more contestants.
---
This is the way we keep score on paper.

The columns are:

Name, S1 ,S2 , S3 , S4 , S5 , Tot , Lo , Hi

S1 ... S5 are the scores
T is the total after the Highest and Lowest scores are
discarded

Lo is the lowest of the remaining three scores
Hi is the highest of the remaining three scores

If the four top scores are

S1 S2 S3 Total Place
Bill 5.5 5.4 5.3 16.2 1 - Tie
Ron 5.5 5.3 5.4 16.2 1 - Tie
Sam 5.4 5.1 5.5 16.0 3 - Tie
Tom 5.1 5.4 5.5 16.0 3 - Tie

Comparing Bill's and Ron's low scores: both 5.3

then hi scores: both 5.5

Bill & Ron tied for 1st place

Do the same for Sam and Tom.

We then go to the bottom of the list, draw a line and
enter Bill's and Ron's names on the next two lines. They
then compete again, receiving 5 more scores. With two
scores thrown out, if Ron's total is higher than Bill's,
then Ron gets 1st and Bill is 2nd.


Then Sam's and Tom's names are entered below Bill's and
Ron's.. go thru the above scoring process.

Note: It is possible for Sam/Tom's tie breaker total to be
higher than Ron/Bill's score, but Tom and Sam can only get
3rd place or 4th place.

If the tie breaker 3 score totals are:

Bill - 16.5
Ron - 16.1
Sam - 16.3
Tom - 16.4

the results will be:

1st place - Bill
2nd place - Ron
3rd place - Tom
4th place - Sam


I used VBa to create an array (name,school,Tot,Lo,Hi),
then sort it by Tot,Lo,Hi and put the top 4 in unbound
controls on the results page.

=================

This is what I am having trouble with:

How do I identify the tie breaker entries so they won't be
sorted in with the first set of scores?

And how do I keep Bill/Ron 's tie breaker separate from
Sam/Tom?


Steve
 
T

tina

well, i must admit i didn't totally follow you; but if i
understood the basic problem, i'd say add two more fields
to the table: 1 field to track the "round" that each set
of scores belongs to. the other field to track the purpose
of the second (and subsequent) round(s) - as you said, 1/2
tie-breaker, or 2/3 tie-breaker, or 3/4 tie-breaker, etc.
that way you can clearly differentiate what each record in
the table is for, and write your code accordingly.

hth
 
S

SteveS

Hi, Tina.

In its simplest form, throwing out the lowest of the 5
scores tries to keep a contestant from
getting 'sandbagged' by getting a really low score.
Throwing out the highest of 5 scores keep a contestant
from getting a little 'help' to win.

So there are 3 scores left. Comparing (or adding in) the
lowest of the remaining 3 scores is like a 'built in' tie
breaker. If both of the lowest of the 3 scores is the
same, then try to break the tie again by comparing the
highest of the 3 scores. If the scores are equal again,
then the contestants have to do their forms again.

So I guess I need three fields: one for the rank/place,
one for the 'round' and one to track which rank/place the
tie is associated with.

I tried something like this but with 2 fields and got
bogged down in the logic and coding.

Thanks for taking time to reply. I'll keep at it - time
for a major rewrite.


Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Query to break a tie 0

Top