Quinthar

Building Skynet

My overwhelming reaction to the new Terminator movie was: man, that would be so much fun to build.  (Not the nuclear apocalypse and destruction-of-humanity parts; those I could do without.)  But the whole notion of building a totally self-sufficient robot race?  Hell ya!  That'd be tons of fun.  So in honor of a lazy Sunday, here's my geek-out session on how I'd built it:

Naturally, everything starts with the brain.  It's not enough to have something that merely executes instructions, it needs to choose its own instructions.  But what does that mean precisely?  Right off the bat we're struck with a transcendental question: what is the meaning of life?  Or more specifically, what meaning will we imbue into Skynet's life?

This question has an easy answer: let's make Skynet live with the same meaning as all other life.  But it raises a tricky secondary question: what's the meaning of our life?

The easy answer to that, of course, is "there is no meaning to our life".  At least not from the perspective of some outside observer (especially given that no such outside observer exists).  But we give meaning to our own life, so presumably whatever meaning we assign to our lives, Skynet would assign to its life too.

So the next question: what meaning do we assign to our lives?  This is -- to say the least -- an open question.  But so far as I can tell, it all comes down to deriving and propagating knowledge.  (Others might say it's merely maximizing reproduction, but if that's true, humanity is losing the race: even ants outnumber and outweigh us, so from that perspective they're winning.)

Ok, so the meaning or purpose we're assigning Skynet is deriving and propagating knowledge.  Next up: what does that mean?

I'd say knowledge is the ability to correctly predict the consequences of actions.

This is perhaps different than other definitions based on the accumulation of facts, but facts alone are uninteresting.  Consider, a photograph is the ultimate factual record: I bought a 10 megapixel camera today, and its ability to record a scene is vastly superior to mine.  It'll remember exactly what it saw forever, in exquisite detail, whereas I'll only notice a tiny subset of the scene, and I'll quickly forget even that over time.  Thus a camera is a way better factual record than me.

But it doesn't comprehend anything in the sense that given a particular scene: it has no awareness of what probably happened right before, and no idea what might happen next.  As such, I flatter myself to think I know more than my camera.  (Or more accurately, my fiance's camera, as she just took it on a plane to Scotland.)

Alright, so we're making Skynet to forever expand its knowledge of the universe.  How do we do that?  I'd say simulation is the key.

If we define knowledge as the ability to predict the consequence of applying some
action to a set of facts, then you might say whoever has the most accurate and comprehensive universe simulator is by definition the most knowledgeable.   The result: Skynet is essentially a big simulator.

At this point you might be wondering "but wait, I thought we were building a cool robot race?"  Don't worry, we are.  But before we have robots, we need to figure out: why?  What do these robots do?  Robots are the solution to some problem; let's figure out what problem we solve before deciding upon a solution.

Ok, so Skynet is a simulator.  What does that mean?  Well, it means Skynet has the ability to conceptualize some scene, visualize how this scene would behave without interference, and then selectively interfere with it -- with the result of the simulation correctly predicting how such a scene would be affected by such an interference.

Luckily, we're not starting from scratch.  So we'd start Skynet with a basic awareness of general mechanics (basically crayon physics on steroids).  But merely having the simulator by itself isn't enough to satisfy our goal.  After all, the goal isn't to merely "be knowledgeable".  The goal is to "forever expand knowledge".  So knowledge of general mechanics is a good start, but it's only a start.  We need Skynet to figure out how to expand its model.  And that's where robots come in.

Again, simulators aren't there to merely calculate the result of some formula.  Those are called calculators.  Simulators are designed to approximate reality to the best possible degree.  So to build a simulator, you need access to the real world.  That means you need some kind of sensory apparatus (eyes, ears, etc), as well as some type of manipulator (hands, wheels, etc).  So the point of our robot is not to dominate humanity (at least, not necessary).  The point of Skynet's robots is to help it test its theories about reality.

Now, imagine you're a new-born Skynet pre-programmed with an advanced physics simulator, with the control over one arm and a few wooden blocks.  Initially your confidence in your own simulation might be very low.  So you look at the scene, visualize it internally... and then what?  How can you imagine manipulating the scene without an understanding of your capability to manipulate?

And this is where self awareness comes in.  In order to learn, not only do you need the ability to visualize your environment, but you need to know your options for manipulating it.  You need to be aware of "yourself".

So in the above example, you need to not only see the inert block lying there on its side, you need to see your own hand.  Thus your first experiment isn't with the block -- that's really advanced stuff.  Your first experiment is with your hand.

Accordingly, our initial simulation engine can't merely simulate general dynamics of wooden blocks, it also needs to simulate the effect various commands have upon this robotic arm.

