Genetic Algorithms Become Programmers Themselves

AI

[Kory] has been experimenting with genetic algorithms. Normally we’d expect his experiments to deal with tuning the variables in a control system or something, but he’s doing something much cooler. [Kory] is using genetic algorithms to write computer programs, and in the process bringing us one step closer to the Singularity.

The first experiments with genetic algorithms generating applications did so in BASIC, C, and other human-readable languages. While these programs nearly worked, there were far too many limitations on what could be produced with a GA. A simpler language was needed, and after turning to assembly for a hot second, [Kory] ended up using brainfuck, an extremely minimal but still Turing-complete language.

The use of brainfuck for creating programs from a genetic algorithm may seem a bit strange, but there’s a method to [Kory]’s madness. It’s relatively simple to write an interpreter the GA’s fitness function can look into and come up with a score of which programs should breed and which should die. Also, the simplicity of brainfuck means a computer doesn’t have to learn much syntax and grammar at all.

Right now, [Kory]’s computer that can program itself only does so by creating simple ‘hello world’ programs. It should be possible, though, for this AI to create programs that take user input and generate an output, whatever that may be. Once [Kory] is able to have the computer generate its own fitness functions, though, the sky is the limit and the Singularity will be fast approaching.

Building A Velocity Sensitive Keyboard

keys

Cheap toy pianos don’t usually have MIDI, and getting a velocity-sensitive keyboard from something out of the toy aisle at Walmart is nearly out of the question. If you’re willing to tear one of these toy pianos apart and build your own control electronics, though, the sky is the limit, as [JenShen] shows us with his home built velocity sensitive keyboard.

Usually, velocity-sensitive keyboards have two buttons underneath each key. By having a microcontroller measure the time difference between when each button is pressed, it’s possible to sense how fast each key was pressed. [JenShen] took the idea of a velocity-sensitive keyboard in another direction and instead used a force sensitive resistor strip, cut up into many pieces to provide velocity and aftertouch data.

[JenShen]’s keyboard adds these resistive buttons to the button matrix he already made. The result is a very inexpensive velocity sensitive keyboard with aftertouch, an impressive feat for an Arduino and only a few components.

You can check out the keyboard in action after the break.

Continue reading “Building A Velocity Sensitive Keyboard”

This Man Will Take Your Picture While Macing You

pepper

Odds are you don’t have a photographic memory, so if you ever have to mace someone, you probably won’t remember exactly what your attacker looks like. Compound that with talking to the police and looking at a few dozen mug shots, and it’s highly unlikely you’ll ever be able to identify the person you maced. This was the problem [John], [Cordelia], and [Adrian] chose to solve for [Bruce Land]’s microcontroller course at Cornell this semester.

The device they created, PepGuard, adds a microcontroller and a serial JPEG camera to a canister of pepper spray. When the button on top is pressed, the microcontroller flashes a LED, takes a picture with a camera, and sends that picture to a phone over a Bluetooth connection.

PepGuard is always connected to the user’s phone via Bluetooth, and this allows for some interesting possibilities. With their Android app, the team can set up the phone to call emergency services when the device is activated.

You can check out the demo of the device after the break, or read the team’s report here.

Continue reading “This Man Will Take Your Picture While Macing You”

Hand Bind Your Own Books

hand-bind-your-own-books

This guide will show you how to bind books by hand. The process from start to finish isn’t very difficult as long as you follow each step along the way. The final product looks great, and we can’t think of a better gift… as long as you have something meaningful on the pages.

We never really thought about the direction of the fibers in a sheet of paper, but that’s the first thing you’ll have to take into consideration here. You want the fibers running up and down when the book is in a bookcase. Next the sheets are organized into stacks of four, then folded in half forming eight pages. After stacking these packets together a series of lines are marked on the folded side. Holes are then punched from the inside at each mark using a sturdy needle. This is where the stitching for the binding will happen. Bands are added using coarse linen thread. After stitching these in place and knotting, glue is added and finally a piece of cloth is adhered to the binding and a portion of each inside cover. From there it’s onto fabricating the cover before pressing the finished project as seen above. What a piece of work!

