AI and machine learning are weird, because we don’t really know why they do what they do. We knowhowthey do it — the underlying mechanisms they use to accomplish everything — but we aren’t privy to their thought processes. That is a little hard to wrap our human minds around, so how do you learn to use it?James Bruton’s process was to force Henry Hoovers to battle.
A Henry Hoover is a kind of shop vac, but with an absolutely adorable face on the front. Bruton bought two of them and wanted them to fight each other,BattleBots-style. And he wanted them to do so autonomously, operating under the control of AI.
“AI” is a vague term that encompasses several different technologies. LLMs (large language models) are the most well-known right now, but this project doesn’t LLMs at all. It relies on deep learning, which is a form of machine learning based on layers of neural networks.
In this case, Bruton did the training inside a digital simulation built in RViz. That contains 3D digital twins of the Henry Hoovers, but none of the logic happens there. Instead, the logic happens within a 2D PyGame battlefield with simplified representations of those robots and basic rules. PyTorch does the actual deep learning and Gymnasium evaluates the training. To aid in that, Bruton established positive and negative reinforcements, like positive reinforcement for clobbering an opponent. He then let it run through iteration after iteration, until it learned how to move the Henry Hoovers to achieve its goals.
With that trained model, Bruton converted the Henry Hoovers into real robots by equipping them with three omnidirectional wheels driven by gear motors. An Arduino Due in each robot controls the motors. Another motor actuates the punching arm. A second pair of Arduino Due boards, connected to the PC running the model, send commands to the on-robot boards through radio transceivers.
But for the AI to control the real-world battle like it controls the virtual battle, it needs to know where the robots are and how they’re oriented. To give it that information, Bruton put HTC Vive VR trackers on the robot’s heads, with tracking cameras in the corners of the room.
That plan worked well, because the real robots were able to fight each other entirely under the control of the AI, based on the learning it did in the simulation. This is exactly how cutting-edge models are developed, it is just a lot more fun to see it done for the purpose of making goofy robots battle.
machine learning
robotics
Cameron CowardWriter for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism