I have been working on a pet project lately. I’ve been trying to write a genetic algorithm to solve a simple test problem. In case you don’t remember genetic algorithms are search techniques designed to find problem solutions by mimicking natural occurrences from the field of evolutionary biology. They are part of the larger studies of Biological Computing and Artificial Intelligence. Long ago (and I’m not saying how long) I studied these and other algorithms as part of my graduate work in Computer Science.
The basic premise of a genetic algorithm is that you first initialize a search space with potential solutions each represented as some sort of string. In biological speak each string would be a gene. You then follow the space (i.e. the gene pool) through successive generations as some genes die, others strengthen and new genes are created through mutation and crossover. This is all supposed to be the computer representation of natural selection in process. With each generation, the “best” genes are selected and new, hopefully better, genes are created by mutating and combining the good genes. The idea is that, if this process works so well for finding unique biological solutions, why wouldn’t it work for computer problems?
The problem I’m trying to solve is purely recreational—I’m trying to write an algorithm that will discover the correct solution to a Rubik’s Cube from a random start condition. Some problems are so difficult that a particular approach won’t generate a viable solution. I’m so blind on this project that I have no idea if I’ll succeed or not. To my thinking, the search space - the pool of potential solutions - is relatively small. And I’m starting with the knowledge of the exact result I want. Generally it’s easier to write a search solution when you know in advance what you’re trying to find. Have I succeeded? I don’t know. I’m spending quite a bit of time early on just figuring out how best to represent my genes and how to manipulate strings in C.
But this does take me back to my study of AI—or, as I like to call it, advanced algorithms. Honestly I miss this kind of work. In some ways the advent of the internet has moved computing ahead by orders of magnitude. What were once disjoint point solutions are now part of the global connected computing landscape. But, in others ways, the internet has actually moved us backward (my opinion). This is especially true as pertains to unique or elegant algorithms. For example, have you ever heard anyone wax rhapsodically about the elegance of HTML embedded in a classic ASP page? No you haven’t - because it is anything but elegant. In some cases it’s nearly illegible.
But I digress. The point is I’m back at it; using what I remember about genetic algorithms to see if I can answer the age old question, “Can we really get all the red cubes on the same side?” My hope is that success on this test project will open my mind to other ways I can use this technology to solve more meaningful problems and maybe find a solution that I didn’t already know before I started. Wish me luck!
When I moved last spring I had a garage sale and one of the things I sold off to save storage space was my 75 gallon aquarium. I’ve been lugging the empty thing around for years because I’ve been moving so much and it was time for it to go. Well, now that the wife and I are finally in an apartment and an area that we like, I wanted to set up a smaller aquarium but I didn’t want to buy one new.
So I began browsing Craigslist and after a while started realizing what a pain it was going to be to try to surf through that every day because there were two different areas where I was willing to go to get what I wanted—Detroit and Ann Arbor—and those areas are split into two different sites on Craigslist. I noticed an RSS link at the bottom of all the pages including the search pages and I thought about subscribing to those. But then I remembered Yahoo Pipes.
I thought about how I would create my own Pipe to handle some filtering from both the AA and Detroit sites at once but I decided to do a search first. That’s where I found the “Craigslist Free Search” Pipe. Amazingly it was already set up for Michigan:
“Searches Flint, Ann Arbor, Saginaw and Lansing for FREE ads. Features include limiting the search to the 20 most recent, sorting by most recent across the 4 cities searched, prefixing cities with city codes for easy identification. Additionally, you can get only items with images by adding &hasPic=1 to feed URL.”
I cloned the Pipe and started customizing it. I replaced the searches to look in my areas and then I changed the RSS feeds to the more general “For Sale” category instead of the “Free” section. I then added two filters between the sort and the pipe output modules.
The first filter checks the item.title and item.description for my search terms (aquarium, fish, reptile and tank). The second filter narrows it down a bit further by scanning the URL of each item. Craigslist uses three-letter codes for different categories in their URLs so I set the filter to allow the categories that I wanted to see. For example, http://detroit.craigslist.com/gms/ is the category for garage sales so I added “gms” as a criterion to allow. I didn’t want to see any posts about “gas tanks” so I left out “pts” which is the auto parts category. I still see a few posts that aren’t what I’m looking for, but this helps a lot.
After I finished customizing the Pipe, I subscribed to the RSS feed in Thunderbird and now I get regular updates on my search terms pushed right to me. I know there are a number of ways to set this up and I wouldn’t say that original Pipe or mine are the best, but I’ve found some good deals without much effort and I wanted to share. If anyone has some tips on making this better, I’m listening.
You can check out my Pipes at http://pipes.yahoo.com/nickstaroba/.
I walked passed my 11 year old son’s bedroom the other day and saw him kneeling down in front of his desk frantically typing away on his computer keyboard. Puzzled where his chair might be, I made a mental note to check on that when I had a moment. Almost two hours later, I returned only to find him still kneeling there. Curiosity getting the better of me, I went in and asked him what he was doing. He answered that he was finishing up Level 14 of a game. Only he wasn’t playing this game—he was designing it!
For a while now, my son has been spending a fair amount of time with a program called Scratch. Scratch is a visual programming language which strives to make programming more engaging and accessible to children, teens and others who wish to learn programming. The concept is quite simple. To create a game program the user snaps blocks together into stacks. Blocks are designed to fit together only when it makes syntactic sense. The result is a program that controls and mixes graphics, animation, music and sound. And then, to top it off, creations can be posted to the Web site so that others can sample or even collaborate on each others work.
Scratch also allows users to learn important computation concepts such as iteration, conditionals, variables, data types, events and processes. Besides being a lot of fun, many kids take it to the next level by moving on to actual text-based scripting languages. Several research papers have been written about this.
The program is built on top of the Squeak programming language and is an open source—but closed development—project spearheaded by a team of researchers at the MIT Media Lab.
Last night was our first ever Ann Arbor Software Development Study Group and it was a lot of fun. The group was split into pairs and given non-programming problems to solve using specific problem solving techniques. They gathered at multiple white boards and had to show their work. The problem set came from a K-12 Problem solving curriculum, so although not hard, they still challenged some of our smartest people in ways I wouldn’t have imagined. All in all it was a perfect kick off to what I think is going to be a very successful group.
Next week, Andy Seidl will be leading us in XLS. Study group is strictly 1 hour and takes place from 5:30 - 6:30 every Tuesday. Please check our Syllabus for times and topics.
We recently went through a bit of a firedrill checking business references for a candidate.
While the running-around-tearing-my-hair-out experience is still fresh, I thought I would jot down a few things that any job seeker should know about handling business references.
Protect your Business References
I’ve talked with many job seekers who refuse to give out any information about their business references until the very late stages of interviewing. They cite experiences with unscrupulous head hunters who contacted their business references to try to entice them away from their current jobs. Not nice.
When dealing directly with a prospective employer, you can feel comfortable giving out your business reference information. They aren’t head hunters, so you can be 99% certain that they won’t abuse them.
When dealing with recruiters and agencies, you are entitled to understand their policy on business references. Ours is simple: we don’t contact anyone’s business references without express permission. Period.
Your business references will be grateful (and much more willing) if they are not bombarded with phone calls that start out, “YOUR NAME HERE gave me your name and phone number.”
Keep tabs on your Business References
I find it incredibly frustrating when a job seeker gives me a business reference with bad contact info. People change their jobs, their cell phone numbers and their email addresses like I change my haircut.
What I find even more frustrating is when I tell a job seeker that the phone number or email address they gave me is bad, and the response is, “Here, try this one.” What? No, no, no, no, no. YOU try that one!
When you are going through the interviewing process, you can do double duty by (a) calling or emailing your business references and warning them that they are likely to hear from prospective employers, (b) asking your business references to confirm that the phone number and email address you have for them are still the best ones to use.
This one should be obvious…
Should you include this manager or that manager on your business reference list? What are the criteria? This one should be obvious.
First, can the person speak freely? Some companies have a policy against providing business references. If a business reference is only capable of giving employment verification, it’s not much of a business reference at all.
Second, will the person give you a positive reference? You should ask this before you include anyone on your business reference list.
I know, I know… You think this is obvious. But I myself have been used as a business reference by people who I haven’t worked with for ten years or more. Worse yet, I’ve been used as a business reference by people who I cannot recommend. I will candidly tell anyone who asks whether or not I’ll give them a good reference. I think all job seekers should be smart enough to ask!