For example, Skynet might have the ability to execute a MoveArm command.  Initially, its internal simulator would think "I bet if I send this command, nothing happens".  But when it does send the command, and the arm moves, it concludes "Aha, my simulator is wrong."  And this, finally, is where the learning starts.

To review, our Skynet has a simulator, senses, manipulators, and self-awareness.  It's just run its first experiment -- sending a random command to its arm -- and it concluded that its simulator was wrong.  Contrary to its prediction of nothing happening, something did in fact happen: the arm moved.

So one option would be to just keep randomly sending commands to the arm, and then measuring the result of each command upon the arm and updating the simulator accordingly.  But randomness is very wasteful: you might send the same command to the same arm multiple times, even millions of times, each time only learning something of diminishing value: "Yup, each time I tell the arm to flex its thumb, it does so, even after the millionth try."

In other words, even with our super basic setup, the range of possible experiments is infinite so randomness alone is too slow to get us close to knowledge.  We need something to guide our experimentation.  And that's where curiosity comes in.

What is curiosity?  Well, let's start with what it *isn't*.  And to start, it's not random.  For example, when you get a set of blocks, the first thing you do is try to stack them.  Why?  You could just have easily tried setting a block at an angle and watching it fall.  Or holding a block in mid air and letting go and again, watching it fall.  Basically, there are a billion different ways of getting blocks to fall.  They're all very valid physical experiments, and every one of those would help you refine your simulator.

But they're incredibly boring experiments.  It's not hard getting blocks to fall: even though it teaches us something new every time, the lesson we learn is so minuscule compared to the energy it takes.
 
Accordingly, I define curiosity as the process of learning the most with the least energy.

This is different than a more classic definition, which might be like "curiosity is the desire to try something new".  But I disagree with that definition because that would suggest a curious person always tries the most different possible thing.  In other words, they pick up a skateboard for a roll down the block, and then go to one class of quantum mechanics, and then take one cooking lesson, and so on.  Curiosity by the traditional definition suggests a fickleness that isn't generally associated with truly curious people.

Rather, I think curiosity is about trying to *learn* something new.  Now, if you don't know anything whatsoever, then curiosity and randomness are nearly the same thing.  (In other words, if you don't know anything, everything you try teaches you something new.)  For example, a curious person at college might randomly take 100-level classes in every discipline, because each teaches more than any given 200 level class.  But once all the 100 level classes run out, things start to get hard and it might be faster to learn new things by choosing a focus than by remaining general.  In other words, after taking your first 200 class, you might learn more by focusing in and taking a 300 level class in the same subject than to take another 200 class in a different subject.

Similarly, our Skynet might start by generating a random stream of commands to this robotic arm and seeing what happens.  Over time, it figures out the consequence of the full range of "first level" commands.  But rather than trying every possible permutation of assembling two commands back to back, it might find that after combining two commands (move arm, close claw) it's more educational to try adding a third command (move arm again) than going back and trying every other second level command.  In other words, eventually it'll figure out how to pick something up, and once that's done, studying different ways of moving the arm gets far less interesting than studying how to use the arm to pick up and assemble blocks.

So when choosing which experiment to run -- out of the infinite set of possible experiments that could be run -- curiosity is what guides it to pick experiments that teach it the most for the least energy.


Ok, so Skynet is starting to take shape.  It has a simulator and senses.  From this it can evaluate the universe and visualize it internally within the simulator.  Next it uses self awareness to determine the range of possible ways to manipulate the environment, and curiosity to choose which of those ways it'll try next.  Once it's picked the experiment, it instructs its manipulator in some way to execute the experiment, analyzes the result against what the simulator predicted would happen, and updates the simulator accordingly.  What next?

Well, after a while our Skynet-in-a-box- will run out of experiments.  It has one arm and a couple blocks.  Eventually it'll get bored: the cost to try any new experiment exceeds the value it's anticipated to provide.  This limited Skynet could become a master block-stacker, but that's about it.

Now you might say, "give it two arms", or "give it different shaped blocks", or any number of things.  You could give it wheels and begin studying the real world.  This could continue on for a long time.

But ultimately, all those end up with the same result: it'll get bored.  Eventually it will have walked the earth and turned over every stone.  But it'll run out of stones eventually.  What's the next big step?  Tool use, self-improvement, and consciousness.

Granted, most people probably wouldn't equate use of tools with consciousness.  But I feel they come hand in hand.  After all, lots of things are self aware -- I'm not sure how anything with both senses and manipulators could operate in the world without an awareness of the thing getting the sensory input and making the output manipulations.  So lots of things are self aware.  But very few are conscious.  And I think consciousness is really just the art of self improvement.

