williamleonard / obblm

Automatically exported from code.google.com/p/obblm
1 stars 0 forks source link

RR Tournament Matches Round numer is ALWAYS = 1 #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I rise my hands... after a few hours of code reverse-engineering, I've no
been able to understand the mechanichs of Round Robin (with or without
finals) matches creation.

What I'm sure is that SOMEWHERE there is a BUG.

I end EVER getting:

Case A: The correct number of matches, ALL in the same "Round 1" selecting
a 'rounds' number EQUAL to 1;

Case B: The creation of a RECURRENCE of the same sequence of matches
'rounds' times, when entering a number of 'rounds' GREATER than 1.

The FACT is that I NEVER get the correct number of RR matches evenly
distributed in n-1 players Rounds.

I found in the "class_tounrnament.php" file this block of code:

// Rounds between MIN_ALLOWED_ROUNDS - MAX_ALLOWED_ROUNDS ?
   if ($input['rounds'] < MIN_ALLOWED_ROUNDS || $input['rounds'] >
MAX_ALLOWED_ROUNDS)
       return false;

Where are those MIN_ALLOWED_ROUNDS and MAX_ALLOWED_ROUNDS taken from?

It seems there would be a place where I set this, but I've not foud it.

ANYWAY, aside where I set those parameters, still remains the fact I'm not
been able to-date to get a RR tournament self created by the corresponding
Admin Section command.

My common results are those I specified previously at Cases A. and B.

It's me that I'm wrong, or there is REALLY a BUG or a Misconfiguration
somewhere in my settings?

TY in advance for your suggestions/answers

Fabio

Original issue reported on code.google.com by SincreT...@gmail.com on 5 Feb 2009 at 2:40

GoogleCodeExporter commented 8 years ago
Personally, I'm not entirely clear on how you think it should work?

What I saw when I tested RR tour middle 0.37 beta was: 1 round = all meet 
eachother
once. 2 rounds = all meet eachother twice, once in each round. Same matchorder 
in
both rounds.

/Daniel

Original comment by blodae@gmail.com on 6 Feb 2009 at 8:22

GoogleCodeExporter commented 8 years ago
Correct Daniel. 
Round-robin is the tournament type where every team meats each other.
Scheduling multiple round means scheduling teams to play against each other N 
times.
So, when you for example schedule 2 rounds, you get a clone of round 1 with the
home/opponent teams switched around.

Maybe it's not a round-robin you want? Maybe FFA tours fit your needs better?

All constants are located in the header.php file.

Nicholas.

Original comment by Nimda...@gmail.com on 6 Feb 2009 at 9:01

GoogleCodeExporter commented 8 years ago
Maybe I misunderstood you.
Did you mean, that when creating n > 1 rounds, that the subsequent rounds do not
contain the same matches (or number of matches?) as with n (rounds) = 1?

Original comment by Nimda...@gmail.com on 6 Feb 2009 at 9:03

GoogleCodeExporter commented 8 years ago
Please, ALL: look at my sites to understand what I mean.

http://obblm.treemme.org/
http://obblm.treemme.org/mnt

If you look at Premier Division in the second site, you get the picture of what 
you
get from current tournament RR 1 round settings.

If you look at First Divisions, You see what is needed, but currently I have to
MODIFY each round field by-hand in the DB to get a temporal sequences of 
matches.

For those so lazy to not click the link and see what I men I make an example.

If I plan to have a 4 players RR tournament, I expect to have a sequence of 
matches,
where (correctly) each player meet each other... but:

Those matches are not due to be played in a random order, they must have a 
sequence
of play. In my humble opinion, Rounds must be used for that.

So I expected, generating the tournament for 4 players, a 3 rounds match list 
like this:

Round 1
Team A - Team B
Team C - Team D

Round 2
Team D - Team A
Team B - Team C

Round 3
Team A - Team C
Team D - Team B

AND NOT the current output

Round 1
Team A - Team B
Team C - Team D
Team D - Team A
Team B - Team C
Team A - Team C
Team D - Team B

Rounds are supposed to set a timed sequence of play... or not?

Fabio

Original comment by SincreT...@gmail.com on 6 Feb 2009 at 9:37

GoogleCodeExporter commented 8 years ago
Ah. I see what you mean now.

Sorry, but it is not round-robin you are wishing to create. 
In round robin everyone plays each other. 
What you are suggesting is a combined round-robin and knockout tournament, 
since the
group losers won't play against other group losers or other group winners.
That is, I'm guessing you are planning on lettings the group winners play each 
other.

What you want is to schedule a FFA tour, which allows you to design tournament
structures like the one you have described above.

