RSS 2.0 Feed

» Welcome Guest Log In :: Register

    
  Topic: Cool idea for a GA?, come on one of you coders...< Next Oldest | Next Newest >  
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 02 2009,14:34   

Okay, here's the premise.

we create an equation, with just 2 variables, randomly.


let's say y=x^2+3x-8

which would give us a data set of:

DATA SET
y x
-4 1
2 2
10 3

We then go about building equations where the genome is basically pairs of arithmetic operators and coefficients.

let's limit it to

+
-
/
*
^

and

-9
-7
-6
-5
-4
-3
-2
-1
0
Y
1
2
3
4
5
6
7
8
9

If we created a random population of equations using the above pairings, we could probably manipulate them genomically. We could have mutation:

+8 > +Y  or -3 > *3

Deletion

+8 > *nothing*

Duplication

+8 > +8+8

sexual selection, etc.

I'm sure most simple equations could be solved using this method. Obviously the fitness function comes from the data table.


Very rough idea. Someone please build, improve then give me credit.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 02 2009,15:12   

Quick follow up -
I'm thinking this could be a good instructional tool for showing evolution in action, as most people could follow along what was happening if you stepped through slowly.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Cubist



Posts: 346
Joined: Oct. 2007

(Permalink) Posted: Mar. 02 2009,17:37   

Hmmm... you've got a population of whatzits to evaluate, those being the (X, Y) number-pairs... you've got a protocol for assigning values to the whatzits... but where's the fitness function that decides which of the whatzits gets to propagate itself along to the next 'generation', and which of the whatzits is cruelly forgotten?

  
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 02 2009,18:10   

variance to the actual x and y values given. cull the bottom z%, mutate back up to full population, rinse, repeat.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
J-Dog



Posts: 4360
Joined: Dec. 2006

(Permalink) Posted: Mar. 02 2009,19:23   

Quote (Richardthughes @ Mar. 02 2009,18:10)
variance to the actual x and y values given. cull the bottom z%, mutate back up to full population, rinse, repeat.

Rich - GIGO - If you cull the bottom 2%, it clearly is not reality.   We know from actual observation that the bottom 2% is not eliminated - they just post at UD.

--------------
Come on Tough Guy, do the little dance of ID impotence you do so well. - Louis to Joe G 2/10

Gullibility is not a virtue - Quidam on Dembski's belief in the Bible Code Faith Healers & ID 7/08

UD is an Unnatural Douchemagnet. - richardthughes 7/11

  
Kristine



Posts: 3037
Joined: Sep. 2006

(Permalink) Posted: Mar. 02 2009,19:41   

Just remember, there are only two answers... :p :D

--------------
Which came first: the shimmy, or the hip?

AtBC Poet Laureate

"I happen to think that this prerequisite criterion of empirical evidence is itself not empirical." - Clive

"Damn you. This means a trip to the library. Again." -- fnxtr

  
J-Dog



Posts: 4360
Joined: Dec. 2006

(Permalink) Posted: Mar. 02 2009,21:23   

Quote (Kristine @ Mar. 02 2009,19:41)
Just remember, there are only two answers... :p :D

Whoa!  VERY IMPRESIVE - but you give yourself away!  
Only a witch (or maybe a Librarian) could haz saved a link to this perfect answer!

--------------
Come on Tough Guy, do the little dance of ID impotence you do so well. - Louis to Joe G 2/10

Gullibility is not a virtue - Quidam on Dembski's belief in the Bible Code Faith Healers & ID 7/08

UD is an Unnatural Douchemagnet. - richardthughes 7/11

  
dvunkannon



Posts: 1377
Joined: June 2008

(Permalink) Posted: Mar. 02 2009,22:08   

Quote (Richardthughes @ Mar. 02 2009,15:34)
Okay, here's the premise.

we create an equation, with just 2 variables, randomly.


let's say y=x^2+3x-8

which would give us a data set of:

DATA SET
y x
-4 1
2 2
10 3

We then go about building equations where the genome is basically pairs of arithmetic operators and coefficients.

let's limit it to

+
-
/
*
^

and

-9
-7
-6
-5
-4
-3
-2
-1
0
Y
1
2
3
4
5
6
7
8
9

If we created a random population of equations using the above pairings, we could probably manipulate them genomically. We could have mutation:

+8 > +Y †or -3 > *3

Deletion

+8 > *nothing*

Duplication

+8 > +8+8

sexual selection, etc.

I'm sure most simple equations could be solved using this method. Obviously the fitness function comes from the data table.


Very rough idea. Someone please build, improve then give me credit.

Yes, it is very cool, and it's called "genetic programming". Invented by John Koza (the man who also invented scratch-off lottery tickets) back in the 90s.

Koza founded the Humie awards, for using GP and other EC algorithms to invent things as good or better than humans. Note to Scooter, MersenneTwister is smarter than you.

--------------
Iím referring to evolution, not changes in allele frequencies. - Cornelius Hunter
Iím not an evolutionist, Iím a change in allele frequentist! - Nakashima

  
hereoisreal



Posts: 745
Joined: Feb. 2006

(Permalink) Posted: Mar. 02 2009,22:22   

Better yet Richard, why not use a pattern or template and eliminate the unknowns:
guess work, chance, variables, and math?

Zero

--------------
360 †miracles and more at:
http://www.hereoisreal.com/....eal.com

Great news. Godís wife is pregnant! (Rev. 12:5)

It's not over till the fat lady sings! (Isa. 54:1 & Zec 9:9)

   
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 02 2009,23:12   

Quote (dvunkannon @ Mar. 02 2009,22:08)
Yes, it is very cool, and it's called "genetic programming". Invented by John Koza (the man who also invented scratch-off lottery tickets) back in the 90s.

Koza founded the Humie awards, for using GP and other EC algorithms to invent things as good or better than humans. Note to Scooter, MersenneTwister is smarter than you.

I INVENTED IT IDEPENDANTLY ON MY OWN.


:angry:

HOMO

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Erasmus, FCD



Posts: 6349
Joined: June 2007

(Permalink) Posted: Mar. 03 2009,01:12   

HAHA I JUST INVENTED THE INTERNET.  YOUR ALGAERHYTHMS ARE WEEK

--------------
You're obviously illiterate as hell.†Peach, bro.-FtK

Finding something hard to believe based on the evidence, is science.-JoeG

the odds of getting some loathsome taint are low-- Gordon E Mullings Manjack Heights Montserrat

I work on molecular systems with pathway charts and such.-Giggles

  
dvunkannon



Posts: 1377
Joined: June 2008

(Permalink) Posted: Mar. 03 2009,13:10   

Quote (Richardthughes @ Mar. 03 2009,00:12)
Quote (dvunkannon @ Mar. 02 2009,22:08)
Yes, it is very cool, and it's called "genetic programming". Invented by John Koza (the man who also invented scratch-off lottery tickets) back in the 90s.

Koza founded the Humie awards, for using GP and other EC algorithms to invent things as good or better than humans. Note to Scooter, MersenneTwister is smarter than you.

I INVENTED IT IDEPENDANTLY ON MY OWN.


:angry:

HOMO

Richard T Hughes, the Elisha Gray of Information Theory

--------------
Iím referring to evolution, not changes in allele frequencies. - Cornelius Hunter
Iím not an evolutionist, Iím a change in allele frequentist! - Nakashima

  
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 03 2009,14:16   

Quote (dvunkannon @ Mar. 03 2009,13:10)
Quote (Richardthughes @ Mar. 03 2009,00:12)
Quote (dvunkannon @ Mar. 02 2009,22:08)
Yes, it is very cool, and it's called "genetic programming". Invented by John Koza (the man who also invented scratch-off lottery tickets) back in the 90s.

Koza founded the Humie awards, for using GP and other EC algorithms to invent things as good or better than humans. Note to Scooter, MersenneTwister is smarter than you.

I INVENTED IT IDEPENDANTLY ON MY OWN.


:angry:

HOMO

Richard T Hughes, the Elisha Gray of Information Theory

It's actually a quite famous Davescottism, bless his Tard.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Cubist



Posts: 346
Joined: Oct. 2007

(Permalink) Posted: Mar. 04 2009,03:10   

Quote (Richardthughes @ Mar. 02 2009,18:10)
variance to the actual x and y values given. cull the bottom z%, mutate back up to full population, rinse, repeat.

So the "fitness" of each "entity" is simply the numerical value of the expression? Hmmm... if I'm not mistaken, that basically works out to "highest value wins", and I'm not sure how useful/informative/exciting that would be. What about something more like "absolute value of (X - FitnessValue)" for the fitness function? You could get a wider range of results, depending on whether X is an integer, or rational, or irrational, or whatever. Or I think so, anyway...

  
k.e..



Posts: 2841
Joined: May 2007

(Permalink) Posted: Mar. 04 2009,07:08   

Quote (Richardthughes @ Mar. 03 2009,22:16)
Quote (dvunkannon @ Mar. 03 2009,13:10)
Quote (Richardthughes @ Mar. 03 2009,00:12)
 
Quote (dvunkannon @ Mar. 02 2009,22:08)
Yes, it is very cool, and it's called "genetic programming". Invented by John Koza (the man who also invented scratch-off lottery tickets) back in the 90s.

Koza founded the Humie awards, for using GP and other EC algorithms to invent things as good or better than humans. Note to Scooter, MersenneTwister is smarter than you.

I INVENTED IT IDEPENDANTLY ON MY OWN.


:angry:

HOMO

Richard T Hughes, the Elisha Gray of Information Theory

It's actually a quite famous Davescottism, bless his Tard.

One of my favorites.

Along with

GIRLYMAN

IQ=150

CHAINSAWS

DOG CANCER CURES

MUSHROOMS

ARMY CAMP FOLLOWING DUMB AS FENCE POST FEMALE BABY FACTORIES

BEER, CARBURETORS AND BOATS....ADMIRAL(RET.)

