Over the years we’ve seen quite a few successful attempts to create robotic air hockey opponents, but Andrew Khorkin has dedicated himself to a much harder task. He’s managed to build a robot that can not only play table hockey—a more onerous task than playing air hockey—but one that can slap the puck into the net from almost anywhere on the board with incredible accuracy.
To a human player, air hockey can feel frenetic and chaotic as they try to keep their eyes on that puck zipping back and forth across an air-cushioned table. But the game isn’t terribly hard for a robotic player to master, assuming they’ve got access to a camera sitting above the table. The puck’s movements are relatively predictable as it bounces around, and as long as the robot is able to move its paddle into position fast enough, it will never lose.
Table hockey is, by comparison, magnitudes more complex. The puck doesn’t glide as easily, and all the moving figures serve as obstacles, complicating its path and trajectory. Scoring is also a major challenge, as it requires the figures to spin their miniature sticks around with enough speed and force at the right time to send the puck hurdling toward the net. That’s why it’s taken Khorkin about 18 months to get to this point, but his work is impressive.
Autonomously operating all six of the robot-controlled team’s miniature hockey players, which are controlled by pushing, pulling, and rotating six metal rods, required Khorkin to design and engineer a complicated rig that used a pair of stepper motors and a drawer slide for each rod. One of the stepper motors moves it in and out to reposition one of the the miniature hockey players along its predefined track, while the other motor rotates the rod, which causes the figure to spin 360 degrees.
They’re all controlled by an Arduino Mega, which gets its commands from custom software running on a PC that has access to a live feed from an HD camera that looks down on the table hockey game from above. Programming the system to extrapolate the position and orientation of the figures (as well as the puck) from the video feed could have been a frustrating process, but Khorkin instead created a machine learning model by feeding Google’s TensorFlow images of the table with the figures in countless positions.
A bit more complicated was the six months of work needed to teach the robot the gameplay mechanics of table hockey, which required constant fine-tuning as Khorkin trained another ML model. The results are impressive. The robot doesn’t have much of a passing game, a strategy often used by human players to throw off an opponent, but its ability to slap the puck into the opposing net from almost anywhere on the miniature rink is impressive—and a little intimidating. How the robot would fare against skilled human players is unknown, but those of us who consider ourselves table hockey novices don’t stand a chance.