Jump to content

Archived

This topic is now archived and is closed to further replies.

summerpewp

Tournament Brackets (Double Elimination)?

Recommended Posts

Is making a double elimination tournament style bracket system capable of being done in php?

 

After dealing with numerous very well qualified programmers to only turn down the project due to difficulty or lack of a solution I am curious if anyone has figured this out.

 

I have run across a few sites that have some programs but all turn up to have some issues with the pairing of teams.

 

Please let me know! If you know the solution, we can work something out as far as payment. This is not a looking for work post, but merely a "can it be done" and if so and you are willing to share the info, it would be greatly helpful.

Share this post


Link to post
Share on other sites

I am working on a system such as this if I understand you correctly.  PM me.

Share this post


Link to post
Share on other sites

Nearly anything that can be done server-side is doable with php as it is turing complete, including tournament systems. We can help you figure out how to make it if you work to make it yourself and ask small questions as you go (things like "how do I do it?" are unlikely to be answered).

 

If you feel like asking someone to make it for you, hop on over to the freelance forums to ask for someone to help you there. I'd refrain from going into too much troubleshooting over PMs as it takes away from the general knowledge available and because it is against the rules (for the before mentioned reason), not that you would get in trouble for it.

Share this post


Link to post
Share on other sites

I personally am not qualified to program this. I do not have enough experience with php.

 

The programmers I have all ran into the same problem with the pairing of the losers bracket on the number of players not being a factor of 2 (which makes a perfect bracket) 2, 4, 8, 16, 32, 64, etc.

 

 

Share this post


Link to post
Share on other sites

Bump, just curious if there is any mathematical formulas for this?

 

That would give me a large step forward!

Share this post


Link to post
Share on other sites

The way I understand a double elimination tournament is that you start with x amount of teams (with x being equal to a power of 2), those teams all play a match so you have x/2 matches. The winners form the upper/winners bracket and the losers form the lower/losers bracket. They then proceed like two independent single elimination tournaments untill dwindled down to a winner of each bracket. I know from back when I used to participate/follow e-sports the 2 winners would then play each other, with the team from the lower bracket needing to win two and the team/player from the upper bracket only needing one. Whether thats standard I don't know.

 

If the number of teams is not a power of 2, then you introduce a random bye in the first round, after than point there should be a multiple of 2 teams left in the tournament.

Share this post


Link to post
Share on other sites

Yeah you have a general understanding. It is only complicated when you start issueing the bye's (people who sit out due to not having anyone to play, which is also used to re-balance the brackets)

 

For example,

 

with 5 players, it would look like this:

 

                Team 1 --

                                Team 1 --

                Team 2 --

                                                  Team 3

                Team 3 --

Team 4 --                 Team 3 --

                Team 4 --

Team 5 --

 

Now this seems easy and is very easily done in single elimination. But when you move to double elimination it gets more complicated. I have the single elimination done, but once it gets to double elimination , thats where it all goes crazy.

 

 

 

Share this post


Link to post
Share on other sites

I cant help with programming as I dont have a club ... but I do run tournaments (judo) using the double elimination system, so I might be able to help help you understand how it works ... PM me if interested :)

Share this post


Link to post
Share on other sites

I see what you mean, it does get a bit more complicated when the numbers aren't x^2. I've not sat down and worked it out, but does it work if you pad the fixtures with BYES? Looking at your diagram I don't think it does, as you appear to play the fewer game earlier to pad the later fixtures which makes more sense. I'll think about it see what I can come up with. Seems like the kind of thread Daniel0 might chip in on, he tends to be pretty good on the maths.

 

Round 1

1. Team 1 v Team 2

2. Team 3 v Team 4

3. Team 5 v BYE

4. BYE v BYE

 

Round 2

Upper

5. (Team 1 or Team 2) v (Team 3 or Team 4)

6. Team 5 v BYE

Lower

5. (Team 1 or Team 2) v (Team 3 or Team 4)

6. BYE

 

Etc.

Share this post


Link to post
Share on other sites

well another factor into the losers bracket is it doesn't look anything like the winners bracket.

 

the top half looks standard ... 1 winner 1 loser that that winner plays another winner....

 

but when you get to the losers half

 

1 loser plays 1 loser, 1 is eliminated.

 

That loser moves foward, and plays another loser, not the one that wins the next match.. but instead the next loser in the winners bracket.

 

It gets VERY complicated at this point....

 

NSB-doubleelim-draw-2004.png

 

now factor in the bye's, and game is over! heh, thats where it gets insanely complex and hard to manage with code.

Share this post


Link to post
Share on other sites

Oh crap yer, your right, I forgot to factor in the fact that the loser from the upper bracket gets dropped down to the lower bracket For another chance. Double eliminations are a little foreign to me as they aren't really used in any (common/well known) tournaments here. The only reason I had a vague idea of what your talking about is because of Counter-Strike.

