0534: "Genetic Algorithms"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

Wolfkeeper
Posts: 130
Joined: Fri Sep 12, 2008 1:59 am UTC

Re: "Genetic Algorithms" Discussion

Postby Wolfkeeper » Fri Jan 23, 2009 8:47 am UTC

The really funny thing is, genetic algorithms really are evil little critters. They really do have no boundaries or ethics and will happily abuse whatever you give them to play with, to a degree that is not funny. But on the upside, they're super-dumb and really slow, so I've never had to do more than beat my printer to death, to date. :wink:

potatolicious
Posts: 1
Joined: Fri Jan 23, 2009 8:45 am UTC

Re: "Genetic Algorithms" Discussion

Postby potatolicious » Fri Jan 23, 2009 8:48 am UTC

Randall you fool! If you make the number too large it will overflow and wrap when you start summing up your navigation cost! Then if you minimize the function...

User avatar
Beacons!
Posts: 213
Joined: Thu May 29, 2008 2:17 pm UTC
Location: The Grand Unifying Intermahweb

Re: "Genetic Algorithms" Discussion

Postby Beacons! » Fri Jan 23, 2009 9:24 am UTC

At last! A comic I don't understand, haven't seen that in a while. Xkcd is back on form.
"Woof!", explained the dog

martinw89
Posts: 16
Joined: Tue Jul 24, 2007 4:48 am UTC
Contact:

Re: "Genetic Algorithms" Discussion

Postby martinw89 » Fri Jan 23, 2009 9:40 am UTC

potatolicious wrote:Randall you fool! If you make the number too large it will overflow and wrap when you start summing up your navigation cost! Then if you minimize the function...

Python's ints/floats can be of arbitrary size :)
In Python, you can even see into the __future__!

irfan9727
Posts: 2
Joined: Fri Jan 23, 2009 10:02 am UTC

Re: "Genetic Algorithms" Discussion

Postby irfan9727 » Fri Jan 23, 2009 10:08 am UTC

http://www.wreck.devisland.net/ga/ interesting generic algorithm written in flash.
(from the author: "This is a GA I wrote to design a little car for a specific terrain. It runs in real-time in Flash. The fitness function is the distance travelled before the red circles hit the ground, or time runs out. The degrees of freedom are the size and inital positions of the four circles, and length, spring constant and damping of the eight springs. The graph shows the "mean" and "best" fitness.")

I almost died in laughter after reading this comic.

User avatar
Thrice Great
Posts: 24
Joined: Tue Jan 13, 2009 11:12 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Thrice Great » Fri Jan 23, 2009 10:50 am UTC

I have clue what genetic algorithms are, but I have seen all the Terminator movies.
Last edited by Thrice Great on Tue Jan 27, 2009 3:27 am UTC, edited 1 time in total.

Teutates
Posts: 2
Joined: Mon Sep 03, 2007 8:05 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Teutates » Fri Jan 23, 2009 10:52 am UTC

I really expected more "get out of my head, randall"-answers

Happened to me, I was just starting a little GA-project myself when I saw the comic :)
The only time I followed through this sort of project was in AI class, solving the TSP problem (works pretty well to get a good solution fast, though you shouldn't expect to get a perfect one). Recently this guy made GAs popular again.

Genetic programming is also very interesting (a subset of GA, your specimens are programs), but I never figured out what kind of language and virtual machine would be best... would be the perfect breeding ground for skynet though

Bunsen
Posts: 4
Joined: Tue Apr 01, 2008 2:41 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Bunsen » Fri Jan 23, 2009 11:35 am UTC

plams wrote:Will you believe I got a mid-air collision with you because I posted the same god damn thing?! Star Control 2 reprazzenT!

I think that just means we're predictable.
PRIORITY OVER-RIDE. NEW BEHAVIOR DICTATED.
MUST BREAK TARGET INTO COMPONENT COMPOUNDS.

User avatar
Ptolom
Posts: 1551
Joined: Mon Mar 24, 2008 1:55 pm UTC
Location: The entropy pool
Contact:

Re: "Genetic Algorithms" Discussion

Postby Ptolom » Fri Jan 23, 2009 12:11 pm UTC

Bunsen wrote:
plams wrote:Will you believe I got a mid-air collision with you because I posted the same god damn thing?! Star Control 2 reprazzenT!

I think that just means we're predictable.
PRIORITY OVER-RIDE. NEW BEHAVIOR DICTATED.
MUST BREAK TARGET INTO COMPONENT COMPOUNDS.

Heh, your problems have only just begun. (Cue sinister Ur-Quan theme music)

User avatar
frogger626
Posts: 19
Joined: Sun Aug 03, 2008 4:47 am UTC
Location: Salina, KS
Contact:

Re: "Genetic Algorithms" Discussion

Postby frogger626 » Fri Jan 23, 2009 1:16 pm UTC

Uh, guys? I checked the comic about 6:30 central this morning, and it was up fine. Now, I try to find it at 7:15 (again, central) and it's gone. Thread's here, but the comic is gone.

What's going on?
Admit nothing, deny everything, die controversial.
Image
3.25.09- LEST WE FORGET

Chalnoth
Posts: 34
Joined: Thu Dec 13, 2007 9:37 am UTC

Re: "Genetic Algorithms" Discussion

Postby Chalnoth » Fri Jan 23, 2009 2:32 pm UTC

Love the comic! ;)

Unfortunately, the reality is, how could you write an algorithm to determine whether or not the code had become skynet?

GreaterSteven
Posts: 110
Joined: Thu Apr 24, 2008 1:23 am UTC

Re: "Genetic Algorithms" Discussion

Postby GreaterSteven » Fri Jan 23, 2009 2:36 pm UTC

Normally I disagree with xkcd overrated (the post isn't even up yet, but I know what it's going to say).

That's like the 80th terminator reference in the comic.

I don't mind using code all the time, it offers fantastic humor opportunities. But more terminator references?

User avatar
phillipsjk
Posts: 1213
Joined: Wed Nov 05, 2008 4:09 pm UTC
Location: Edmonton AB Canada
Contact:

Re: "Genetic Algorithms" Discussion

Postby phillipsjk » Fri Jan 23, 2009 2:41 pm UTC

I find the Terminator series of movies believable, save for the time-travel aspects. I don't think we will be able to "write" a "true AI", It will be an accident. With the current state of computing, I envision a cross-platform self-modifying worm that runs using machine code. It would be able to bypass OS checks by way of deliberate or accidental back-doors on the ubiquitous x86 chips. That is to suggest: hardware monoculture coupled with hardware bugs may doom us all!

That said, I was never worried about genetic algorithms. It is my understanding that they always have a well-defined problem and run in a sandbox. Any AI facilitating code will not be optimal for the problem at hand (For a large subset of problems anyway).

Eternal Density wrote:...The colleague was explaining how he made a multi-layered GA so that the genetic algorithm itself is optimised by a genetic algorithm. This leads to some interesting results. It also caused me to mentally paraphrase, "Yo dawg, I heard you like genetic algorithms, so I put a genetic algorithm in your genetic algorithm so you can evolve while you evolve."...


Now, I did not think of that. The description is not clear, so it may or may not throw my assumptions out the window. I presume that the outer layer has the properties I described.
Did you get the number on that truck?

canis.uk
Posts: 1
Joined: Fri Jan 23, 2009 2:52 pm UTC

Re: "Genetic Algorithms" Discussion

Postby canis.uk » Fri Jan 23, 2009 2:54 pm UTC

Closer to the real topic, all efforts as described in this comic are wasted if you type 'import skynet'.
Although, if Skynet is sitting in a module on your computer ready to be imported, you're already doing it wrong...

Just in case, I'd recommend:

Code: Select all

from __future__ import kyle_reese
Last edited by canis.uk on Fri Jan 23, 2009 2:59 pm UTC, edited 1 time in total.

