Hacking an epic NHL goal celebration with a hue light show and real-time machine learning (x-post from r/Python)

Wow! That is profoundly f--king brilliant, and creative!

That is some serious computing skills this guy Francois Maillet has.


Well... just in case some of the others might be wondering why this solution is so beautiful... consider this:

Essentially, as we all know, computers think in binary: 1 or 0.

In other words, there is either a goal being scored at this moment (1), or there is no goal being scored at this moment (0).


If the state of the situation switches from 0 (no goals being scored at present) to 1 (a goal was just scored!), then the computer triggers it's next task, which in this case is to flash a bunch of lights.


But... the big problem is that real life, and human life, is analog.

This means that when a goal is scored, a complex pattern of data (sound, light, images) is formed in the real world.

But this pattern that forms with each goal, is never precisely the same, from goal to goal. Instead the pattern is similar (but again NOT the same).


So you can't just tell a computer "if you notice this precise pattern then flash the lights" because that precise pattern will never occur again.

Thus, the computer must break down complex analog patterns that explode/stream each time a goal is scored, and decide if the new unique pattern is similar-enough to other patterns of goals being scored.

This is called "machine learning".


In the end, each unique (yet similar) goal score pattern is analyzed, identified, and then compressed/converted to digital signal that is just a single bit long:

1

Once the single bit is registered, the lights flash. The system then resets. And it begins monitoring fuzzy/complex analog life once again.

/r/Habs Thread Link - blog.francoismaillet.com