Original comment by Nimda...@gmail.com on 6 Feb 2009 at 10:06

GoogleCodeExporter commented 8 years ago
No, we still don't get the same picture.

In my example, and on my linked sites (if you dare to take a look), each player 
plays
a match against each other player in its group, and this is Round-Robin, no 
possible
misunderstanding.

There is no knock-out in my example, nor on my sites... each MUST play all 
matches,
in a due order, to designate the winner at the end of ALL the matches against 
ALL the
other players in the same group (again this is RR).

What I need is only to SEPARATE each contendent match in a pre-ordered 
(automagically
created) sequence of plays. And this is why I supposed Rounds were intended for.

Still some dubt?

Fabio

Original comment by SincreT...@gmail.com on 6 Feb 2009 at 10:36

GoogleCodeExporter commented 8 years ago
When talking about round-robin, OBBLM has only the ability to create an
all-against-all tournament. 
Rounds in a ooblm round-robin tournament context are simply duplicates of the
scheduled RR-tour; that is, obblm schedules the same tournament again, so that 
teams
may play each other twice or more in the same "tournament" (which, by 
definition,
should only be one "obblm round" long, yes). 
So, to summarize, rounds in obblm are simply a label for putting multiple 
instances
of the same RR-tour under one roof (tournament).
I will not change this fact, sorry.

I suggest that you create a FFA tour which allows you to schedule the games as 
rounds
you have chosen yourself. I will not be redefining the current 
RR-implementation,
since the FFA system will do just what you want - or am I still not getting you?

Nicholas.

Original comment by Nimda...@gmail.com on 6 Feb 2009 at 11:07

GoogleCodeExporter commented 8 years ago
I admit I never tried to set a FFA tournament, but the name sound like:

I tale a look at what it does and then add a reply...

Please don't close this Issue.

Fabio

Original comment by SincreT...@gmail.com on 6 Feb 2009 at 12:01

GoogleCodeExporter commented 8 years ago
Nicholas, take a look at my season 2. It's a FFA tour, but is in reality a 2 
round RR
tour, but I've separated "gaming nights" in rounds. Which means 18 (sub)rounds 
for 2
RR rounds. One team can only have one match during a "subround", ie gaming 
night. 

That is what Fabio means. I hope I was more clear.

Fabio: FFA gives you more freedom, but also gives you a bit more work to do. 
But you
can get the matches the way you want.

What would be neat, is just pressing a button (or similar) and get a play-off 
set up
automatically, based on #1 meets #4, #2 meets #3. (Or even quarterfinals.) Our
play-off was based on #1-#4 picks their opponent from #5-#8 so I have to 
manually set
it up anyway, using FFA.

Btw, are there any hinders to adding another "Round" option in FFA? I just want 
a
different title. (Read as "Quarterfinal".)

Setting this issue as enhancement instead of defect.

/Daniel

Original comment by blodae@gmail.com on 6 Feb 2009 at 3:15

GoogleCodeExporter commented 8 years ago
Fabio, any news?

Original comment by Nimda...@gmail.com on 13 Feb 2009 at 12:40

GoogleCodeExporter commented 8 years ago
I looked around the web and what I mean with RR tournaments seems it is the 
same the
largest part of the internet means too.

Look at here:
http://www.teamopolis.com/tools/round-robin-generator.aspx

What you get is exactly what I meant.

The current bug in RR generator is that does not spans matches amongst rounds, 
like
every football/american football/basket calendar RR generator does.

I only need this to be fixed.

TY in advance

/Fabio

Original comment by SincreT...@gmail.com on 9 Mar 2009 at 5:44

GoogleCodeExporter commented 8 years ago
Personally I wouldn't call it a bug. It's an enhancement to current 
functionality. A
"RR Round" in the current OBBLM means "all teams meet all other teams exactly 
once".
(Or twice for a 2 round RR...etc)

Your definition of "Round" is "a gaming night", ie one team can only play one 
match
in one round.

If you have odd number of teams in league/tournament one team must have a 
"resting
game" each of your rounds. No code is implemented to handle that for RR 
tournaments.
If having even number of coaches I *think* it would be easily implemented as 
setting
a "headline" (meaning Round X) for each chunk of matches. The number of matches 
for
each chunk/headline is number of coaches divided by 2. To make it work for odd 
number
of teams - round down any decimals of "coaches divided by 2". Printing out the
resting game each round needs to be implemented?

You can achieve the same results using FFA tournament but it requires more 
manual
work on your part. (No coding required.)

Earlier I asked Nicholas about randomizing the order of matches in Round Robin 
but
that is impossible without completely rewriting the code.