abstractpotato
Posts: 44
Joined: Mon Jan 19, 2009 5:28 pm UTC
Location: California
Contact:

Re: "Genetic Algorithms" Discussion

Postby abstractpotato » Fri Jan 23, 2009 2:57 pm UTC

HAHAHHAHAHAHAHHAHAHA!
Brilliant!

vince9663
Posts: 2
Joined: Fri Jan 09, 2009 1:43 pm UTC

Re: "Genetic Algorithms" Discussion

Postby vince9663 » Fri Jan 23, 2009 3:01 pm UTC

As an extra safeguard, you might also want to add:

"ProtectJohnConnorCost = 1"

User avatar
6453893
Posts: 557
Joined: Wed Dec 13, 2006 2:40 am UTC
Location: Australia

Re: "Genetic Algorithms" Discussion

Postby 6453893 » Fri Jan 23, 2009 3:11 pm UTC

For all those who complained xkcd had lost its nerdiness; this one was completely inaccessible to me.

User avatar
Sprocket
Seymour
Posts: 5939
Joined: Mon Mar 26, 2007 6:04 pm UTC
Location: impaled on Beck's boney hips.
Contact:

Re: "Genetic Algorithms" Discussion

Postby Sprocket » Fri Jan 23, 2009 3:14 pm UTC

Oh no Randall, are you going to make me start watching Sarah Connor Chronicles again...?
"She’s a free spirit, a wind-rider, she’s at one with nature, and walks with the kodama eidolons”
Image
Image
Image
Image
Image
Zohar wrote: Down with the hipster binary! It's a SPECTRUM!

dracolytch
Posts: 15
Joined: Fri Sep 28, 2007 11:39 am UTC

Re: "Genetic Algorithms" Discussion

Postby dracolytch » Fri Jan 23, 2009 3:41 pm UTC

Dear Randall,
From someone who's actually programmed a few of these, I say unto you: Spoilsport.

~D

User avatar
podbaydoor
Posts: 7533
Joined: Sun Sep 02, 2007 4:16 am UTC
Location: spaceship somewhere out there

Re: "Genetic Algorithms" Discussion

Postby podbaydoor » Fri Jan 23, 2009 3:43 pm UTC

*watches as the comic flutters by over her head, beautiful little thing*
tenet |ˈtenit|
noun
a principle or belief, esp. one of the main principles of a religion or philosophy : the tenets of classical liberalism.
tenant |ˈtenənt|
noun
a person who occupies land or property rented from a landlord.

dracolytch
Posts: 15
Joined: Fri Sep 28, 2007 11:39 am UTC

Re: "Genetic Algorithms" Discussion

Postby dracolytch » Fri Jan 23, 2009 3:54 pm UTC

Chalnoth wrote:Love the comic! ;)

Unfortunately, the reality is, how could you write an algorithm to determine whether or not the code had become skynet?


Well, the pseudocode would look something like this...

Code: Select all

foreach (entity e in population) {
  if (e.askTFQuestion("Are you self aware?") == true) {
    if (e.askQuestion("What is your name?").toLower() == "skynet") {
      population.assasinate(e);
    }
  }
}


~D

Edrick
Posts: 1
Joined: Fri Jan 23, 2009 4:08 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Edrick » Fri Jan 23, 2009 4:13 pm UTC

Teutates wrote:I really expected more "get out of my head, randall"-answers

