Category: Pacman AI Business Card

  • AI vs BOTs on a business card

    AI vs BOTs on a business card

    The origin Story

    I want to create a business card, where you can play Pacman.
    After a couple of rounds you might get tired of getting hunted by ghosts. For this case you can flip a switch, which enables an AI that takes over the controls and goes to town with the ghosts. So the AI controls Pacman and wins the game for you.

    This is the beginning of a multi-part blog series in which I will go over my process of how I will bring this to life both on the software side as well as on the hardware. This business card will be an embedded system on a PCB, which I can hand out to people.

    But before I go into more details, you might wonder … Why?But why?

    Why Pacman?

    Once upon a time I taught myself to code. I figured that a good challenge to sharpen my skills would be to write my own implementation of the Pacman Game. Oh boy, was I wrong about starting my journey with this beast.

    I bit off more than I could chew and I failed horribly. As it turned out, Pacman is a fairly complex games, with a lot of moving agents and variables. But the technical problems I faced were only the peak of the iceberg. Much worse was the approach I took to build this game. I spent a month getting stuck and stuck again on how to implement this. Some of the errors I made:

    • I coded for 8h straight without taking a break and thinking things through. I was not resting enough, so I felt constantly drained and burned out, after a couple of days.
    • I did no “thinking before”. I jumped straight into the coding part. Every day I wondered on which end of the software I should work today.
    • Build systems were a black box for me and a necessary evil. I copied a build system together from a bunch of sources on the internet and the compilation was a nightmare.

    Needless to say, this approach was dumb and I set myself up for failure. But now, a couple years later this will be a different story. Sometimes you just need to be patient and learn more on other projects. But I always kept it in the back of my head, until today ….

    Why a business card?

    Did you ever participate in a Märklin Eisenbahn Event? These tiny trains? – yeah me neither, …

    I imagine the air is vibrating with energy of people talking about their little trains. “Yeah well next year, I will give this train a new paint job” or “I need to replace the engine in this one, it gets kinda noisy, it won’t make another 50 kilometers hehehe …”. How odd of a hobby that is and how beautiful at the same time. People come together to talk about their shared nerdy hobby and connect over that.

    I imagine the same to happen with this business card, when I am participating on such an event (something in the embedded space rather then tiny trains).

    This card serves as an immediate talking ground for all future conversation. It is like the icebreaker to talk to a some like-minded engineer. It opens their heart and then you can talk about other things. If I ever were to sell this, I will definitely target the dating market with this … people will come in droves to buy this … so many possibilities … This is definitely the most complicated way to get to know people.

    I found this applied to the hackaday’s conference badges where people create small embedded systems that run on conference badges for their hacker cons.

    Why something with AI?

    One of the things I find most fascinating as an engineer is designing systems that can solve problems independently. I think this is the ultimate challenge as an engineer: Build a system which solves a problem by itself and maintenance-free.
    Back at school I learned about a device called “centrifugal governor“. This little machine automatically stabilizes the changes in the steam flow for a steam engine. This made the engine spinning with a constant speed. Before its invention the steam flow had to be controlled by a human operator, who would need to constantly monitor this engine’s value and then adjust the steam flow manually by hand every time the value went out of its boundaries.

    The person who thought about this, managed to extract the smarts of his brains into a permanent physical form and thus removing a human from performing this mundane task. And for me this is pure genius. I also want to extract my smarts and put it into a physical form. In this case, I would like to extract it into a self-learning AI, which learns how to play a game of Pacman successfully.

    This is the reason I became more interested in the field of AI, and especially in systems that regulate themselves. Such is the case for the Pacman AI Game. An agent which learns to resolve this dynamic problem by himself.