Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some sportState live sim for basketball #464

Open
hopedonn opened this issue Feb 16, 2024 · 1 comment
Open

Some sportState live sim for basketball #464

hopedonn opened this issue Feb 16, 2024 · 1 comment

Comments

@hopedonn
Copy link

This is in reference to
https://github.com/zengm-games/zengm/blob/d4ad5f2ac58c069e86cb5606163c4162fb565633/TODO#L99C1-L99C47
I believe that I may be able to complete this.

I anticipate having to make a component such as a BoxScore.probability.basketball.tsx which can be placed within BoxScore.basketball.tsx that will take perhaps the playbyplaylogger of the game and the two TeamGameSim objects and compare stats between the two teams to determine a baseline win probability and change depending on current score and current stats of the game.
gm score
Could maybe use parts of how the over under is calculated though I currently cant find how it is implemented.

Additionally, should I was thinking I would something similar to PlayerGraphs/ScatterPlot.tsx to graph the points.

Guidance would be apprecaited! Thank you.

@dumbmatter
Copy link
Member

I appreciate your interest, but I recommend you don't do this, it's too difficult! Some complications:

  • Same feature should exist for all 4 sports
  • It's not just clock and score that matter, it's all the "state" of the game, such as who has the ball, which player is shooting FTs, how many timeouts left, etc.
  • Chart needs to handle multiple events happening at the same time on the x-axis (if the x-axis is game clock) such as FTs with a stopped clock
  • Live sim code is pretty messy, not the easiest thing to work at. Might need some serious refactoring to give you access to the info you need to calculate a win probability
  • My wife just had a baby so I am less available than normal to help

So this is probably something better for me to do myself eventually.

Now in theory if you come up with something that solves all those edge cases and any others that might exist, that'd be fantastic. But it's a big complicated task.

Also, for this and any other contribution, make sure you're okay with the license (not open source) and CLA https://github.com/zengm-games/zengm/blob/master/README.md#license-and-contributor-license-agreement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants