A lot of computers can play chess. [Matthew Lui’s] Giraffe is a chess playing computer, but unlike other common chess programs, Giraffe taught itself to play. It apparently learned pretty well, too, since it is rated as an International Master on the FIDE scale (putting it in the top 2.2% of players. The top chess playing computers clock in at super grandmaster level but they are not self-taught).
Minecraft wizard, and record holder for the Super Mario World speedrun [SethBling] is experimenting with machine learning. He built a program that will get Mario through an entire level of Super Mario World – Donut Plains 1 – using neural networks and genetic algorithms.
A neural network simply takes an input, in this case a small graphic representing the sprites in the game it’s playing, sends that input through a series of artificial neurons, and turns that into commands for the controller. It’s an exceedingly simple neural network – the network that can get Mario through an entire level is less than a dozen neurons – but with enough training, even simple networks can accomplish very complex tasks.
To train the network, or weighting the connections between inputs, neurons, and outputs, [SethBling] is using an evolutionary algorithm. This algorithm first generates a few random neural networks, watches Mario’s progress across Donut Plains 1, and assigns a fitness value to each net. The best networks of each generation are combined, and the process continues for the next generation. It took 34 generations before MarI/O could finish the level without dying.
A few members of the Internet’s peanut gallery have pointed to a paper/YouTube video by [Tom Murphy] that generalized a completely different technique to play a whole bunch of different NES games. While both [SethBling]’s and [Tom Murphy]’s algorithms use certain variables to determine its own success, [Tom Murphy]’s technique works nearly automatically; it will play about as well as the training data it is given. [SethBling]’s algorithm requires no training data – that’s the entire point of using a genetic algorithm.
We have some of the Internet’s hacking elite judging The Hackaday Prize, and that means they can’t enter any projects into the prize. All the better for everyone else, we suppose. One of the judges, [Sprite_tm], is a resourceful guy and when it comes to judging the entries for The Hackaday Prize, he’s going to do what comes naturally to him: build a machine to automate the task.
[Sprite]’s plan for the JudgeTron 9001 is to use neural networks embedded in biological specimens to do the judging for him. Honestly, we really appreciate the effort he put in to this; biohacking is really in vogue right now, and we do love the classic throwback to the AI renaissance here. It certainly doesn’t hurt that he’s using a Raspberry Pi and an Arduino for this project, either.
Grabbing a touchscreen LCD and a few other parts out of his junk drawer, [Sprite] quickly whipped up a project that would display entries to The Hackaday Prize to the biologically embedded neural nets. These nets needed a little bit of encouragement to select winning entries, so a ‘feed’ back mechanism was laser cut out of acrylic, mounted to a servo, and filled with positive reinforcement.
The software running on the Pi crawls through the list of entries to The Hackaday Prize, extracting images from each one. The plan was for the biological neural nets to select winning entries and be rewarded via the feedback mechanism. These neural nets proved to be very sensitive to the sound of the servo gears of the feedback mechanism, and [Sprite]’s attempt at finding a winning entry with his creation has so far proved unsuccessful. Still, there’s a video of it in action, you can check that out below.
Though this project uses an RC helicopter, it’s merely a vessel to demonstrate a fascinating machine learning algorithm developed by two Cornell students – [Akshay] and [Sergio]. The learning environment is set up with the helicopter at its center, attached to a boom. The boom restricts the helicopter’s movement down to one degree of motion, so that it can only move up from the ground (not side to side or front to back).
The goal is for the helicopter to teach itself how to get to a specific height in the quickest amount of time. A handful of IR sensors are used to tell the Atmega644 how high the helicopter is. The genius of this though, is in the firmware. [Akshay] and [Sergio] are using an evolutionary algorithm adopted from Floreano et al, a noted author on biological inspired artificial intelligences. The idea is for the helicopter to create random “runs” and then check the data. The runs that are closer to the goal get refined while the others are eliminated, thus mimicking evolutions’ natural selection.
We’ve seen neural networks before, but nothing like this. Stay with us after the break, as we take this awesome project and narrow it down so that you too can implement this type of algorithm in your next project.
After taking the Stanford Machine Learning class offered over the Internet last year, [David Singleton] thought he could build something really cool. We have to admit that he nailed it with his neural network controlled car. There’s not much to the build; it’s just an Android phone, an Arduino and a toy car. The machine learning part of this build really makes it special.
A neural network takes a whole bunch of inputs and represents them as a node in a network. Each node in [Davids]’s input layer corresponds to a pixel retrieved from his phone’s camera. All the inputs of the input layer are connected to 64 nodes in the ‘hidden layer’. The nodes in the hidden layer are connected to the four output nodes, namely left, right, forward and reverse.
After training the network and weighting all the connections, [David] got a toy car to drive around a track. Weird, but it works. All the code is up on github, so feel free to take a look behind the inner machinations of a neural net. Of course, you could check out the video of [David]’s car in action after the break.
EDIT: We originally credited [icebrain] as the author. Our bad, and we hope [David] doesn’t hate us now.
UPDATE: [John Resig] explained of how it works.