[via Reddit]

Breaking The MintEye CAPTCHA One More Time

minteye

A while back we saw the MintEye CAPTCHA system  – an ‘are you human’ test that asks you to move a slider until an image is de-swirled and de-blurred – cracked wide open by exploiting the accessibility option. Later, and in a clever bit of image processing, the MintEye CAPTCHA was broken yet again by coming up with an algorithm to detect if an image is de-swirled and de-blurred.

It appears we’re not done with the MintEye CAPTCHA yet (Russian, translation). Now the MintEye CAPTCHA can be broken without any image processing or text-to-speech libraries. With 31 lines of Java, you too can crack MintEye wide open.

The idea behind the hack comes from the fact that blurred images will be much smaller than their non-blurred counterpart. This makes sense; the less detail in an image, the smaller the file size can be. Well, all the pictures MintEye delivers to your computer – 30 of them, one for each step of swirl and blurring – are the same size, meaning the ‘wrong answer’ images are padded with zeros at the end of the file.

There’s a 31 line program on the build page that shows how to look at thirty MintEye images and find the image with the fewest zeros at the end of the file. This is, by the way, the correct answer for the MintEye CAPTCHA, and has a reproducibility of 100%.

So, does anyone know if MintEye is a publicly traded company? Also, how exactly do you short a stock?

Duct Tape Bagpipes

Duct Tape Bagpipes

Looking to build your own instrument out of plumbing and tape? [Scott] made his own set of Membrane Bagpipes out of PVC pipes, a plastic bag, and duct tape.

Bagpipes are made out of a few parts. The drones are pipes that are tuned to play a single note. They are tuned by the fixed length of the pipe. The chanter is a tube with finger holes. This lets you play various notes depending on which holes you cover. The blowpipe is used to fill the bag with air that will pass through the membranes on the drones and chanter. Finally, there’s the bag which stores air.

[Scott]’s build uses PVC for the drones and chanter. The membranes are made out of cut up bits of plastic bags. Some crafty duct tape work makes up the bag, and seals it on to the various parts. A check valve is used to stop warm, duct tape flavoured air from blowing back into your mouth.

It’s pretty amazing what people can do with a few rolls of duct tape. The pipes aren’t exactly in tune, but they certainly work. Check out a video of them in action after the break.

Continue reading “Duct Tape Bagpipes”

Portable Gaming Console Uses SSD1289 And Propeller

building-a-portable-video-game

[Samir] dabbles in hobby electronics and decided to put his skills to the test by building this portable gaming console (Note: this site uses an HTTPS address which cannot be used through Google Tranlator. It does work for the Chrome browser translator). The image above is a screenshot from his Breakout-style game. The paddle at the bottom is controlled with the touchscreen. You move it back and forth to keep the ball from traveling past the bottom edge (it bounces off of the red borders on the sides and top).

The main PCB is larger than the 3.2″ LCD footprint, but [Samir] made sure to include a lot of peripherals to make up for it. The board sports a Parallax Propeller chip to run the games. It interfaces with the SSD1289 screen (this is a cheap and popular choice) but that really eats up a lot of the IO pins. To control the game the touchscreen can be used as we’ve already mentioned. But there are two other options as well. There is an expansion port which uses a shift register (74HC165) to serialize the input. For prototyping this allowed [Samir] to use an Atari joystick. He also rolled a Bluetooth adapter into the project which we would love to see working with a Wii remote. Rounding out the peripherals are an SD card slot, audio jack for sound, and an RTC chip for keeping time.

There are several videos included in the post linked above. After the break we’ve embedded the game-play demo from which this screenshot was taken.

Continue reading “Portable Gaming Console Uses SSD1289 And Propeller”