Happened to me, I was just starting a little GA-project myself when I saw the comic :)
The only time I followed through this sort of project was in AI class, solving the TSP problem (works pretty well to get a good solution fast, though you shouldn't expect to get a perfect one). Recently this guy made GAs popular again.

Genetic programming is also very interesting (a subset of GA, your specimens are programs), but I never figured out what kind of language and virtual machine would be best... would be the perfect breeding ground for skynet though

At least I'm not the only one. Just last night I was discussing using AI stuff to figure out a certain issue we're having with a program we're designing. If we go that route, I'll definitely be including this line, because it'd be too careless of me not to. :)

User avatar
Nemphael
Posts: 422
Joined: Fri Sep 12, 2008 9:44 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Nemphael » Fri Jan 23, 2009 4:42 pm UTC

I've come to think about something. Literature states any AI must kill humankind.

We're doing something wrong.

User avatar
dennisw
Posts: 439
Joined: Wed Nov 05, 2008 9:09 am UTC
Location: Appearing pro se AND pro bono!
Contact:

Re: "Genetic Algorithms" Discussion

Postby dennisw » Fri Jan 23, 2009 4:55 pm UTC

dracolytch wrote:
Chalnoth wrote:Love the comic! ;)

Unfortunately, the reality is, how could you write an algorithm to determine whether or not the code had become skynet?


Well, the pseudocode would look something like this...

Code: Select all

foreach (entity e in population) {
  if (e.askTFQuestion("Are you self aware?") == true) {
    if (e.askQuestion("What is your name?").toLower() == "skynet") {
      population.assasinate(e);
    }
  }
}


~D

ERROR: Critical exception thrown: There are two asses in "assassinate".
Try the Printifier for xkcd. You can now scale the comic between 50 and 150%.

I find these very useful: Common Errors in English Usage (web site) and Eats, Shoots & Leaves (book). You may, too.

e pluribus unum
Unleash unlicensed ungulates!

User avatar
rqm
Posts: 42
Joined: Wed Dec 05, 2007 7:30 pm UTC
Location: Mars
Contact:

Re: "Genetic Algorithms" Discussion

Postby rqm » Fri Jan 23, 2009 5:16 pm UTC

Now I know I'm not the only one using Java naming conventions on python variable names :D

Now TRWTF is defining these constants in the function's suite, it would made more sense to pull them from configuration or at least attach them to the function's instance

Code: Select all

>>> def foo(n, mul = None):
   if mul:
      foo.mul = mul
   return n * foo.mul
>>> foo.mul = 2
>>> foo(8)
16
>>> foo(6)
12
>>> foo(6, mul = 3)
18
>>> foo(4)
12
>>>

Game_boy
Posts: 1314
Joined: Tue Mar 04, 2008 7:33 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Game_boy » Fri Jan 23, 2009 5:22 pm UTC

I've just done a whole A-level maths module on this (Decision Maths 1). This is linear programming (solving for optimal values of variables to maximise or minimise a given output such as cost) and network theory (where each option has a cost, or weight, associated with it). It's... boring and repetitive done by hand, but useful. There's no scope for using a computer to help in the exam, so though I can code algorithms to do all of this I still had to do it on paper.

Oh, and the joke's good.
The Reaper wrote:Evolution is a really really really long run-on sentence.

Axantur
Posts: 3
Joined: Mon Aug 20, 2007 10:28 pm UTC
Location: Mipitas, CA

Re: "Genetic Algorithms" Discussion

Postby Axantur » Fri Jan 23, 2009 5:23 pm UTC

I would like to know just what xkcd has against Skynet.

http://www.skynetusa.com/

They make damn fine power supplies. Best in the business, or thereabouts, I'd say. Why so much hate form xkcd?

Applecrate
Posts: 1
Joined: Fri Jan 23, 2009 6:04 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Applecrate » Fri Jan 23, 2009 6:07 pm UTC

Garnett wrote:

Code: Select all

PROBE BEHAVIORS (With assigned priorities).
Communicate (5).
Record Data (4).
Analyze Data (3).
Seek Replication Materials (999).
Move to Current Target (1).


One of the best games in the history of ever.

User avatar
Brooklynxman
Because I'm Awesome
Posts: 609
Joined: Tue Jan 20, 2009 4:27 pm UTC
Location: Here
Contact:

Re: "Genetic Algorithms" Discussion

Postby Brooklynxman » Fri Jan 23, 2009 6:23 pm UTC

algorithmInstallsWindows = 999999999;

also

