Without the pmap and only 2 domiciles I got the solution in 2 minutes on my 4 core machine.

Might be interesting which effect the pmap might have in combination with agents.

Am 02.04.2012 20:41, schrieb Jim - FooBar();:
The onle setup that works for my machine (the one that finds the solution in reasonable time) is with number-of-domiciles = 3, the missing space and using pmap instead of map when evolution starts...the population size moves from around 1180 to 1230 but i can see all 4 cores of mine firing up and i get the solution in time (roughly 40sec)!!!

Jim


On 02/04/12 19:06, Goldritter wrote:
First there is an error in my code :(

These are the allowed symbols from which the creator function can
choose to create or mutate a gen:
def allowed-symbols (str "abcdefghijklmnopqrstuvwxyzäöü"
                          "ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ"))

This is the targetd which should be fulfilled:
(def the_target "Thursday Next")

The first error is, that in the allowed symbols the Space (' ') is
missing. So without this symbol/character the algorithm has no chance
to finish.

The correct definition for the symbols are (with the missing space):

def allowed-symbols (str "abcdefghijklmnopqrstuvwxyzäöü "
                          "ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ "))


So the algorithm tries to design the String "Thursday Next" by
exploring many possible variations and to get as near as possible to
the solution "Thursday Next".

The main purpose of this algorithm, I think, is to show how you can
use agents and atoms to implement a genetic algorithm.

On Apr 2, 7:59 pm, "Jim - FooBar();"<jimpil1...@gmail.com>  wrote:
Is it possible to explain briefly what this genetic algorithm tries to
accomplish? I mean what problem is it producing solution for? It never
seems to end regardless of number-of-domiciles!
I think i got a glimpse of a "ThursdayGNEXT" string but i'm not sure
what it means...

Jim

On 26/03/12 09:47, Marcus Lindner wrote:







Thanks for the answer.
Yes, the number of domicles was the problem.
When I use one or two domiciles the population remains relativ stable.
If I use 3 or more, then the population is increasing.
Is it a good idea to add some helpers for the grimreaper if the
population grows too fast?
Marcus
2012/3/26 Stefan Kamphausen<ska2...@googlemail.com
<mailto:ska2...@googlemail.com>>
     Hi,
>  For my little project I wanted to reprogramm the gentic
     algorithm from
>  the book "Clojure" written by Stefan Kamphausen and Tim Oliver
     Kaiser.
     quickly glancing at the code, it looks like a valid translation
     into English.
     Did you try to tune number-of-domiciles?  Depending on your
     machine it may be necessary to decrease the number of creators so
     that the population doesn't grow.  In this simulation the
     grimreaper has a hard time working against the birth-rate. ;-)
     Feel free to get in contact with me via e-mail[1] if your problem
     persists.
     Kind regards,
     Stefan
     [1]  (apply str (reverse ["de" \. "clojure-buch" (str "ska@")]))
     --
You received this message because you are subscribed to the Google
     Groups "Clojure" group.
     To post to this group, send email to clojure@googlegroups.com
<mailto:clojure@googlegroups.com>
Note that posts from new members are moderated - please be patient
     with your first post.
     To unsubscribe from this group, send email to
     clojure+unsubscr...@googlegroups.com
<mailto:clojure%2bunsubscr...@googlegroups.com>
     For more options, visit this group at
    http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to