Coder Social home page Coder Social logo

fantasy-baseball-ai's Introduction

fantasy-baseball-ai

Experimenting with a genetic algorithm to optimize player valuation for fantasy baseball drafts.

Teams use their individual "opinions" to determine player values based on the player's statistics. Teams that perform well in the league advance to the next round and are also mutated. Randomly generated teams also join the league in order to introduce new strategies.

Below is a sample output of the winning team's valuation weights over 500 generations for a simple league with 10 teams, 10 players per team. The only Roto categories are R, HR, RBI, and SB.

Sample Sims

(Image taken around this commit)

To me this looks like there are central tendencies for each category, however(!), when too many teams adopt a similar strategy, the league becomes vulnerable to an upstart team with different valuation opinions. This different strategy does not work as well when other teams adopt it and the league trends back toward orthodox valuations.

TODO:

  • Introduce pitchers and pitching stats.
  • Add positional constraints to team rosters.
  • Allow teams to consider their current roster construction when choosing a new player.
  • ...
  • In the long run an auction draft instead of a snake draft would be very cool!

fantasy-baseball-ai's People

Contributors

bsmiller25 avatar

Stargazers

actuarial.tools avatar Jimmy Briggs avatar Joey Patronik avatar Michael Gruen avatar Michael Porten 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.