Show HN: March Madness for Hackers
codersbracket.com
codersbracket.com
It's March Madness brackets but instead of picking teams, people can write code that will automatically generate their bracket for them. Our students have raised some money and are donating it all to code-learning organizations (CodeNow, Code.org, GirlsWhoCode).
Would be cool to run your algorithm against previous years to see how it would have done so you can refine it before submitting.
I'm imagining coloring the final bracket green/red for correctly/incorrectly predicted games in the simulation.
function (game, team1, team2) {
var winner_team = "Connecticut";
if (team1.name == winner_team) {
team1.winsGame();
} else if (team2.name == winner_team) {
team2.winsGame();
} else if (team1.seed > team2.seed) {
team2.winsGame();
} else if (team2.seed == "12") {
team2.winsGame();
} else {
team1.winsGame();
}
}Also, this would mean 12 seeds would go all the way anyway, you're not limiting it to the first round only.
Typically, variance in brackets is based on the upsets picked... so by making those more visible, it would make it easier for a human to more quickly digest the content.
Just a thought. But regardless, awesome idea. Well done!
so, is there source available?
Regardless, very cool concept and execution.
Some small comments:
I found the tutorial video painfully slow, but maybe you're targeting beginning programmers. All I was looking for was-- what's the language, what's the api.
The determining function could easily be a pure function. I.e., it could designate the winner by returning true, or false, or an enum/constant.
Actually, I think I would prefer this API:
function (team) { return team.off_reb * team.win_pct; }
And then play the teams by calculating the scores for each team and comparing them. But then of course, you can't have different scores depending on the opponent. I wouldn't use that information, but perhaps others would.
Full disclosure: I released this site a few weeks ago, mostly as a side project. I submitted to Show HN but it didn't get much traction. Might be of use though.
eg team: http://madness.io/teams/fak.json eg player: http://madness.io/players/1772.json eg matchup: http://madness.io/matchup/dae/vs/oad/1395332100.json
I just saw this today and got pretty interested. I was interested in implementing a 'weighted' scoring function, but needed a way to save state somehow. I ended up finding a pretty fun solution using the console. It's really fun to play with the weights and see how the bracket changes!
I'd be very interested in the data and the code behind the generator function. I'd love to integrate it with my bracket-generator module (which is very basic and only does lower seed, higher seed, and random currently).
I'm assuming it's a negative and it really means that turnovers is how many times they actually turn the ball over.
function(game, team1, team2){
if (team1.rpi > team2.rpi) {
team2.winsGame();
} else {
team1.winsGame();
}
}I want to custom build from a known index via ESPN but don't if the team objects hold all the stats necessary.
There's no way for me to "verify" a mobile number without agreeing to marketing txts. There's no way for me to create a bracket without "verifying" a mobile number.
Yeah, no.
And thus ends my 15 years of using the site for this, with an angry feeling on my side. Well done, Yahoo.
I'm glad I have your site to use now.