# March Madness

I just created a random bracket generator.

Each time you load the page a new random bracket comes up.

Each matchup is decided by a very simple weighted algorithm:

```
Team Score = sqrt(Team Seed) * <random value>
```

For each matchup, the score is calculated for both teams. Whichever team has the lowest score moves on to the next round.

The page should be printable.

Enjoy!

EDIT: The above calculation was a little too loose. It meant that 1 out of 4 matchups between 1 seeds and 16 seeds would be an upset. So I changed it to the following:

```
Team Score = (30 + Seed^2)*<random value>
```

This led to a little more realistic match ups, where 9 times out of 10, a 1 seed would beat a 16 seed, a 1 seed would beat a 2 seed 10% more often than an upset, and an 8 seed would win against a 9 seed 20% more often.

I'm still playing with it, but as of right now that is the algorithm being used.

comments powered by Disqus