Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cody-scott/jje_automation
https://github.com/cody-scott/jje_automation
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cody-scott/jje_automation
- Owner: cody-scott
- Created: 2019-11-20T02:07:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T04:08:28.000Z (almost 3 years ago)
- Last Synced: 2024-04-18T22:01:18.223Z (7 months ago)
- Language: Python
- Size: 7.88 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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 categoryBy 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.