ID ACCEPTS COMMON DESCENT THEN DOESN'T THEN DOES

17 YEAR OLD LESBIAN ARMY BRATS THAT LIKE OLD FARTS

FEM PARTIES WHERE WIFE LETS HIM OUT OF THE PEN FOR THE LAST 5 MINUTES.

CLOWN HATING

BALL WARMING DENIAL...glowBALL that is.

....there are others but I'd rather have another Port.

--------------
"I get a strong breeze from my monitor every time k.e. puts on his clown DaveTard suit" dogdidit
"Abbie Smith (ERV) who's got to be the most obnoxious arrogant snot I've ever seen except for when I look in a mirror" DAVE TARD
"ID is deader than Lenny Flanks granmaws dildo batteries" Erasmus

  
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 04 2009,08:40   

Quote (Cubist @ Mar. 04 2009,03:10)
Quote (Richardthughes @ Mar. 02 2009,18:10)
variance to the actual x and y values given. cull the bottom z%, mutate back up to full population, rinse, repeat.

So the "fitness" of each "entity" is simply the numerical value of the expression? Hmmm... if I'm not mistaken, that basically works out to "highest value wins", and I'm not sure how useful/informative/exciting that would be. What about something more like "absolute value of (X - FitnessValue)" for the fitness function? You could get a wider range of results, depending on whether X is an integer, or rational, or irrational, or whatever. Or I think so, anyway...

No fitness would be either the MAD, MSE or MAPE* of the variance between the actual equation and the 'organism' equation for known X's. Low numbers being better.

*Mean Absolute Deviation, Mean Squared Error, Mean Absolute Percentage Error - all should work equally well in this case.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 04 2009,13:02   

HAS NO-ONES CODED THIS FOR ME YET?!

:angry:

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
hereoisreal



Posts: 745
Joined: Feb. 2006

(Permalink) Posted: Mar. 05 2009,23:46   

Quote (Richardthughes @ Mar. 04 2009,13:02)
HAS NO-ONES CODED THIS FOR ME YET?!

:angry:

Richard, looks like, to me, the plus numbers
should be on top. †Higher is better......no, the
least is first,......no,no, the least is greatest.

Anyway, you've stated the up and down. †Where's
the left and right, east and west....no, I mean
west and east.

BTW, if you morph +8 > +8+8.... to 88 x 8,
it equals 704, beginning, end, and nothing.



Zero

--------------
360 †miracles and more at:
http://www.hereoisreal.com/....eal.com

Great news. Godís wife is pregnant! (Rev. 12:5)

It's not over till the fat lady sings! (Isa. 54:1 & Zec 9:9)

   
Richardthughes



Posts: 10080
Joined: Jan. 2006

(Permalink) Posted: Mar. 05 2009,23:59   

Hi Hero. I think I might have an offer to code this from a reader of this forum. I'll share it if it happens.


Rich

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
hereoisreal



Posts: 745
Joined: Feb. 2006

(Permalink) Posted: Mar. 07 2009,07:59   

Quote (Richardthughes @ Mar. 05 2009,23:59)
Hi Hero. I think I might have an offer to code this from a reader of this forum. I'll share it if it happens.


Rich

Richard, when someone uses Ďcodeí, is it to reveal or to hide a truth?

The kingdom of heaven is like unto leaven, which a woman took,
and hid in three measures of meal, till the whole was leavened.

Again, the kingdom of heaven is like unto treasure hid in a field;
the which when a man hath found, he hideth.....

Only the sons of Zadok will serve the Lordís table.

Zadok = kodaZ. The code is.... a = 1, Z = 26 (God)

I (first) x N (last) = 126 or AZ (one God)

Read Zec 9:9 using 'AZ' instead of 'ass'.

Zero

--------------
360 †miracles and more at:
http://www.hereoisreal.com/....eal.com

Great news. Godís wife is pregnant! (Rev. 12:5)

It's not over till the fat lady sings! (Isa. 54:1 & Zec 9:9)

   
dvunkannon



Posts: 1377
Joined: June 2008

(Permalink) Posted: Mar. 07 2009,10:13   

Quote (Richardthughes @ Mar. 06 2009,00:59)
Hi Hero. I think I might have an offer to code this from a reader of this forum. I'll share it if it happens.


Rich

Symbolic Regression Using Genetic Programming

a Java applet that demonstrates the idea.

--------------
Iím referring to evolution, not changes in allele frequencies. - Cornelius Hunter
Iím not an evolutionist, Iím a change in allele frequentist! - Nakashima

  
dnmlthr



Posts: 565
Joined: Mar. 2008

(Permalink) Posted: Mar. 09 2009,14:08   

Optimizing compiler settings with GA

--------------
Guess what? I don't give a flying f*ck how "science works" - Ftk

  
  21 replies since Mar. 02 2009,14:34 < Next Oldest | Next Newest >  

    


Track this topic Email this topic Print this topic

[ Read the Board Rules ] | [Useful Links] | [Evolving Designs]