• Chapter 63: Submarines that Swim!

    Yesterday was my first day as a part time non-degree student at George Washington University. Our professor was one of the lead programmers for the Apollo program, and informed us that the “Machine Intelligence and Cognition” class we had just sat down to was to be his swan song: the final class he would teach before retirement. He asked us to introduce ourselves.

    “My name is Sam, and I work at the United States Patent and Trademark office as a Patent Examiner.”
    “You know, Einstein was a patent examiner.”
    “I remind myself … every … day.”

    We started talking about the history of thinking about the brain, about how religion had stifled independent thought for so long in history. “Why does this pen drop? Because God wanted it to.” He said there was still magic in the world, and that it was his life long task to wipe away the magic and to begin to understand the human brain. He cited the following quote from the famous mathematician and computer scientist Dijkstra:

    “The question of whether Machines can Think is about as relevant as the question of whether Submarines can Swim!”

    This is a very famous quote in the Artificial Intelligence community, spoken by a person not very famous for his work in AI. However, my professor took this quote and used it in a way that I’d never imagined and still don’t feel entirely comfortable with. Paraphrased, this quote meant that there was still something special about the human brain to Dijkstra, something off limits. Call it a soul, call it the notion that people cannot build something smarter than themselves, but call it magic at some level.

    I disagree.

    I’m not sure if it was an internal interpretation that I made originally or if it was something my old AI teacher said, but I always interpreted it as much more positive. I looked up the original context in which he made the comment, and I don’t feel I’m overstepping my bounds when I say that Dijkstra wasn’t calling the brain off limits.

    When early scientests approached the problem of creating an artificial intelligence, they strove to recreate the brain. All of it. They thought to make something act intelligent, it had to be intelligent like humans were intelligent. That’s not quite the case.

    Your inbox is carefully cleaned by statistics. Bayesian filters they call them. They match up words and phrases and create complex models to determine what is spam and what isn’t. The process is pretty neat and exhibits a certain “smartness” to it, but it’s not a human intelligence. In fact, it solves the problem of distinguishing between spam and non-spam about on par with a human and about a million times as fast.

    When you approach a problem, most likely you have a set way of proceeding, a way of thinking about it. Dijkstra tells me to throw all of that out. The wheel was a monumental achievement to humans because it provided a simpler solution to the problem of traveling on even ground. If you’re moving things on even ground and you don’t want them to stop themselves, wheels are much easier and more useful than inventing a pair of robotic legs.

    Machines that Think is something we’ll always be working towards. Kurzweil says it can be done by 2030, or we’ll at least be able to simulate it. But it’s not necessary to sort your mail.

    Watch to see how other people do things, but never forget that you could do it better.

  • Chapter 62: Solving the problem of Dating

    Last night I remembered something I hadn’t thought about in a long time. During my freshman year, a math professor showed me a novel solution to an interesting problem: dating. And he did so with the help of Calculus.

    First off, let’s assume that I am capable of comfortably dating and knowing N girls in my life. Not that I will date N girls, but that if I didn’t ever get married and continued to date for the rest of my life, I could reasonably expect to date N girls.

    I can only date one girl at a time (it’s me), and the problem isn’t as interesting if you’re allowed to go back to one you’ve already dated. You could just date all N and pick the best one. How can I pick the best girl to marry if I can’t go back in time? Or even more generally, how can make sure I pick from the top of the list, the top A girls? Let’s formalize:

    N := number of girls I can reasonably expect to date
    A := number of girls who’d make me happy (A < N ) I can compare any girl I am with to any girl I've been with in the past.

    Let’s say I could date 10 girls, and that I could be happy with the top 3. If I pick the first girl I date, I’ll only have a 3/10’s chance of happiness. What should I do?

    My professor’s answer was to date P girls initially without considering any of them for marriage. These were to provide a baseline, a sort of control group for how crazy or wonderful women you could date would be. Then, after you had accomplished that, you should marry the first woman who is better than anyone else you have ever dated. Simple enough, but how to solve for P?

    He used integrals, but for the life of me I couldn’t remember how he did it. I started writing out axiomatic rules (like I did just now) and tried to solve it using statistics and set theory, to no avail. Finally I gave in, started up Visual Studio C++ and wrote in one furious sitting a complete Monte Carlo simulation to solve the problem. It spat out the following table (N=10, A=3) of values for P and their expected success percentage:

    0: 0.309 1: 0.602 2: 0.670 3: 0.615 4: 0.581 5: 0.518 6: 0.401 7: 0.283 8: 0.209 9: 0.088

    According to my program, the optimal solution if you can date 10 girls and 3 of them would make you happy is to date two girls, get a feel for them, then marry the first girl that beats the rest. Although looking at the numbers, it sways a little to the right, maybe I should take a more finely grained data set, get another decimal point.

    My professor might have solved the problem correctly, but I get the feeling there’s a little more to dating than C++.

    Update 7/23/06: I found the solution my professor used in solving the problem. Enjoy.

    http://plus.maths.org/issue3/puzzle/stopping/solution.html

  • Chapter 61: Fixed Formatting, or A College Graduate

    rapping by me, beats forthcoming

    the leaves have all fallen on the spots of ground
    where i wander slowly fighting a persistant frown
    i take down all the thoughts as they flow so fast
    its very hard to find truth if you pass the class

    fighting exhaustion, i start to open up the books
    every (e)motion you make draws its share of looks
    fighting those crooks of intellectual superiority
    makes me want to redraw the plan of my priorities

    cause historically i always knew i'd find the way
    to make do with the stupid ways i'd make some pay
    but they say life is living not some rascal poets
    who bring heart to the visions they might show us

    that it's bogus when they tell us we will succeed
    in making it any easier to keep our women pleased
    what he sees is a couldron of uncontrollable want
    let me stutter up the student with a fluent taunt

    that i know now what i didn't know then
    that to do it correct is to do it again
    and if i start over it'll be another no
    the best i can do is to deliva the flow

    because i know life is more than workin
    and that college is the universal quirk
    and i thinks i might just become a poet
    cause we all lost, but they all know it

    the usual methods of mayhem start coming up short
    and the pilot of my instincts initiates the abort
    cause before the skies to paradise remained clear
    apart from the subtle subtext contributin to fear

    i did hear of a man once whod made it all the way
    only to sit down and been immediately turned away
    they say to live happily is really live in denial
    i might listen after i've been asleep for a while

    through out history, the old ideas haven't failed
    like an old loaf of bread all whithered and stale
    the world promised when youre growing always dies
    to be replaced with a sense of longing, some lies

    have a way of comforting the fact youl never know
    but you turn away, and feel the ever present glow
    of uncertainty, some fear, and unbelievable doubt
    without which we would have nothing to sing about

    said i know now what i didn't know then
    that to do it correct is to do it again
    and if i start over it'll be another no
    the best i can do is to deliva the flow

    because i know life is more than workin
    and that college is the universal quirk
    and i thinks i might just become a poet
    cause we all lost, but they all know it

    you always asked me what i wanted to go out an be
    an i always replied i dont know lets wait and see
    at the time it was a smart response without depth
    but its beginning to come clear that ill be swept

    off of any steady rock i cling on to for too long
    it turns out livin for the moment isnt very wrong
    so as i pack up my suitcase and load my dirty car
    just remember youll never really know who you are

  • Chapter 60: Specific Problems with the General Solution

    I sat down the other day to do a simple thing. I was going to write a C# implementation of a distributed Map/Reduce computation engine, akin to the Google implementation that they use to do “hard” things.

    Coder speak: you provide two function definitions that mimic the Lisp commands Map and Reduce. Applying Map to a large data set is an independent operation for each element, and Reduce can be used to combine the answers of each computation into intermediaries and then finally into one answer. Splitting up the dataset to multiple machines and sharing the Map/Reduce functions makes it easy to do large scale distributed tasks. Hide that in an computation engine and boom, money and fame.

    Non-coder speak: Google wrote about a hard problem, and I’m bored and want to do it.

    But as is generally the case in computer science, the Map/Reduce problem is a specific example of the more general problem of designing a distributed system that can execute arbitrary C# code. The Map/Reduce problem would just be a specific example of a program able to run on the general system. But really, when I start talking about C# I am just using that as a placeholder for Lisp, a functional programming language that is much more suited to the task. So I should implement it in that. But maybe I could make it so that the execution of a language is defined in a grammar, and just write a parser and interpreter.

    Somewhere shortly before my head exploded, I stopped. What had started as a simple enough program (not entirely true) ending up being rewriting an operating system and compiler, all distributed. That’s not just reinventing the wheel, it’s reinventing the Apollo program. Sure, it might be a good time, but it’s a nasty place to end up if you were looking for a casual programming project.

    The problem with programming is that in almost every case the program you need to write is a special case of a more general problem. Whether it be a specific business need or a specific scheme of communication, generality is always more attractive than special cases to programmers. It’s more attractive to philosophers as well.

    A student cheats. Why, and what should be done?

    He cheated because he was out late at a party and doesn’t know the material, and if he doesn’t do well he’ll flunk the course. On a fundamental level he knows that the results of his test scores benefit him in the long run and that the time spent studying distracts from his chances to secure a woman to be his …. how do you say … “baby’s mama”. If he can manage both with the minimum effort, he has maximized his chances at reproductive success by giving himself more time to procreate and a larger monetary means to support them so that they too can be successful. Even more fundamentally he is acting in his own perceived self interest because all humans and animals are inherently selfish creatures. This is the only way it can be because of the law of survival of the fittest. Darwin is God.

    So we let him go, right?

    Nope, he flunks, cause that’s the rule. But it’s hard to keep your eye on the ball if you just generalize away reality.

  • Chapter 59: Everyone has a use

    I yelled at them to stand on the board, to hold in counterbalance the large guys’ weight while he stepped from it to the other platform. In between us was lava, smoldering lava that could burn you if you touched it. Drop a tool in and you don’t get it back out. Drop a person in, well, nobody dies in these sessions, they just don’t come back. Oh, and also in the lava were sharks, razor tooth sharks that would rip you to shreds almost as fast as the lava. I never stopped to ask our leader to explain the biology of the situation; I was interested in keeping people alive.

    I had signed up for an orientation leader position to help incoming freshman adjust to life at my college at the end of my freshman year. Now, the beginning of my sophomore year, we were at a woodland camp near Cleveland doing leadership training exercises in small groups. Get everyone up a large wall, through a small hole, over a pit with a rope, etc. Our current challenge was to navigate between three wooden squares without touching the ground, using only two boards. The ground was lava, and our leader threw in the sharks at the last second, maybe to add a jovial aspect to the perceived life and death situation we were facing. We weren’t feeling jovial.

    We had messed up in the transfer of one of our group. We had accidentally let him bend the board too much, his weight picking up the others who were “standing” on the board. I wasn’t because I was leaning out to help him, but our counterbalance people were only making a half hearted attempt. His foot touched the ground but we picked him up swiftly and pulled him back onto the board. Unfortunately, our leader told us that lava had splashed him in the face, and putting a blindfold over his eyes rendered him blind. Several people cursed.

    It took us a long time to guide him across the chasm of molten rock, but eventually we did. We moved one by one over the double gap that separated us from freedom. Any witness who was watching the scene would know immediately that I not only liked being in charge, but that I was fairly capable. I gave orders constantly and used the team as extensions of myself while moving through the obstacles.

    The blind man was standing on the board counterbalancing someone else when a stray foot made contact with the lava. Our leader/instructor told us that the foot had accidentally kicked some lava into the air, and had burned my mouth, rendering me unable to speak. Being unable to speak, I couldn’t complain, but the silence was broken by a single word uttered by someone in the back.

    “Fuck.”

    We finished the exercise through a combination of my motioning and my friend Amit’s commanding. I would tap him on the shoulder and motion the move, and he would see to it that it was done. It worked slick, though it was hard not being able to talk and the other dude being able to see.

    We were standing in a circle reviewing all that we had learned, and our leader asked me what I had said immediately after the guy was blinded. I didn’t know, but he told me that I had said, “He’s useless.”

    “Now Sam, was that true, was he indeed useless? I noticed you used him as a counterbalance the entire time to great effect. Were you yourself useless after losing one of your abilities and rendering yourself more ineffective? Doesn’t every person have strengths that you can play off of, no matter what their weaknesses?”

    I did learn things at our leadership training camp, though nothing splendidly new or original. Interesting circumstances can build bonds between people who might not know otherwise connect. They put 10 of us through awkward situations and tricky scenarios, and we were all sort of friends on the outside, at least for a brief time afterwards. The other point that was driven home was that I’m bossy to all get out. This time no one got pissed and claimed I was operating on some vile directive to control the world, they all just trusted me.

    Oh yeah, and every team member has a use. I get it, I swear.