Re:Show HN: A basketball hoop to maximize shots that go in [...
by ericvolp12 on Friday April 17, 2020 @10:15PM
(#22904797)
This was really well explained and interesting.
Funnily enough I'm pretty sure this is a really similar method to urinal design, so if this whole basketball thing doesn't work out for ya, you could always work for American Standard...
Re:Show HN: A basketball hoop to maximize shots that go in [...
by rurban on Saturday April 18, 2020 @05:19AM
(#22906394)
Similar methods exists for all kinds of engineering problems, like architecture (form follows function), roofs, bridges, city planning, or just the economy.
The optimal form is always an optimization problem. Just define the constraints.
Maybe the most famous example is Gaudi calculating the form of the roofs of the Sagrada Familia, and then Frei Otto for the Munich Olympics. City planning is easier as their is no gravity, just more constraints. Think of SimCity run in a simulation with feedback loops.
The best planning approach is always prolog-like. Define the facts and rules, and the forms will fall out eventually by itself. Then optimize the solutions iteratively according to cost functions. It's called OR, operations research.
I did a lot of that with free-forms, also even simply office layouts, when I worked as architect. We even sold CAD programs to special manifacturers to design a good roof or other free-form shapes. Like for Disney.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by dhosek on Saturday April 18, 2020 @01:22PM
(#22909280)
Speaking of Disney and architecture and parabolic shapes, apparently when the Disney concert hall was first built, the curved shapes of the building acted as parabolic reflectors which focused on nearby apartment buildings. They had to sand the panels to reduce the reflectivity because they were heating the apartments to as much as 140°F.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by rurban on Sunday April 19, 2020 @06:42AM
(#22914867)
Good example. You need roughen it also for better sound quality on the inside.
For Disney I had develop lot of linear algebra optimizations for smoothing which went over my head mostly, so I used symbolic solvers.
We don't have much sound optimization CAD programs, so we worked with light as replacement for sound, and looked at the reflections with raytracers. For the big, expensive concert halls and opera houses.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by remarkEon on Saturday April 18, 2020 @03:00AM
(#22905875)
Upvoted this because I'm tired of peeing on urinals in bars and restaurants that have flat walls, and every time I do I think "gosh don't these guys have any engineers on their payroll?".
Re:Show HN: A basketball hoop to maximize shots that go in [...
by stillsut on Saturday April 18, 2020 @09:15AM
(#22907488)
The design idea is also similar to the the original stealth fighter design, the "hopeless diamond"[0], in that it's optimized to bounce all possible radar waves away from returning to their receiver.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by hliyan on Friday April 17, 2020 @08:30PM
(#22904297)
Really impressed with the use of Monte Carlo method. A while back I ran into some resistance trying to advocate simpler statistical methods to solve a problem domain similar to this, while the team in question repeatedly wanted to reach for a machine learning solution. I'd love to know if I was wrong here. In my mind, when an algorithmic or heuristic path to a solution is available, we should attempt it first before reaching for ML.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by Taek on Friday April 17, 2020 @09:05PM
(#22904468)
A common trap in tech is to reach for the fanciest tool instead of the simplest. The best engineering often comes from mastery of the simple tools, and the most beautiful engineering is the one that makes you say 'that's so obvious, why didn't anyone ever come up with that before?'
Re:Show HN: A basketball hoop to maximize shots that go in [...
by IgorPartola on Friday April 17, 2020 @09:30PM
(#22904582)
One of my favorite software solutions that I came up with was “human learning” powered. A few years ago I was working as the engineering manager at a small company. I had 8 other people who I was in charge of and we had moved to a new office in the middle of this. Our team took up two rooms in the office and I had to figure out who would be sitting where. I had some preconceived notions of who would be productive together, who would annoy each other, etc., but there were enough possible combinations to make this a large enough search space.
So I wrote a very simple python script that would randomly generate layouts of who would sit in each room and next to whom. Every time it gave me a result I scanned it for conditions that would make it not work and add a rule to skip such configurations. After about six such edits I got a layout I thought was acceptable. The team as far as I know was happy and nobody questioned it for the entire time we were there. This saved me time because I didn’t have to pre-program all the conditions, only add ones I had already seen not work. Saved both CPU and brain cycles, so to speak.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by npunt on Friday April 17, 2020 @10:14PM
(#22904792)
This is great! In a way it's like the output was a question rather than an answer.
This is quite similar to education research on Teachable Agents [1], which is an embodiment of the idea that to know something you must be able to teach it to someone else. In Teachable Agents you teach the computer rules (e.g. how ecosystems work), and then it gets a quiz where it compares the output to the right answer. When its wrong, you as the teacher must figure out whether the rules you taught it were correct and/or if it needs more rules.
Teachable Agents works for things where there's a right or wrong answer, because the computer is doing the test proctoring. But in your method the human is doing that, and I think it works quite well for things of a more qualitative nature like the arts, with the human playing the role of the critic or curator.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by maxerickson on Saturday April 18, 2020 @09:32AM
(#22907579)
They are heavily based on divisions and recent seasons.
(For example, in the NFL, the teams in each division play each other twice, and then get the rest of their games by rotating through teams from the rest of the league)
Re:Show HN: A basketball hoop to maximize shots that go in [...
by mlthoughts2018 on Friday April 17, 2020 @09:45PM
(#22904646)
Another common trap is to believe a widely known simple method must be better just because you are unfamiliar with state of the art research.
Many times people have specifically researched why a certain method is better than status quo in practice, on real world data with real world operating constraints.
A good example is the paper “Let’s Put the Garbage-Can Regressions and Garbage-Can Probits Where They Belong” - explain an extremely common and hugely severe problem with “garbage can” regression models.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by ludamad on Friday April 17, 2020 @09:27PM
(#22904573)
The first arduous task of a ML solution is to get on parity with computing basic statistics on the data coming in, and there are many fail points before and after that point. Saying 'we need a ML solution' is a lot like saying 'we need to write this in assembly'
Re:Show HN: A basketball hoop to maximize shots that go in [...
by frobozz on Saturday April 18, 2020 @06:06AM
(#22906627)
Absolutely!
Try writing a simple calculator app with ML and you won't even have marked up enough training data by the time I have written it algorithmically. When it's finished, the ML one won't be as reliable.
I've been involved in a few projects where ML was a candidate approach. Mostly the answer was just to write down what we already know about the problem domain instead.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by dsaavy on Friday April 17, 2020 @08:25PM
(#22904276)
I put up a giant wall of these in my home and they're incredibly useful. You can build any type of contraption and throw a cleat on the back of it and boom, just put it on the big wall. Reconfigure it every month, build new things to mount up there, it truly is simple and versatile. French cleats truly are terrific.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by zimpenfish on Saturday April 18, 2020 @02:11AM
(#22905708)
I probably wouldn't have known if I hadn't wandered into woodworking YouTube - it's a common device for workshop walls, etc., for easily switchable configurations of shelves and whatnots[1].
Re:Show HN: A basketball hoop to maximize shots that go in [...
by dacohenii on Friday April 17, 2020 @03:03PM
(#22901887)
I love this! I was expecting something more like Mark Rober's movign dartboard [0], which is super cool, but this is even more interesting, because of the way you used software to come up with a general solution in advance.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by gorgoiler on Saturday April 18, 2020 @05:27AM
(#22906422)
Mark Rober is an interesting character. It feels like he pitches himself as a crazy inventor guy but it seems like he’s more akin to the head of a design laboratory that employs many other talented people.
It’s not like he doesn’t acknowledge the other crazy-inventor people he commissions though, and I certainly don’t mean to paint him as a fraud.
When he says things like, 1m45s into a video on a steerable bowling ball “in the spirit of full disclosure this is all down to [named co-collaborator]’s work” it feels like that use of full disclosure in the sense of I would rather not reveal this but I am legally obliged to.
No offense to Rober or that particular collaborator. For all I know, he just didn’t want the publicity. Rober is very good and it’s almost like I feel aggrieved that if only his style was ever so slightly different he’d win my complete instead of partial admiration.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by avilay on Friday April 17, 2020 @04:16PM
(#22902565)
That was a pretty cool video! I loved how he used 3D Monte-Carlo and side-stepped all the complicated math. I wonder if he was using a Physics engine like Bullet or ODE to calculate the simulated trajectories. Also, a good intermediate step might've been to build the backboard in something like Unity and shoot some hoops to catch the radius error before actually machining it out.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by remcob on Friday April 17, 2020 @06:47PM
(#22903705)
> Physics engine like Bullet or ODE to calculate the simulated trajectories
Probably not, the trajectories are simple parabolic and you can assume perfect elastic collision. Easy enough to implement, compared to interfacing with a physics engine. In fact, it sounded like he approximated the ball by a point and ignored the radius.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by Gravyness on Friday April 17, 2020 @07:57PM
(#22904131)
While interfacing a physics engine is hard, I feel like it would be hard to forget to add the radius in a physics simulation, making mistakes like this rather difficult.
So yeah, you can reinvent the wheel but using specialized tools gets the job done too, usually with less painful mistakes, but that's the price to pay for the lack of learning you get with the tool.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by wtallis on Friday April 17, 2020 @09:01PM
(#22904448)
Would a physics engine actually make it any easier to solve this inverse problem? Simulating where the ball ends up relative to the hoop after bouncing off the board is the kind of forward problem that I tend to think of physics engines as designed for, but the problem here is to (repeatedly) determine what angle of board would yield the desired post-bounce trajectory. Does something like Bullet have a flexible enough inverse kinematics solver to handle this kind of problem?
Re:Show HN: A basketball hoop to maximize shots that go in [...
by wtallis on Saturday April 18, 2020 @04:24AM
(#22906187)
There are obvious ways that the physics engine might be able to capture more effects than a simple analytic solution of parabolic trajectories. But if it only lets you run the simulation forward to get a trajectory from initial conditions, then you now have a numeric optimization problem as the body of the inner loop of another optimization problem.
If the physics engine can't efficiently solve the inverse problem here, it is probably only well-suited for simulating a final solution for validation, not iterating over the rather large space of possible shot trajectories times possible backboard angles at the point of impact.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by wtallis on Saturday April 18, 2020 @02:37PM
(#22910007)
It's a straightforward integration to get from initial conditions of the ball throw and backboard angle to the post-bounce trajectory. Physics engines like Bullet will get you that solution very quickly. But determining which backboard angle puts the ball in the center of the hoop is not as straightforward if your physics engine is only designed to do numeric integration of the equations of motion to move a simulation forward in time. You have to run the simulation a few hundred times with different backboard angles to determine which setup puts the ball where you want it.
And that process needs to be done for all possible incoming ball trajectories that would hit that point of the backboard in order to figure out what backboard angle will maximize the number of shots that go in.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by perlgeek on Saturday April 18, 2020 @08:37AM
(#22907294)
He scrolled over the code pretty quickly, but it looks like python + numpy, didn't see any references to other major tools (could've easily missed them though).
Re:Show HN: A basketball hoop to maximize shots that go in [...
by kidintech on Saturday April 18, 2020 @03:44AM
(#22906030)
Very out of left field, but how does one start doing these kind of things?
My background is in CS and math, and I could have come up with and built everything up to exporting the mesh into triangles, but would have needed months of google searching and trial and error to do the actual "machining" part of things.
And then even if I went through the painful process of learning it on the job for this task, the learned skills would probably not transfer very well into the next adventure. Additionally, I imagine the machine used in the video is fairly expensive and not worth purchasing for one experiment.
I'm asking this because I find these kind of builds fascinating, but I'm always humbled about my skills when I think about the transition from digital to material.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by chrisco255 on Saturday April 18, 2020 @03:51AM
(#22906056)
YouTube videos are one of the best ways to learn mechanical/material skills. Just start. You'll suck at first. Keep at it and eventually you'll suck a little less. One day you'll be mediocre. And if you keep at it you'll be skilled.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by gnramires on Saturday April 18, 2020 @12:31PM
(#22908808)
Can confirm. For general knowledge I recommend two fantastic channels: (1) Click Spring (2) Matthias Wandel. They're always doing interesting things and usually some technique comes up in the videos that I didn't know of. There are probably countless others.
Youtube really shines in this because there is much to see happening. Much of the information is visual and mechanical on how to do things well (or at all).
You generally need lots of tools to build stuff though (you can sometimes trade time for tool cost), but these days finding an equivalent to a maker space or hacker space shouldn't be too difficult.
* ClickSpring's clock series is one of my favorite video series ever.
Wandel is a little unconventional that he builds many of his own tools, but I find he's quite practical and insightful in doing things.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by gorgoiler on Saturday April 18, 2020 @09:06AM
(#22907435)
Do you mean the reference to four-by-two timber. It’s not really measurement when it’s a standard size like that. More like a well known discrete unit like a pint of beer or a 54” pizza.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by gorgoiler on Saturday April 18, 2020 @09:24AM
(#22907541)
Oh right. With a precision caliper no less. Another video posted here the other day used the word thou (as in thousandth of an inch) which is a word I haven’t heard in a long time!
Re:Show HN: A basketball hoop to maximize shots that go in [...
by s0rce on Saturday April 18, 2020 @01:41PM
(#22909462)
Its frustrating. I'm a Canadian born and raised engineer/scientist working at a US-based medical device startup and I'm constantly converting between thou and microns and mm. Often stuff will be "in spec" for both, ex. 0.002" = 50um (assuming some tolerances for the part. Hopefully, we don't destroy any satellites by mixing the units up.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by remarkEon on Saturday April 18, 2020 @02:31AM
(#22905770)
Aside from the Apollo 13 in Real Time website, this is the coolest thing I've seen on the internet in the last 3 months.
Sent this to my brother, which of course precipitated a huge sibling argument about which player would've benefited more from this assuming we're talking about players that tend to shoot jump shots. I'll let you guys know who wins.
Edit: We mostly disagree on the type of shot that certain players make and which would be more advantageous here. And credit to the creator, he alludes to this early in the video where he talks about "line drive" vs "arc" shots.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by eagsalazar2 on Friday April 17, 2020 @11:00PM
(#22904992)
I want before/after shot %. Also someone should totally sell these. We already have short hero hoops, with this hoop we could all be Kobe every day, circus shots in the general direction, 55% fg%, legendary!
Re:Show HN: A basketball hoop to maximize shots that go in [...
by jasonheh on Friday April 17, 2020 @11:24PM
(#22905089)
It definitely felt that way to me.
When he was finding the optimal angle for a single sampled shot, that's the partial derivative of his probability of making the basket for that shot wrt the surface normal
at the backboard hit position (or something like that).
If you average all of those you get a gradient descent update.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by prodigyboi on Friday April 17, 2020 @09:04PM
(#22904466)
To say I’m impressed by the video and more specifically the algorithm would be the understatement of the century. This is amazing. Please let me buy one :)
Re:Show HN: A basketball hoop to maximize shots that go in [...
by contravariant on Friday April 17, 2020 @05:41PM
(#22903245)
If you fix the position of the 'thrower' and just throw them at ridiculous speeds so gravity doesn't matter you'd end up with a hyperbolic backboard.
So annoyingly for an 'optimal' solution you'd need to specify where people can throw from and how fast. Frankly you might as well just use a hyperbola with one foci on the hoop and the other on the middle of the court, or maybe a point slightly higher than the court itself as the balls will be coming in at a lower angle (or maybe even a downwards angle?).
Re:Show HN: A basketball hoop to maximize shots that go in [...
by mannykannot on Friday April 17, 2020 @08:23PM
(#22904258)
I would guess that if there is enough spin for the Magnus effect to be significant, it would also be significant with respect to the rebound, as the surfaces in contact are not frictionless. On the other hand, I am not sure there is much spin in most basketball shots, and, given a backboard designed without taking it into consideration, there would be no incentive to add spin.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by mannykannot on Friday April 17, 2020 @08:16PM
(#22904230)
I do not think you can make definite claims about optimality without putting it in the context of some probability distribution over all possible incoming trajectories etc.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by baddox on Friday April 17, 2020 @05:12PM
(#22903013)
I was wondering how you could get an analytical solution, but I think you’d have to define the problem much more rigorously to do so. As he mentions in the video, different basketball paths can contact the same point on the backboard from any number of angles, so it seems fairly clear that there is no perfect solution.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by aj7 on Saturday April 18, 2020 @12:46AM
(#22905392)
Red Auerbach knew something in real life.
If you bend the whole rim downward, even a little bit, it becomes a “sewer,” pro just-miss shots start going in. He would check the baskets, before each game, to make sure this wasn’t being used against the Celtics.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by milesvp on Friday April 17, 2020 @04:54PM
(#22902894)
Fun story. I was in college taking differential equations. And I was faithfully attempting to apply what I'd learned in class, and having a somewhat hard time at it (this was before I realized how useful matlab was). When I was doing some research on the side, and I learned that the vast majority of differential equations are unsolvable, you can only approximate an answer. After that, I was thouroughly annoyed at wasting time in a class doing all this math by hand, and having to assume the answer was of a form that was solvable (and, yes, many useful engineering diff eq are of a solvable form).
So, now to answer your question. I thought this backboard seemed like a problem that dish makers should be able to trivially solve, but getting to know the math, and modifying it enough to solve this particular problem can take more time than setting up a simple probabilistic simulation. And after my experience with diffeq, I'm happy with a quick and dirty approximate solution, and then moving on with your life. Then maybe you run into someone who knows the math and is motivated enough to apply it, and maybe you update your project then.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by dwightgunning on Friday April 17, 2020 @06:08PM
(#22903417)
Thanks for a great anecdote. While I feel I'm pretty good at recognising that "done is better than perfect", I'm not as good at realising when "near enough is good enough". For some reason approximations usually don't sit well with me... something I can work on for sure.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by milesvp on Friday April 17, 2020 @07:01PM
(#22903805)
Sorry, I didn't mean to imply it required diff eq to solve these parabolic equations. I merely meant to give an anecdote about one of the first times I felt truly betrayed by mathematics. A subject I'd previously held in the highest regard.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by aj7 on Saturday April 18, 2020 @12:54AM
(#22905417)
No it’s not. Parabolic antennas work well for a single particular parallel input beam. That’s why they’re on gimbals, and directed at the anticipated direction, or scanned back and forth. Here, he is attempting to image many different parabolic paths onto a small circle in the plane of the rim.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by baddox on Friday April 17, 2020 @05:15PM
(#22903039)
I commented something similar on the video, but I realized you would have to define the problem much more rigorously to get an analytical solution. The ball can hit a point from many angles, so doesn’t that mean there can’t be a perfect solution? If you define the problem with precise constraints that roughly match the paths that will tend to occur from real people shooting baskets, and ignore variables like ball spin that probably don’t matter much in practice, I would imagine there would be an analytical solution.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by mikorym on Saturday April 18, 2020 @01:49PM
(#22909541)
So I am guessing that the reason why this doesn't look like a sattelite dish is because 1) the focal point is not in the centre and 2) the ball doesn't rebound in straight lines.
Oh shoot, he does actually explain this exactly. He also mentions 3) speed of the ball. And then, 4) for lines that hit at the same point but with different trajectories and speeds, he takes the "average basketball shot".
The only other thing I am wondering about is what would happen if the ball were flat.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by jzwinck on Saturday April 18, 2020 @04:15AM
(#22906156)
The style of presentation, the manner of speaking, seems to be inspired by This Old Tony [0]. This is no bad thing. I wonder if Tony picked it up from somewhere else.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by baruch on Saturday April 18, 2020 @05:33AM
(#22906454)
He needs to do some more monte-carlo simulations on the jokes to get to the level of ToT. But it was a very nice presentation of the topic and a neat result.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by r00fus on Friday April 17, 2020 @03:22PM
(#22902088)
Clearly the hoop that minimizes shots is what exists at funfairs all over the world.
Would making the backboard convex make it near-impossible to hit? What about making the curve imperceptible so it's hard to notice it's helping/hurting?
Re:Show HN: A basketball hoop to maximize shots that go in [...
by nbardy on Friday April 17, 2020 @03:28PM
(#22902151)
The carnival hoops I've examined all have ellipsis shaped rims. Impossible to distinguish from a circle when observed from the front, but clearly squished if you walk around and get underneath it.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by JshWright on Friday April 17, 2020 @06:55PM
(#22903767)
Mark Rober (who is linked elsewhere in this thread for a dart board that does the same this as this backboard, but with active compensation) also did a video on how carnival games are rigged.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by minhazm on Friday April 17, 2020 @04:06PM
(#22902479)
That's if you hit the backboard. But you don't need to hit the backboard and plenty of people can normally make the shot without it. Funfairs / carnivals probably are doing something with the hoop itself.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by Wistar on Saturday April 18, 2020 @12:49PM
(#22908971)
This is very cool. As I watched the video, I began to think about a stupidly over-the-top version of the backstop that uses many real-time-deformable panels similar to the adaptive-optic mirrors used in advanced astronomical telescopes but informed to guide the ball by a machine vision view of the inbound ball in flight.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by lovetocode on Sunday April 19, 2020 @06:40AM
(#22914854)
I’m not really impressed. This only applies to shots directly taken from the free throw line . Make a basketball hoop that moves based on ball flight Now that would be impressive. I have seen someone on YouTube do that with a dart board.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by nitrogen on Saturday April 18, 2020 @12:48PM
(#22908961)
I really enjoyed the length and depth of this video. Though I wonder if a good hybrid strategy for YT popularity is to have a viral-edited video on a main channel, and more depth linked on a second channel.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by londons_explore on Saturday April 18, 2020 @12:03PM
(#22908600)
I think the results would have been much better if he'd taken into account the rotational inertia of the ball... It turns out that affects the bounce angle quite significantly...
Re:Show HN: A basketball hoop to maximize shots that go in [...
by chombier on Saturday April 18, 2020 @05:09AM
(#22906353)
nice work! you could probably speed the computation quite a lot by using a small deformation basis (e.g. using modal analysis) and optimize in this smaller space instead.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by jrockway on Friday April 17, 2020 @09:55PM
(#22904696)
You pick a random position and a random shot (angle, speed), see where it hits the backboard, and then change the angle of the backboard there to direct the ball through the rim after the bounce. Do this enough times, and you have a surface. (I don't know how the number work out, so there are probably points that have multiple values and surfaces with discontinuities. I guess you average the values at a given point and then smooth the surface, and call that "as good as possible".)
Re:Show HN: A basketball hoop to maximize shots that go in [...
by justinator on Friday April 17, 2020 @09:45PM
(#22904650)
Actually from the video, he miscalculated so it's optimized only when the basket is farther away then usual from the backboard. I would theorize that this may have made the solution work better, albeit unintentionally.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by nabla9 on Friday April 17, 2020 @03:33PM
(#22902222)
"Who is Monte Carlo?" Monte Carlo is for Europe what Las Vegas is for the US. The first name that comes to mind when you think gambling.
Monte Carlo method is repeated random sampling to obtain numerical results.
Monte Carlo algorithms are heuristic algorithms that solve problems with random process that can give wrong answers.
Las Vegas algorithms are algorithms that solve problems with randomness but get always correct result or knows that it failed. Runtime is finite.
Atlantic City algorithm is a probabilistic polynomial time algorithm that gives correct answer > 50% of the time (or 75% of the time by some definition).
Re:Show HN: A basketball hoop to maximize shots that go in [...
by milesvp on Friday April 17, 2020 @04:35PM
(#22902720)
I laughed out loud when he said this. I take for granted how much gambling knowledge I have (especially since I generally think gambling is stupid), but I thought everyone knew about Monte Carlo.
I'm going to have to look up Las Vegas algorithms though, this is the first I've heard of them. Course, it's been a while since I've broadly looked at the current state of probabilistic algorithms. Makes me think it might be time to step back and look at some more general theory, especially since some recent DSP work led me to look into particle filters in an attempt to estimate a pair of rotating phasors.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by numuliank on Friday April 17, 2020 @04:00PM
(#22902426)
Nope, expected something interesting, but this is based on a boring brute-force simulation.
He did hint at using a parabolic shape, like in satellite dishes. Why not use some actual calculus and differential equations to figure out the optimal parabolic-like shape here?
Re:Show HN: A basketball hoop to maximize shots that go in [...
by dang on Friday April 17, 2020 @06:17PM
(#22903486)
It's great that you know more, but can you share what you know without putting others or their work down? Doing the latter really poisons the well here.
A much better pattern than "Nope, expected something interesting" is to first affirm something that the author got right or did well, and then build on that with suggestions for refinement, further development, learning. There's plenty of opportunity to show how much you know that way, plus you won't also come across as an internet jerk.
Keep in mind that project creators and authors are often reading these threads, and one nasty comment makes more of an impression than the rest of a thread put together. A single bee sting is more memorable than a field of butterflies. It's too bad that it doesn't work the other way around, but the pattern is super clear. Even the thread the other day with the C Committee guys, which was one of the best technical threads HN has ever hosted, made this impression on them: "Wow, I had no idea people were so mad about locales" (not a direct quote). I hadn't noticed, and when I found the comments they didn't even seem that mad.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by OscarCunningham on Saturday April 18, 2020 @04:23AM
(#22906181)
There won't be a closed form answer because the optimal solution depends on the distribution of the angles and velocities of the shots coming toward the backboard, which will be a complicated real-life distribution.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by v37p on Friday April 17, 2020 @09:47PM
(#22904657)
How is it different from a Newton-Raphson approach, which requires you to make an initial guess as it iterates through several derivatives to get to the root?
Re:Show HN: A basketball hoop to maximize shots that go in [...
by Animats on Friday April 17, 2020 @06:32PM
(#22903602)
The first 10 seconds pretty much covers the subject.
It's not the hoop, it's the shape of the backboard, which is a reflector formed to focus the ball on the target.
Now, the really cool thing would to build a flat backboard with controlled bounce properties. Interesting 3D printing problem. That would look like an ordinary backboard but still focus bounces.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by hencq on Friday April 17, 2020 @05:42PM
(#22903258)
Maybe, but as he explains a normal parabola (like a satellite dish) wouldn't work, since the shots themselves are arced because of pesky gravity. I thought using a Monte Carlo analysis and finding a fixed point was actually a very clever way to solve it.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by carlob on Friday April 17, 2020 @06:36PM
(#22903634)
Yeah but the acceleration from gravity is constant so maybe there is just a (possibly non linear) change of coordinates that can be applied to the regular paraboloid.
Also a paraboloid would work only for rays that are parallel to one another.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by Misdicorl on Friday April 17, 2020 @05:47PM
(#22903275)
Depends on the importance of a couple effects that light is immune to (at least for an optics equation)
1) gravity post impact with backboard
2) impact angle for a given (start, backboard) tuple depend on velocity and launch angle for a basketball, but are always the same for light. Also the impact angle for the basketball and light are very different
Re:Show HN: A basketball hoop to maximize shots that go in [...
by mywittyname on Friday April 17, 2020 @06:24PM
(#22903537)
I think it's safe to ignore both of these factors at this scale. 1) The effects of gravity is bounded and negligible on the surface of the Earth. 2) (I suspect) the wideness of the launch angle and hoop size are probably directly proportional, so you could shape the back board based on a direct impact to get a point to center the hoop on. The hoop can only get so big and still be considered reasonable.
Re:Show HN: A basketball hoop to maximize shots that go in [...
by Misdicorl on Friday April 17, 2020 @08:16PM
(#22904232)
The effect of gravity on the surface of the Earth is hardly negligible!
And your intuition on the launch angle is just flat wrong. In fact, I believe it's one of the primary predictive factors in a shots success with a normal backboard!
Re:Show HN: A basketball hoop to maximize shots that go in [...
by mrspeaker on Friday April 17, 2020 @06:24PM
(#22903538)
I think you gotta take the radius of the ball into account - that's the only bit he messed up on. (And if we can just have any-old assumptions, then it seems like the optimal solution is to make the entire backboard a hoop!)
Re:Show HN: A basketball hoop to maximize shots that go in [...
by soheil on Friday April 17, 2020 @07:11PM
(#22903872)
I think within a range velocity and mass can be ignored ie. if the velocity is too small the ball won't reach the board to begin with and beyond a threshold most likely the bounce curve will depend almost exclusively on incident angle.
Funnily enough I'm pretty sure this is a really similar method to urinal design, so if this whole basketball thing doesn't work out for ya, you could always work for American Standard...
The optimal form is always an optimization problem. Just define the constraints. Maybe the most famous example is Gaudi calculating the form of the roofs of the Sagrada Familia, and then Frei Otto for the Munich Olympics. City planning is easier as their is no gravity, just more constraints. Think of SimCity run in a simulation with feedback loops.
The best planning approach is always prolog-like. Define the facts and rules, and the forms will fall out eventually by itself. Then optimize the solutions iteratively according to cost functions. It's called OR, operations research. I did a lot of that with free-forms, also even simply office layouts, when I worked as architect. We even sold CAD programs to special manifacturers to design a good roof or other free-form shapes. Like for Disney.
We don't have much sound optimization CAD programs, so we worked with light as replacement for sound, and looked at the reflections with raytracers. For the big, expensive concert halls and opera houses.
[0]: https://en.wikipedia.org/wiki/Lockheed_Have_Blue
So I wrote a very simple python script that would randomly generate layouts of who would sit in each room and next to whom. Every time it gave me a result I scanned it for conditions that would make it not work and add a rule to skip such configurations. After about six such edits I got a layout I thought was acceptable. The team as far as I know was happy and nobody questioned it for the entire time we were there. This saved me time because I didn’t have to pre-program all the conditions, only add ones I had already seen not work. Saved both CPU and brain cycles, so to speak.
This is quite similar to education research on Teachable Agents [1], which is an embodiment of the idea that to know something you must be able to teach it to someone else. In Teachable Agents you teach the computer rules (e.g. how ecosystems work), and then it gets a quiz where it compares the output to the right answer. When its wrong, you as the teacher must figure out whether the rules you taught it were correct and/or if it needs more rules.
Teachable Agents works for things where there's a right or wrong answer, because the computer is doing the test proctoring. But in your method the human is doing that, and I think it works quite well for things of a more qualitative nature like the arts, with the human playing the role of the critic or curator.
[1]: https://slate.com/technology/2015/04/teachable-agents-making...
- generate a couple examples
- see something wrong
- add a rule
- repeat
[0] https://www.youtube.com/watch?v=FvNRlE4E9QQ
(For example, in the NFL, the teams in each division play each other twice, and then get the rest of their games by rotating through teams from the rest of the league)
Many times people have specifically researched why a certain method is better than status quo in practice, on real world data with real world operating constraints.
A good example is the paper “Let’s Put the Garbage-Can Regressions and Garbage-Can Probits Where They Belong” - explain an extremely common and hugely severe problem with “garbage can” regression models.
http://www.saramitchell.org/achen04.pdf
Try writing a simple calculator app with ML and you won't even have marked up enough training data by the time I have written it algorithmically. When it's finished, the ML one won't be as reliable.
I've been involved in a few projects where ML was a candidate approach. Mostly the answer was just to write down what we already know about the problem domain instead.
[0] https://en.wikipedia.org/wiki/French_cleat
[1] e.g. https://www.youtube.com/watch?v=65n9h3tFpVg
[0] https://en.wikipedia.org/wiki/Molding_(decorative)#Picture_r...
Kudos!
It’s not like he doesn’t acknowledge the other crazy-inventor people he commissions though, and I certainly don’t mean to paint him as a fraud.
When he says things like, 1m45s into a video on a steerable bowling ball “in the spirit of full disclosure this is all down to [named co-collaborator]’s work” it feels like that use of full disclosure in the sense of I would rather not reveal this but I am legally obliged to.
No offense to Rober or that particular collaborator. For all I know, he just didn’t want the publicity. Rober is very good and it’s almost like I feel aggrieved that if only his style was ever so slightly different he’d win my complete instead of partial admiration.
edit: pasted the first yt result here: https://www.youtube.com/watch?v=MHTizZ_XcUM
Probably not, the trajectories are simple parabolic and you can assume perfect elastic collision. Easy enough to implement, compared to interfacing with a physics engine. In fact, it sounded like he approximated the ball by a point and ignored the radius.
So yeah, you can reinvent the wheel but using specialized tools gets the job done too, usually with less painful mistakes, but that's the price to pay for the lack of learning you get with the tool.
If the physics engine can't efficiently solve the inverse problem here, it is probably only well-suited for simulating a final solution for validation, not iterating over the rather large space of possible shot trajectories times possible backboard angles at the point of impact.
Isn't solving the physics problem a straightforward ODE integration?
And that process needs to be done for all possible incoming ball trajectories that would hit that point of the backboard in order to figure out what backboard angle will maximize the number of shots that go in.
Is it though? Isn't the final shape just a paraboloid, like a parabolic antenna with the hoop in the focal point?
My background is in CS and math, and I could have come up with and built everything up to exporting the mesh into triangles, but would have needed months of google searching and trial and error to do the actual "machining" part of things.
And then even if I went through the painful process of learning it on the job for this task, the learned skills would probably not transfer very well into the next adventure. Additionally, I imagine the machine used in the video is fairly expensive and not worth purchasing for one experiment.
I'm asking this because I find these kind of builds fascinating, but I'm always humbled about my skills when I think about the transition from digital to material.
Youtube really shines in this because there is much to see happening. Much of the information is visual and mechanical on how to do things well (or at all).
You generally need lots of tools to build stuff though (you can sometimes trade time for tool cost), but these days finding an equivalent to a maker space or hacker space shouldn't be too difficult.
* ClickSpring's clock series is one of my favorite video series ever.
Wandel is a little unconventional that he builds many of his own tools, but I find he's quite practical and insightful in doing things.
I've also never seen someone cut wood on their Tormach CNC. Seems to work well!
Sent this to my brother, which of course precipitated a huge sibling argument about which player would've benefited more from this assuming we're talking about players that tend to shoot jump shots. I'll let you guys know who wins.
Edit: We mostly disagree on the type of shot that certain players make and which would be more advantageous here. And credit to the creator, he alludes to this early in the video where he talks about "line drive" vs "arc" shots.
https://twitter.com/gregeganSF/status/1251390966356795392
When he was finding the optimal angle for a single sampled shot, that's the partial derivative of his probability of making the basket for that shot wrt the surface normal at the backboard hit position (or something like that).
If you average all of those you get a gradient descent update.
So annoyingly for an 'optimal' solution you'd need to specify where people can throw from and how fast. Frankly you might as well just use a hyperbola with one foci on the hoop and the other on the middle of the court, or maybe a point slightly higher than the court itself as the balls will be coming in at a lower angle (or maybe even a downwards angle?).
To err is human. To own it on YouTube, divine.
So, now to answer your question. I thought this backboard seemed like a problem that dish makers should be able to trivially solve, but getting to know the math, and modifying it enough to solve this particular problem can take more time than setting up a simple probabilistic simulation. And after my experience with diffeq, I'm happy with a quick and dirty approximate solution, and then moving on with your life. Then maybe you run into someone who knows the math and is motivated enough to apply it, and maybe you update your project then.
Perhaps it could be done with the parabolic antenna solution with a frame of reference change, to account for the acceleration due to gravity?
Oh shoot, he does actually explain this exactly. He also mentions 3) speed of the ball. And then, 4) for lines that hit at the same point but with different trajectories and speeds, he takes the "average basketball shot".
The only other thing I am wondering about is what would happen if the ball were flat.
[0] https://www.youtube.com/user/featony/videos
Would making the backboard convex make it near-impossible to hit? What about making the curve imperceptible so it's hard to notice it's helping/hurting?
Dart Board: https://www.youtube.com/watch?v=MHTizZ_XcUM
Rigged Carnival Games: https://www.youtube.com/watch?v=tk_ZlWJ3qJI
(Bonus, in the theme of sports equipment that wins for you) Auto bowling ball: https://www.youtube.com/watch?v=wM5NHC97JBw
In the video he mentioned doing a least squares fit to get the final surface, so that sounds about right.
Monte Carlo method is repeated random sampling to obtain numerical results.
Monte Carlo algorithms are heuristic algorithms that solve problems with random process that can give wrong answers.
Las Vegas algorithms are algorithms that solve problems with randomness but get always correct result or knows that it failed. Runtime is finite.
Atlantic City algorithm is a probabilistic polynomial time algorithm that gives correct answer > 50% of the time (or 75% of the time by some definition).
I'm going to have to look up Las Vegas algorithms though, this is the first I've heard of them. Course, it's been a while since I've broadly looked at the current state of probabilistic algorithms. Makes me think it might be time to step back and look at some more general theory, especially since some recent DSP work led me to look into particle filters in an attempt to estimate a pair of rotating phasors.
Monte Carlo Algorithm: Always fast, probably correct.
Las Vegas Algorithm: Probably fast, always correct.
Atlantic City Algorithm: Probably fast, probably correct.
It's the type of place where James Bond likes to play in the movies and books.
[0] https://en.wikipedia.org/wiki/Charles_III,_Prince_of_Monaco
He did hint at using a parabolic shape, like in satellite dishes. Why not use some actual calculus and differential equations to figure out the optimal parabolic-like shape here?
A much better pattern than "Nope, expected something interesting" is to first affirm something that the author got right or did well, and then build on that with suggestions for refinement, further development, learning. There's plenty of opportunity to show how much you know that way, plus you won't also come across as an internet jerk.
Keep in mind that project creators and authors are often reading these threads, and one nasty comment makes more of an impression than the rest of a thread put together. A single bee sting is more memorable than a field of butterflies. It's too bad that it doesn't work the other way around, but the pattern is super clear. Even the thread the other day with the C Committee guys, which was one of the best technical threads HN has ever hosted, made this impression on them: "Wow, I had no idea people were so mad about locales" (not a direct quote). I hadn't noticed, and when I found the comments they didn't even seem that mad.
It's not the hoop, it's the shape of the backboard, which is a reflector formed to focus the ball on the target.
Now, the really cool thing would to build a flat backboard with controlled bounce properties. Interesting 3D printing problem. That would look like an ordinary backboard but still focus bounces.
Also a paraboloid would work only for rays that are parallel to one another.
1) gravity post impact with backboard
2) impact angle for a given (start, backboard) tuple depend on velocity and launch angle for a basketball, but are always the same for light. Also the impact angle for the basketball and light are very different
And your intuition on the launch angle is just flat wrong. In fact, I believe it's one of the primary predictive factors in a shots success with a normal backboard!