Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Evolving Phrases

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Evolving Phrases
Wetimer
Member #1,622
November 2001

In the book, The Blind Watchmaker, one of the programs involves mutating a phrase to become closer and closer to a certain Shakespear play. The author notes this isn't entirely meaningful because Evolution lacks a goal like that simulation did. Accordingly, I thought that I could create a website which evolved random character in response to how people voted, thus having a natural selection more in tune with what the real environment would be.

So, for the daring, curious, or whatever:
http://tt.madpage.com/evolve.php

<code>if(Windows.State = Crash) Computer.halt();</code>

Kanzure
Member #3,669
July 2003
avatar

I got a " }wOmbk1R".

Rash
Member #2,374
May 2002
avatar

The topic line made me believe the subject was about semantic shift. For example, how sh*t has become to mean the exact opposite if you just put "the" in front of it.

Wetimer
Member #1,622
November 2001

That's also a highly facinating subject, but I haven't figured out to simulate it yet.

<code>if(Windows.State = Crash) Computer.halt();</code>

Kanzure
Member #3,669
July 2003
avatar

This is taking quite a while.
Perhaps you could speed it up by presenting more options?
Or, perhaps presenting "More like your last choice". (?) :)

NyanKoneko
Member #5,617
March 2005
avatar

Evolution is only a theory, it is not fact.