Share this post


Link to post
Share on other sites

After a year of searching for a programmer capable of doing this and all of them not finding a solution I posted here in the hopes that someone here knows a solution or could help figure out the problem everyone was running into.

 

 

Share this post


Link to post
Share on other sites

1/4 final  semi final Final

 

team 1

              team 1

team 5

                              team 1

team 3

              team 3

team 7

                                              team 1

team 2

              team 2

team 6

                            team 2

team 4

              team 4

team 8

 

FIGHT FOR 3rd PLACE

 

team 5

            team 5

team 7              team 4

            team 4

team 6                            Team 3

              team 6

team 8                team 3

              team 3

 

This is how to seed players ... if your not that bothered, then u can put them in randomly ... but following the numbers, any byes go in the last numbers, i.e. if you have 7 teams, them "team 8" would be a bye. 

 

 

Every team gets at least two matches.  Teams 3 and 4 drop down into the second round of the losers as semi finalists.  This is for 8 teams, but I can go up to 64 teams.

 

Hope that helps a little bit xxxx

 

PS: Team 1 - Gold

      Team 2 - Silver

      Team 3 - Bronze

Share this post


Link to post
Share on other sites

that example shown there is not for double elimination ...

 

that is simple a ranking system to show the 1st, 2nd, 3rd, 4th places in a single elimination tournament. This i am not having a problem with...

 

Double elimination, where each player has to lose 2 times to be kicked out...

Share this post


Link to post
Share on other sites

You do have to lose 2 fights to be out ... trust me, it happens to me all the time!!

Share this post


Link to post
Share on other sites

now factor in a bye for the losers bracket....

 

that is where i get lost... i can manually draw them no problem and run these tournaments, but the coding behind this mechanic is what is the issue.

Share this post


Link to post
Share on other sites

Is making a double elimination tournament style bracket system capable of being done in php?

 

Semi-off-topic: PHP is Turing complete, so yes, you can. Anything you could write in another programming language, you could write in PHP.

Share this post


Link to post
Share on other sites

I could be wrong but it seems to me there is at least some kind of difference between the type of 'double elimination' you are both (gemmerz and summerpewp) talking about.

 

@gemmerz - Your version assumes that once you are in the lower bracket the highest result you can expect is silver.

@summerpewp - Your version means that you can still win even from the lower bracket.

 

Technically the logic probably isn't that different to start with, they both seem to act the same, but there is a slight difference at the end. By the way, search google for 'double elimation software' and you'll find there are programs that do it. I still need to get round to adding single elimination support to my pool league site, keep putting that off because I'm not sure how it will fit in with what I already have. If I get bored tomorrow I might have a look at this again see what I can come up with.

Share this post


Link to post
Share on other sites

now factor in a bye for the losers bracket....

 

:wtf:

You dont get a bye in the losers bracket ... all the byes happen in the top bracket. 

 

I'll leave it at that, was just trying to help  :-\

 

 

Share this post


Link to post
Share on other sites

The highest result you can get if u lose a match is 3rd.  To win, you have to win every fight, to get silver, you can only lose to the winner.  Its the only fair way, other than pools.

Share this post


Link to post
Share on other sites

in a normal double elimination, that i'm aware of... you have to lose 2 times before you are eliminated from the tournament.

 

If you lose the first game just because you aren't warmed up or what ever, you still have a chance to prove yourself.

 

If you end up making it to the winner of the losers bracket, you face the winner of the winners bracket. If the losers bracket wins there is another face off since it is double elimination the person in the winners bracket has a chance to prove himself one more time.

 

If he loses again, the obvious winner should be the person who just started off weak.

 

You can not issue all the byes in the winners bracket accurately enough to do double elimination, because those who are not on a bye still have to play... and that means there is going to make the losers bracket uneven.

 

13teamsdoubleeliminationprint.html

 

Share this post


Link to post
Share on other sites

You do it whatever way you want to mate, my way is the fairest way which is why it is used internationally.

 

If you dont get warmed up for your first fight, thats your fault, bronze or nothing!!

 

If you do it my way, all the byes are in the first bracket.  Much easier, Much fairer ...  :shrug:

 

http://www.britishjudo.org.uk/competitions/guidancedocs.php

Share this post


Link to post
Share on other sites

yeah, just 2 different versions, thats not the debate of this topic :)

 

The main reason I am posting is to know if there is a way or any one know of a source of this that can be easily reviewed to program a working auto-generating bracket system for double elimination.

 

It seems to be a complex code for every programmer i have managed to get my hands on to do this project.

 

They all stop when it comes to this part because its over their heads. Now these programmers are good and can code fairly well, but can't wrap their heads around this part :( not sure what the problem is...

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.