I dont know if setting "headlines" ie "Round X" will mess up the code that 
finds the
finalists. Nicholas?

Hmm. Is there a way to convert a RR tour to FFA without editing in DB?

/Daniel

Original comment by blodae@gmail.com on 10 Mar 2009 at 8:43

GoogleCodeExporter commented 8 years ago
I guess it's not a proper RR then, but in the sense that everyone plays each 
other
once I still find it satisfying :-). Therefore is low priority for me - you 
guys are
welcome to re-write class_rrobin.php. I ported it from some JavaScript code 
once,
just can't remember where. As for now I would argue that FFA can be used to 
structure
the other (proper) type of RR.

I'm not sure what you mean by headlines, Daniel?

You can with the current version under section "Admin -> tournament handling" 
change
the type of a tournament.
In fact, this makes me wonder if it is possible to make the proper kind of RR 
as a
FFA, and then convert it to a RR-type - this should actually work! ..making 
obblm
scheduling finals, semis and so on.

Original comment by Nimda...@gmail.com on 10 Mar 2009 at 11:33

GoogleCodeExporter commented 8 years ago
I didn't know what to write when I wrote "headlines". ;-) When you wrote the 
code for
FFA it's not "rounds" anymore since you can choose to call something else. 
"Headline"
= name for a group of matches in a tournament. I'll be the first to admit that
"headline" is not a good name for it. :-P

I had the same thought, but the reverse way. Making a RR (to get all matches 
and not
missing any) then converting to FFA and organizing them into 
subrounds/gaming-nights
like Fabio wants. 

/Daniel

Original comment by blodae@gmail.com on 10 Mar 2009 at 11:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What Daniel is telling is EXACTLY what I'm doing now.

I run a RR (1 round) automatic Tournament generation, then I open the DB and 
change
the tour as follow:

UPDATE tours SET type = 5 WHERE tour_id = <last created id>

then I open the match table and modify "by hands" the 'round' field spanning 
all the
matches into teams-1 "Rounds" (read "Gaming Days").

The Other Issue, regarding ODD number of Teams is currently managed adding a 
FAKE
team (created for this scope only), inserting it into the list of Teams 
partecipating
to the Tournament PRIOR to generate the schedule, then REMOVING all the matches 
from
'matches' table containing the FAKE team into either 'team1_id' or 'team2_id'.

This is VERY boring, If you get the picture of the whole procedure.

One more error I see into the RR schedules generator is that it fails to 
alternate
HOME and GUEST positions of Teams.

If you generate a 'any even number of players' RR tournament, your lowest
teams:team_id will be set ALWAYS into 'team1_id' into generated matches records,
against being alternated between 'team1_id' and 'team2_id'.

Also this management is currently being managed "by hand", with lots of minutes 
lost...

I suggest to ask the code to the author of the free online RR generator i linked
above [http://www.teamopolis.com/tools/round-robin-generator.aspx] and 
substitute it
to the current RR generator.

Once more... who really needs a number of RR rounds greater than 2?

Once You have played a match as a HOST and GUEST against every other team, ALL
real-world occurrence of tournaments have been covered.

So the substitution of the actual code taking the code from Teamopolis would be 
a
great saving of time, and would solve also the REST issue for ODD teams 
tournaments.

Think about it.

/Fabio

Original comment by SincreT...@gmail.com on 10 Mar 2009 at 12:30

GoogleCodeExporter commented 8 years ago
My point is, that if you have tried any release since r15 you will find, that
converting tour types (as well as RS) is now possible from the admin section.
Thus as a temporary solution you can create either FFA or RR and convert it to 
the
wanted type.

I will, though, rewrite my own code, since my code already does exactly what is
required. It simply makes multiple pairing rotations instead of one per round.

Also, the RR scheduler does, actually, at the moment flip the home - guest pair 
for
each round. Think Daniel or Tim requested some time back.

I refuse to create ghost teams for odd scheduling situations, instead I'll 
think of a
way of marking the sitting-over-team. We need to making tours compatible when
converting them to other types.

Original comment by Nimda...@gmail.com on 10 Mar 2009 at 2:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
There. Done. Check newest revision.

Also, I'm sorry, there was a little bug in the tour type changing mechanism - 
it too
works now.

Original comment by Nimda...@gmail.com on 10 Mar 2009 at 3:26

GoogleCodeExporter commented 8 years ago

Original comment by Nimda...@gmail.com on 13 Mar 2009 at 1:07

GoogleCodeExporter commented 8 years ago
You're working hard, Nicholas. Loads of fixed enhancements lately. :-D

This is a good change.

/Daniel

Original comment by blodae@gmail.com on 13 Mar 2009 at 9:00