In fact a Florida school board put these stickers on all the texbooks that mentioned evolution.
{"name":"051113_cobb_county_main.hmedium.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/3\/a3307a7e1a96a9407cafee1923c977bb.jpg","w":423,"h":228,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/3\/a3307a7e1a96a9407cafee1923c977bb"}051113_cobb_county_main.hmedium.jpg

Wetimer
Member #1,622
November 2001

The question is how to do that without making it too biased towards your choices and not trying to generally evolve through many users...

[edit]
Okay, due to popular request, you now pick from five options.

Hmm... are you trying to make fun of them for putting that there or agreeing with them?

<code>if(Windows.State = Crash) Computer.halt();</code>

kazzmir
Member #1,786
December 2001
avatar

Can you get rid of non alphanumeric characters? I see no reason for '{' to be a valid character there..

Kanzure
Member #3,669
July 2003
avatar

Quote:

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/www/tt.madpage.com/evolve.php on line 123

This doesn't make sense.
Sometimes it runs out of options.
What about a 'repopulate' option? Or a 'Divine Intervention' form, to add your own entry?

Chris Katko
Member #1,881
January 2002
avatar

Quote:

Evolution is only a theory, it is not fact.

What does that have to do with anything?

Quote:

In fact a Florida school board put these stickers on all the texbooks that mentioned evolution.

And the courts got them removed.

I don't feel the least bit threatened by evolutionary theory. As far as I'm concerned, it may very well be correct. Though, people still haven't solved all the questions.

Quote:

I thought that I could create a website which evolved random character in response to how people voted,

It wasn't very random for me. It went "array" after the third try, but after that, it kept giving me the same result over and over.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Wetimer
Member #1,622
November 2001

I should stop fixing my scripts while people are running them...

At any rate, I removed the non-alphanumeric characters and restrated the database. That's why people were getting errors and the words array.

<code>if(Windows.State = Crash) Computer.halt();</code>

Kanzure
Member #3,669
July 2003
avatar

Read my edit.

Wetimer
Member #1,622
November 2001

Re your edit...

It had a bug, it wasn't reproducing like it should.
So, repopulate shouldn't be a problem now.

I'll keep divine intervention under consideration. I'd like to see whether or not it achieves any sort of order under natural selection first.

<code>if(Windows.State = Crash) Computer.halt();</code>

Kanzure
Member #3,669
July 2003
avatar

Let us control the numbers. :P
How much mutation? How many samples? How long should it live in the stack? Et cetera.

Wetimer
Member #1,622
November 2001

hmm....

<code>if(Windows.State = Crash) Computer.halt();</code>

Soga
Member #4,589
May 2004

I think you should take whole words, not characters...

Karadoc ~~
Member #2,749
September 2002
avatar

Quote:

Evolution is only a theory, it is not fact.

In fact a Florida school board put these stickers on all the texbooks that mentioned evolution.

Newtonian mechanics and quantum mechanics are only theories as well. Maybe we should disregard what they say as well, and go back to complete guess work and superstition.

Look. I feel your comment was out of line. The evolution in this thread is not the kind that threatens creationists, it is the kind that is a damn statistical fact. If the better words are more likely to survive, then the phrase will slowly move towards what it is meant to. Try some evolutionary programming if you don't believe it.

It makes me angry that whenever the word 'evolution' comes up, someone has to start flailing, like the mere mention of the word could cause us all to go to hell or something. [/exaggeration]

-----------

Goodbytes
Member #448
June 2000
avatar

Karadoc, NyanNyan was kidding... but your point is valid.


--
~Goodbytes

Karadoc ~~
Member #2,749
September 2002
avatar

yeah... sometimes it's hard to tell if people are joking or not when talking about this kind of thing. People have all sorts of crazy views and values.

-----------

Wetimer
Member #1,622
November 2001

All right, we have number control, you can now control number of mutations, time of life, and number of samples.

Quote:

I think you should take whole words, not characters...

I did think of that, but then I'd have to figure out how do some sort of dictionary thing...

[edit]
For the curious, the algorithm is to select two alive objects at random. We then mix the two randomly switching between the two somewhere in the middle. Then, <code>for(int x = 0;x < mutate;x++)<code> we change one letter in the phrase into any other letter.

<code>if(Windows.State = Crash) Computer.halt();</code>

Billybob
Member #3,136
January 2003

Oh, oh. Look what I got!

Quote:

Jar

Booya!

Hmm, and then I got Array? WTF? What does that have to do with any of what I had before?

Oh, and your whole thing is VERY broken. I had it set at 20 samples, but then it started only giving me 20. When I tried to adjust samples again it went to 4, 3, 2, 1, and then none. Then it was permantly broken.

EDIT: Oh and here's my idea ;)
An evolving Neural network might be good. I'm not experienced with ANNs, but basically just have them randomly mutate and stuff, and then have them output X amount of text. Then check the output against a dictionary/spellchecker and see which one gets the most english-like answers. I think you get the idea. At the end you should have something spurting out english words ;)

Wetimer
Member #1,622
November 2001

dern it, you screwed it! Okay, Arrays get generated somehow when the program can't find two living phrases to produce from. Before, it was balanced so that items were born faster then they died, but when you start having more it kills it faster then they are born... so, they all died. Now, however, I've changed it to try and balance that out somewhat... I've always ressurected all the dead phrases.

Quote:

An evolving Neural network might be good. I'm not experienced with ANNs, but basically just have them randomly mutate and stuff, and then have them output X amount of text. Then check the output against a dictionary/spellchecker and see which one gets the most english-like answers. I think you get the idea. At the end you should have something spurting out english words

I don't know anything about ANNs either, but I wonder what would happen if you did the same thing against this?

<code>if(Windows.State = Crash) Computer.halt();</code>

Evert
Member #794
November 2000
avatar

Quote:

Evolution is only a theory, it is not fact.

I know you were probably kidding, but as with Karadoc, that exact statement always makes me angry. The reason is that `Evolution is a theory' has a specific meaning, it is a scientific theory, not a random idea. It's the same thing as saying hey, it's only science, so no reason to belief any of it!

Anyway.

I had some fun on the page, but it's fairly hard to pick which of the five options makes most sense because to the naked eye, none of them do. A computer programme as Dawkins describes, which just evolves to a single specific target, is probably better at this. Oh, one suggestion: spaces seem not to be an allowed character. I think they should be.

FMC
Member #4,431
March 2004
avatar

Uhm, it seems "arm" and "tm" are winning genes.
It would be interesting to know how many people participated and how many evolutions there have been from the start: this way you could show the best word after 1000 evolutions, the best after 5000, and so on, to see after how much time it gets sensible frases done.

[FMC Studios] - [Caries Field] - [Ctris] - [Pman] - [Chess for allegroites]
Written laws are like spiders' webs, and will, like them, only entangle and hold the poor and weak, while the rich and powerful will easily break through them. -Anacharsis
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover. -Mark Twain

Kanzure
Member #3,669
July 2003
avatar

Lifetime does not increase when I click "Increase".
(Current lifetime is always 5.)

 1   2   3 


Go to: