ntbloom / gamewinner

college bball bracket predictor -- bring your own algo
GNU General Public License v3.0
1 stars 1 forks source link

Adding Evan Miya data and a few new strategies #3

Closed seth127 closed 1 year ago

seth127 commented 1 year ago

The main code/data update in here is adding data from the "Team Ratings" tab in evanmiya.com. Related to that:

Also added my first draft of a strategy, using the Evan Miya data, here. Again, this is probably a bit busted syntactically, but it should be close.

No tests yet for anything but I can add some before merging if you'd like.

ntbloom commented 1 year ago

This looks awesome. We'll have to run it through the predictor and see how things look. This is somewhat blocked by not having a way to pretty-print the brackets yet, but that's pretty much the last thing we need to get done.

Let's stick with the original plan where all of the code in Bracket.create() is left untouched on this PR so we can keep the library as generic as possible. We should probably go ahead and make a strategies/evanmiya/ directory with a base class that implements all the data loading (your team_data variable). From there we can make subclasses that interpret the data differently, for example your slothfire_steady strategy. The way this was designed was so that everything in Bracket._load_data_evanmiya() should get called in slothfire_steady.prepare(), in other words, after the brackets have already been loaded but when we actually start playing the brackets out.

This is all probably blocked by the current method signatures for IStrategy.prepare() and IStrategy.adjust(), so that may be the first place we'll start if we get a chance to pair up this weekend.

As for tests, I can make a generic test against any strategy that asserts that it can predict a legal bracket with the 2022 teams.

Great work all around.