Some explanation for a program I posted here a little while ago.
I’ve been studying artificial intelligence for many years. One of the AI constructs that has fascinated me the most has been Genetic Algorithms (GA). With a GA, one “evolves” a solution to ones problem. A “gene” is a candidate solution to a problem, and individual alleles in that gene are individual parameters to the function that attempts to solve the problem. The output of the function is evaluated for “fitness”–essentially, how well it solved the problem–and good candidates are intermingled for the benefit of future generations, while particularly bad candidates are discarded; “survival of the fittest” in its most incredibly literal sense.
This little sketch was written for a couple of reasons. First, I’ve been seeing some AI code that I felt like has been overly complicated. A lot of principle AI algorithms are quite simple to implement, once you understand them. But also, I wanted to demonstrate the flow of a GA and how it tends to find intermediate solutions, improving over time.
This sketch will require some basic programming knowledge to be able to alter the fitness function and make the GA do different things, but I think it can be an exciting and compelling exploration into code. There are actually a few simple things one can do to alter the course of the algorithm. Each “gene” represents a row of pixels in the image being drawn when you click “start”. As it currently stands, it will “evolve” solutions converging on the color red. If you change “if((i%4)===0)”* to read “if((i%4)===1)”, it will converge on green. “if((i%4)===2)” converges on blue. There is a 4th opacity component at #3, but it basically just ends up showing black. It isn’t necessary but I just didn’t feel like fixing the code to get rid of it, and maybe someone else will find it useful.
Instead of “if((i%4)” you replace the 4 with another number–say a prime number like 31–you get some interesting results as well. There are a lot of things that you could do here, it’s just a matter of whether or not you wish to pluck at it.
* the percent sign, ‘%’, is known as the modulus operator. For positive numbers, it returns the remainder of a division operation. So, “13 % 5 ” return 3 because 13 divided by 5 is 2 remainder 3 (i.e. 2 x 5 + 3 = 13).
Last year, I purchased a 1970 Telecaster copy for $120 from Elderly Instruments. The frets were no good and much of the hardware was corroded, so it seemed like a good instrument to hone my repair skills on.
The first thing I did was take it to Hive and bounced ideas around with some folks. One thing I really love is that no matter what kind of project or idea you’ve got, there’s at least one or two people at an open house who have some expertise to share. (more…)
Well everyone, so long, and thanks for all the fission reactors. I’ve moved to Alexandria, VA, to be with m’lady, plan our wedding, start a doggy dating website with some folks, and maybe spread the joy of hackerspaces a little further south. Step 1) figure out the joy of hackerspaces.
It’s a bittersweet change, as I am really going to miss Hive76 and her amazing people. You all taught me a lot and I will forever hold it all in my heart with great appreciation.
I’m not disappearing completely. You will still receive the occasional displeasure of reading some new, overly-verbose, trying-too-hard rambling from me on the listserv and in this blog. I plan on visiting on occasion as well. But regardless, here are a few of those things that I learned thanks to Hive76:
- Everything is permitted. There is an avenue for doing just about anything. Don’t let the fact that you’ve never done something before prevent you from doing it now. Don’t ask permission to do it, either. People ask permission to do things in a lot of different ways. They stall the doing by looking for a job in what they want to do, waiting for an employer to give them permission. They research the “best” way to do something, asking questions of everyone around them, never actually just giving it a try. Someone will show up in your life with a need for help and you can help them by just saying, “I bet I can do that”, without knowing for sure if it is so. You win some, you lose some, hence it is a bet, but you always learn something, and that’s almost as good as winning.
- Anything is possible. If you put your mind to it you’re capable of just about anything. Things you could never imagine will happen if you just try. Like having a piece of art put into a museum. Or meeting a legend of technology. Or just plain making the block clean for a change. “Luck is what happens when preparation meets opportunity”. A place like Hive can help you always be prepared for the opportunities that inevitably come our way.
- It’s okay to do stupid things. Actually, it’s even preferable. We are too serious on most occasions. Having a habit of doing things just to see them done–things that have no inherent value of their own, beyond any spectacle they may bring–is pretty much the only way new discoveries are made; certainly the important ones. Without time for play, there is no art. Without art, there is no culture. Without culture, there is no language, no nation, no city, no people.
- Don’t ever let anyone tell you what is right. Not a boss. Not a friend. Not your parents. Not a single person. You have to decide, and you have to get good at deciding, because half of the people out there are wrong and it’s on you to figure which half. Depending on what it is, more than half of everyone is wrong. There aren’t many places where less than half of everyone is wrong. So get good at deciding what is wrong and then trying new things to try not to be wrong. But absolutely, most importantly, respect everyone else’s path to figuring out how not to be wrong, because if you try to tell them you’re right, you’re probably wrong.
I’m stopping at 4 because it’s not wrong to stop at 4 and I’m also tired of typing for the day. Don’t forget to check out Hive76′s Open Houses on Wednesdays at 7pm. I understand they have an opening for memberships now.
Michelle doesn’t drink coffee, so she does not own a coffee pot. However, she did have a few coffee filters left over from making cocktail bitters. Fortuitously, she had also finished off a jug of milk the night before, leaving it on the counter because I hadn’t yet taken out the garbage (see! Procrastination pays, probably!) So, the milk jug bottom with a hole cut in the center holds the filter. The milk jug top holds the bottom instead of the filter because the handle was crumpling the filter. The weight of the jug assembly with grounds and water make the chop sticks grip the assembly on top of the jar (my favorite part), otherwise the top-heavy nature of the assembly would probably make it topple over. And now coffee is ready! I can’t tell if it tastes good because it’s freshly ground or because I’m just overly pleased with myself.
This past weekend I had the great pleasure of competing at NERC‘s Motorama Robot Conflict with my fighting robot Such and Such – built 100% at Hive76.
Though it might have looked a little boring, that was the most exciting match of the competition for me. After 2 years of on-and-off work, Such and Such, the most ambitious robot I’ll ever build, worked like a charm.
This year I wanted to do something a little different for Christmas gifts. Instead of just getting people electronics or video games or clothes, I wanted to give something that encouraged creativity and making. A lot of people never even think to try to make things on their own, so maybe a little hobby-style gift will give them a taste and spark an interest.
To that end, I did two things. First, I bought ten MSP430 LaunchPads. These things are really inexpensive, so they make great stocking-stuffers. If you don’t know what the MSP430 is already (really, we talk about it constantly, where have you been), it’s a 16-bit microcontroller with really low-power consumption needs. They run on 1.8 to 3.6v power supplies at up to 16MHz, making them quite a powerful little beast for only $4.30, which includes the chip programmer. If you were to buy the chips alone, they cost about $0.50 each, with a few different serial communication protocols built in, and requiring only a small selection of external parts (2 resistors and 2 caps if you want to do it right, 1 resistor if you’re living dangerously, and face it, at $0.50, you can afford to live dangerously). It’s something of a long-term project plan of mine to buy 100 of these and try to build a small, physical neural network computer.
A lot of people have shied away from the MSP430 because the Code Composer Studio software–based on the professional-grade Eclipse development environment–is very difficult to use in comparison to the Processing-based software typically used to program Arduinos. But luckily, someone has taken the Arduino cue and created Energia, a Processing-based editor for use with TI’s LaunchPad line of MCUs! If you’re experienced with Arduino, using Energia is a snap, and if you’re not experienced at all, it’s really not that big of a learning curve.
Second, I bought supplies to make “magnetic Silly Putty”. About a week ago, I saw this Instructable about kneading some Iron-Oxide powder into a little Silly Putty and jumped on Amazon right away to get a 6-pack of Silly Putty eggs and a 5 lbs bag of black Iron-Oxide pigment. Honstely, 5-lbs is way too much, but there are plenty of other things you can do with it, like make ferrofluids or your own paint, so it’s handy to have around. You will need a fairly strong neodymium magnet, but again, these things are fun enough to have around anyway, so have at it!
Making the putty is really easy. I pooled all 6 eggs of putty together in a non-stick pan. On very low heat, I warmed up the putty until it was just too hot to handle with my bare hands. If it starts to become the consistency of chewing gum and sticks to the pan, don’t worry, it will unstick when it cools down. Don’t heat it further than that though, it will start to smoke and burn. Wearing rubber gloves to give me just enough insulation from the heat and to keep my hands from getting stained black, it’s just a matter of working a large, heaping tablespoon-full of the black powder into the putty. You will need to work the putty like taffy, stretching it and folding it to blend the powder evenly into it. Once the powder is sufficiently kneaded in to the putty, it will not stain anything, so keep testing it on the back of your rubber glove to see if it leaves any marks. I then cut the putty into 6 equal chunks and shoved them back in their eggs. It took 10 minutes total. I thought about taking some photos of the process to show it off, but really, it could not be simpler.
I’m hoping these gifts will be completely unexpected and will inspire people to try something they never would have considered on their own. The MSP430s are just a really easy, cheap, fun way to get into programming, and the magnetic Silly Putty is a great example of something you can’t buy as a product that is also extremely easy to make.
One of my first projects here at Hive76 was the Burning Zombie Dummy. A friend of mine had called me, asking me if I knew how to set people on fire safely, and that led into a very stern discussion about what he was trying to do and that I would take over so that noone would get hurt. So I became the Special Effects Design Engineer for Exile: The Family You Choose, and it was one of the best times of my life. I got to do some pretty awesome things (including making an impromptu harness for doing a shotgun-to-the-chest effect), met a lot of really great people, and learned a lot about a hobby that would ignite my passion in a way I hadn’t felt in a long time. Seeing our end result, this thing that we made together, from start to finish, without any adults (of course, we’re all adults, but you never really feel like it) helped to further cement my belief that anyone is capable of doing anything. The hacker spirit is strong in the indie film world. (more…)
CNN stopped by the space last night, Oct 22nd to interview some of the guys on their projects for a report called “Made in America” which airs Tomorrow, Oct 24th. However, we did shoot some cool video and photos alongside them. There’s a full album available on our Facebook page. We were also fortunate enough to get some quick shots of our projects at work.
Today, several hive members were contacted by a major Philadelphia news organization, asking if they could interview us about hacking.
Unfortunately, their idea of hacking has more to do with unattended Facebook accounts than the hacking we do, and we thought it might be a good time to clear up just what hive is, what our hackers do, and what hacking actually means within the hacking community.
Hive is a hackerspace. A hackerspace is not full of people who try to break into your computer, steal your bank account info, or send spam. A hackerspace, or at least THIS hackerspace, is full of people who are trying in very real ways to build, modify, and improve things. Our battle cry is “Make things awesome, make awesome things!” and we take this to heart. Visit the space on a Wednesday night, and you’ll find people who are excited about the things they are creating both in and out of the hive space, from chocolate chess pieces, to amazing pieces of audio equipment, all the way to organs which could save someone’s life.
The common theme here is that these people that define themselves as hackers are not breaking into your computer. Some of us write software, to make things work better. Some of us build things, to make things work better. And some of us screw around just to see what might be possible, or impossible, just to do it. Bottom line, this hacking is positive. What most of the public and the media refers to as hacking, the technical world refers to as cracking, and it rarely is it “as seen on TV.”
So lets hit on a few of the real dangers, and if the media is paying attention, they can feel free to make use of this. Here are a few things that actually endanger your accounts and computer, which the media often refers to as hacking, but which really are not.
1.) Spammers like to send emails that look real, talking about your phone bill, your bank, or a deposit that needs to be made in your account. Often these take you to fake sites. Instead of clicking the links in these emails, call the phone company, bank, or other company that claims to be sending the email and verify it that way. It’s not cracking (or hacking) if you hand over your username and password.
2.) If you use the same password on all your sites, and someone gets that password, they now have access to all of your sites. Likewise, if you use a simple password for your email, and someone gets access to that, it is easy for them to request new passwords for many of your other accounts. Use more difficult, hard to guess passwords (Good password guidelines), and don’t use the same password for all sites. At the very least, use a different password for your email, a different one for your taxes and other financial matters, and a different one for your online accounts at sites like Facebook. It’s not cracking if someone knows your password, or has access to your email, and gets access to your stuff.
3.) Don’t leave your account logged on in an unsafe place. Many accounts get taken simply because someone leaves them logged on in some unsafe place, like a sample machine in a mall store. It’s not cracking if you’re already logged on and walk away.
None of this is hacking. None of this is cracking. It’s poor security, usually because of a lack of understanding of the technology. And you know, that’s understandable. Not everyone is a computer expert or even really a computer beginner, but as long as the media keeps pushing these things as hacking, the public won’t learn. If anyone would like to discuss what this means to Hive76, feel free to e-mail us, or leave a comment below.