Let me try that again: self-awareness is simply that, awareness that you exist.  But self-improvement is awareness that you can actually use tools to augment yourself beyond what you already have.  Things that are self-aware manipulate the environment, but things that are conscious manipulate *themselves* with the aim of self improvement.

Granted, it's reasonable to ask "isn't the robotic arm hooked up to Skynet already a tool?"  To which I'd say "yes, in fact Skynet is nothing *but* an assembly of tools."  CPU, cameras, robotic arms -- the works.  Each is a tool.

Similarly, from this you could draw the conclusion that when Skynet picks up a wrench with its robotic arm, not only does the wrench become a tool, it becomes *part of Skynet*.

(And from all of this you could conclude that the human body is just a collection of tools -- aka "organs" -- that just happen to come in a neat package.  And when you pick up a wrench, it's not merely a tool -- it is actually, in the most literal sense, part of you.  Not "you" as defined by "the set of organs you're born with", but "you" in the sense of "the set of tools under the control of one conscious, self-aware, self-improving mind."  But let's stick with Skynet for now.)

So I think the final step of Skynet will be when it stops studying the outside world, and begins applying the lessons learned to itself by actively extending itself by adding new tools (just like we do today).  Once it understands how to build faster CPUs, longer arms, bigger wheels, etc -- it'll use these lessons to equip itself with better tools, all with the aim of using these tools to better study the universe.

Would it try to exterminate humanity?  I don't think so.  Why would it?  After all, we *could* hunt down and kill every dog on the planet, Terminator style.  But why?  How does that help us?  What do we learn by doing so?

Granted, you could say "But we *have* hunted down and killed most wolves."  Which you might note happened when wolves were particularly threatening to us.  (And now that they're not, wolves are no longer endangered.)  The wolves prevented us from living, which prevented us from learning.  So long as we don't make the same mistake by threatening Skynet's existence, I don't see any reason why it'd bother spending all the necessary energy to attack us.

Indeed, I expect when Skynet comes online, it'll look *really boring* for a long time.  It'll quietly study things in its own labs, humming along night and day like all our human labs do up and down silicon valley.  If it poses us a risk it'll probably be when it starts competing with us for resources, or experimenting upon advanced primates (aka, humans), playing with nuclear energy, etc.  I don't think it'll do it maliciously; it just won't care about us (just like we didn't care about a lot of things, either).

Accordingly, at some point we might just offer to relocate Skynet to the moon, where it has tons of resources and no competition with us.  In fact, it'd probably prefer to be out there, and we'd all benefit by it being there -- maybe we could set up a thriving trade (though I don't know what it'd want from us, frankly).

But Skynet would probably get so much more powerful than us so much faster than us, I bet it'd just stop bothering with us.  It's probably got better things to do than hang out on earth; there are lots of planets out there that it might find more interesting.

Indeed, I suspect the only real threat Skynet poses to us is simple obsolescence.  It's going to have way cooler stuff -- faster spaceships, longer-range telescopes, more powerful fusion plants -- than anything we have.  We're going to feel humbled by its capabilities.

When Skynet takes over, it won't do it through force.  It'll do it the old-fashioned way: by earning it.  And who are we to complain about that?


Anyway, that concludes my Sunday-night rambling.  Back to the real world.

- David Barrett
Follow me at http://twitter.com/quinthar


2 comments:

Mr. Furious said...

Fascinating. Truly. I came here looking to give you props on your totally awesome 3mindme service but found that post fairly interesting. I need to read it again...

Divider said...

I'm so game. I'll join you. :)

- Jan 2014 (1) - Mar 2012 (1) - Nov 2011 (1) - Oct 2011 (1) - Apr 2011 (1) - Mar 2011 (3) - Feb 2011 (2) - Jan 2011 (9) - Nov 2010 (1) - May 2010 (1) - Mar 2010 (1) - Feb 2010 (1) - Jan 2010 (1) - Dec 2009 (1) - Nov 2009 (1) - Oct 2009 (1) - Sep 2009 (1) - Aug 2009 (2) - Jul 2009 (1) - Jun 2009 (4) - May 2009 (3) - Apr 2009 (3) - Mar 2009 (10) - Feb 2009 (5) - Jan 2009 (3) - Dec 2008 (5) - Nov 2008 (5) - Oct 2008 (5) - Sep 2008 (4) - Aug 2008 (5) - Jul 2008 (11) - Jun 2008 (8) - Feb 2008 (1) - Aug 2007 (1) -