Jump to content

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.

Link to comment
https://forums.phpfreaks.com/topic/182363-tournament-brackets-double-elimination/
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.

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.

 

 

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.

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.

 

 

 

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.

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.

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.

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.

 

 

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

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...

that being said, are there any other programs out there that do this?

 

I haven't found any myself...

 

I lied... http://www.northbyte.com/index.php?lang=eng&page=tourneymaster seems to do it...

 

but i haven't been able to find an open source one

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.

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

 

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

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...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.