algorithmInstallsVista should cause a fatal error.
We figure out what all this means, then do something large and violent

The thing about changing the world...once you do it the world's all different.

I'm Angel. I beat the bad guys.

Spoiler:
Image

madAlric
Posts: 10
Joined: Wed Jul 30, 2008 9:21 pm UTC

Re: "Genetic Algorithms" Discussion

Postby madAlric » Fri Jan 23, 2009 6:58 pm UTC

Axantur wrote:I would like to know just what xkcd has against Skynet.

http://www.skynetusa.com/

They make damn fine power supplies. Best in the business, or thereabouts, I'd say. Why so much hate form xkcd?


It's also a military communications satellite.
http://news.bbc.co.uk/2/hi/science/nature/6434773.stm

[edit for spelling. IE still does not do spell-check.]

User avatar
ubergeek
Posts: 11
Joined: Thu Dec 18, 2008 10:45 pm UTC

Re: "Genetic Algorithms" Discussion

Postby ubergeek » Fri Jan 23, 2009 8:57 pm UTC

That code is written in Ruby, by the way.

Yay, Ruby!

joeyhndc
Posts: 22
Joined: Mon Aug 25, 2008 4:34 am UTC

Re: "Genetic Algorithms" Discussion

Postby joeyhndc » Fri Jan 23, 2009 8:58 pm UTC

Nemphael wrote:I've come to think about something. Literature states any AI must kill humankind.

We're doing something wrong.


thisalgorithmharminghumancost = 999999

thisalgorithmallowinghumantocometoharmthroughinactioncost = 999999

thisalgorithmobeyinghumandirectionscost = 0

thisalgorithmprotectingitsownexistencecost = 100

I realize that this should be a hardware implementation, but I wanted to put it in context.

kEnder
Posts: 3
Joined: Wed Mar 12, 2008 8:13 pm UTC

Slylandro Probe

Postby kEnder » Fri Jan 23, 2009 9:23 pm UTC

UQM was the first thing that came to mind when reading this comic

http://wiki.uqm.stack.nl/Probe
The Probe's internal set of instructions is reproduced here:

SCAN (for targets, as defined in Target List).
IF (no current target).
THEN (select New target from Current Targets list, using specified priorities).
IF (Current Position is AT Current Target).
THEN (Set Current Behavior to New Behavior, based on Behavior Priority Settings).
PERFORM (Current Behavior).

The Probe uses the following datatables:

TARGET LIST (with associated Target Priority).
Space Vessel (5).
Transmission Source (4).
Astronomical Anomaly (3).
Planet Bearing Life Signature (2).
Raw Replication Materials (1).
PROBE BEHAVIORS (With assigned priorities).
Communicate (5).
Record Data (4).
Analyze Data (3).
Seek Replication Materials (999).
Move to Current Target (1).

What could possibly go wrong?!

Scien
Posts: 1
Joined: Fri Jan 23, 2009 9:24 pm UTC

Re: "Genetic Algorithms" Discussion

Postby Scien » Fri Jan 23, 2009 9:27 pm UTC

Apparently crossing water really sucks. Eventually you have crossed enough water that even this algorithm becoming skynet looks like a better option.

CleverClothe
Posts: 4
Joined: Tue Jan 13, 2009 9:31 pm UTC

Re: "Genetic Algorithms" Discussion

Postby CleverClothe » Fri Jan 23, 2009 9:56 pm UTC

It should also be noted that if you are using Genetic Programing on DNA, you should include this:

Code: Select all

    thisSampleBecomingKwisatzHaderachCost = 999999999


Alternatively, you could negate that value if you are trying to counter the possibility of Skynet.

wildhalcyon
Posts: 9
Joined: Tue Oct 09, 2007 3:14 pm UTC

Re: "Genetic Algorithms" Discussion

Postby wildhalcyon » Fri Jan 23, 2009 10:06 pm UTC

