Giter Club home page Giter Club logo

jje_automation's Introduction

Fantasy Hockey Solver

Solving the optimal placement of players and rosters using Google's OR-Tools.

Constraints

Based on the following input constraints, how should you place players to optimize your fantasy team? Goal is to maximize the point categories

  • 3 LW/C/RW, 5 D, 1 Util (rookie), 3 on the Bench, and 1 IR
  • Each player can only be in 1 position
  • Each player can only hold the positions defined by their position category

By assigning each players possible positions as a boolean variable, the goal is to maximize the placement of players and their stats.

Model

Based on the placed positions, the BoolVar will take on a 1 or a 0. By multiplying this by the players stats, we can maximize the sum of the categories.

To account for an abnormally skewed category (Hits), the data is normalized between 0 and 100, and cast to an Int.

Un-attainable positions for a player (a players possible positions is a C but the category is a LW) gets an IntVar between 0 and 0. This forces the value to be excluded (0*0=0).

Usage

To access the Yahoo API, you must get the client ID and secret from the Yahoo Developer Network.

Then deploy to your platform, i chose Deta. Add requirments of the .detaenv to deta deploy

Update the appropriate environment variables in a .env file.

Run main.py to run the program. Results will print and be saved to Deta Drive.

jje_automation's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.