3 ms·
Show HN: Basketball Play Designer
In a company hackathon this weekend, I thought it would be fun to build a basketball play designer. Essentially, you enter some information about the type of play you want, and it generates a play following these requirements.
I was imagining it might be useful for stuff like:
1. Designing personalized plays for first-time coaches: "Give me a play that gets my shooting guard an open three-pointer. My shooting guard shoots the best from the right wing, and my point guard has a weak left hand. My center sets great screens, so have my center set an off-ball screen for my shooting guard."
2. Brainstorming novel plays for long-time coaches: "Generate a novel play out of the UCLA set."
It is loaded in with an example play, so make sure to hit the buttons to generate new plays with the entered information. The animation generation is based on the play-by-play and is a bit finicky, so you can try to generate new play-by-plays/animations if the first ones don't work well. It's still a bit rough around the edges, but I'd love to know what people think!
- tanishqkanc 3y agoholy shit. How does this work? Do you just have a big list?
- kmcgraw 3y agoHaha, it queries chatGPT. It required a good amount of prompt engineering to get reasonable results, and there's definitely plenty of room for improvement. Glad you liked it!
- tanishqkanc 3y agoHow does the play animation work? Do you get some sort of json blob output? How do you make sure it fits your schema?
- kmcgraw 3y agoI get it in the form of a Python array that I parse. I try to prompt-engineer to make sure that it is returned in the expected form, but you could probably try to break it with specific inputs.
- kmcgraw 3y agoIf anyone knows of any basketball forums where I should show this, please let me know!