dennisw wrote:The implication is that genetic algorithms could lead to self-aware computers, a la Skynet from the Terminator films (see reference in an earlier post). This is also in keeping with the idea of a technological singularity in which machine intelligence surpasses human intelligence and the potential problems resulting such as the decision by the machines that we are inferior and unnecessary.

See also Asimov's Three Laws of Robotics.


And Alan Turdyk played Sonny the robot in I, Robot. The circle of Firefly is complete!

manchild
Posts: 1
Joined: Fri Jan 23, 2009 10:01 pm UTC

Re: "Genetic Algorithms" Discussion

Postby manchild » Fri Jan 23, 2009 11:56 pm UTC

dennisw wrote:The implication is that genetic algorithms could lead to self-aware computers, a la Skynet from the Terminator films (see reference in an earlier post). This is also in keeping with the idea of a technological singularity in which machine intelligence surpasses human intelligence and the potential problems resulting such as the decision by the machines that we are inferior and unnecessary.

See also Asimov's Three Laws of Robotics.


A major story line in the current TV series Terminator: The Sarah Connor Chronicles involves creating the AI that leads to Skynet. This is being orchestrated by a known (by the audience and maybe one other character anyway) Terminator as head of an upstart tech company trying to develop a better algorithm for traffic control. This Terminator (played by Shirley Manson from Garbage) knows the that this algorithm leads to the birth, or "technological singularity", of the AI which leads to Skynet, but not the specifics to achieve it. This is a self fulfilling agenda set forth by Skynet to send a Terminator back in time in order to create/gently nudge the technology forward that leads to the creation of Skynet. Which came first: the Terminator or the algorithm? My mind hurts...no, it's not a tumor.

I think Randall's joke is that he must acknowledge the small possibility, and extremely high cost if it came true, that his algorithm could lead to the fictional outcome in the Terminator universe.

Further (to the commenter that thinks Randall references Terminator too much), I think Mr. Munroe is actually referencing Last Action Hero by way of Terminator by indicating that events in both reality and on-screen could somehow intermingle.

User avatar
kriel
Posts: 922
Joined: Thu Feb 07, 2008 2:58 pm UTC
Location: Somewhere I'm not.
Contact:

Re: "Genetic Algorithms" Discussion

Postby kriel » Sat Jan 24, 2009 12:25 am UTC

irfan9727 wrote:http://www.wreck.devisland.net/ga/ interesting generic algorithm written in flash.
(from the author: "This is a GA I wrote to design a little car for a specific terrain. It runs in real-time in Flash. The fitness function is the distance travelled before the red circles hit the ground, or time runs out. The degrees of freedom are the size and inital positions of the four circles, and length, spring constant and damping of the eight springs. The graph shows the "mean" and "best" fitness.")
-just... stares...-
Friend: Oh! It moved! Go, little guy, go!

User avatar
The Scyphozoa
Posts: 2871
Joined: Sun Jun 01, 2008 6:33 pm UTC
Location: Sector 5

Re: "Genetic Algorithms" Discussion

Postby The Scyphozoa » Sat Jan 24, 2009 12:39 am UTC

Never seen Terminator, and I did read the top of the wiki page, and I don't know python, and I don't get it, so...
I guess I misplaced my cheese.

(Is that a good term for not getting it?)
Image
3rdtry wrote:If there ever is another World War, I hope they at least have the decency to call it "World War 2: Episode One"

doogly wrote:murder is a subset of being mean

almightyze
Posts: 72
Joined: Wed Jul 23, 2008 9:06 am UTC

Re: "Genetic Algorithms" Discussion

Postby almightyze » Sat Jan 24, 2009 1:02 am UTC

Wow...this one doesn't seem popular.

Then again, I understood the joke, but it wasn't funny. He accidentally the punchline.
01010011 01110100 01101111 01110000 00100000
01110010 01100101 01100001 01100100 01101001
01101110 01100111 00100000 01100010 01101001
01101110 01100001 01110010 01111001 00101110

Allah o akbar! Azadi!


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: mashnut and 55 guests