Using the CDT I was able to confirm that one of the agents actually is
generating a run time exception, trying to cast an int from a long.
Could the perturb function be calling rand-int with a value that is
too large? I'm including the stack trace below in case that helps.
This is line 950 in RT.java:
throw new IllegalArgumentException("Value out of range for int: " +
x);
user=> (print-frames)
0 clojure.lang.RT intCast [x] RT.java:950
1 clojure.lang.RT intCast [x] RT.java:922
2 clojure.core$rand_int invoke [this n] core.clj:3821
3 clojush$perturb invoke [this z denom atom-generators safe-denom i
points pgm zipper] regression.clj:280
4 clojush$fn__1071 invoke [this state] regression.clj:290
5 clojush$execute_instruction invoke [this literal-type instruction
state] clojush.clj:1282
6 clojush$eval_push invoke [this iteration state exec-top s print]
clojush.clj:1300
7 clojush$run_push invoke [this state print code s] clojush.clj:1319
8 clojush$run_push invoke [this state code] clojush.clj:1312
9 clojush$eval1080$fn__1083$iter__1084__1088$fn__1089$fn__1090
invoke [this b--1087 size--4062--auto-- program c--4061--auto--
i--1086 input] regression.clj:310
10 clojush$eval1080$fn__1083$iter__1084__1088$fn__1089 invoke [this
program iter--1084 s--1085 size--4062--auto--1095 temp--3589--
auto--1097 c--4061--auto--1094 b--1087] regression.clj:306
11 clojure.lang.LazySeq sval [this] LazySeq.java:42
12 clojure.lang.LazySeq seq [this] LazySeq.java:56
13 clojure.lang.RT seq [coll] RT.java:450
14 clojure.core$seq invoke [this coll] core.clj:122
15 clojure.core$dorun invoke [this coll] core.clj:2450
16 clojure.core$doall invoke [this coll] core.clj:2465
17 clojush$eval1080$fn__1083 invoke [this program] regression.clj:306
18 clojush$evaluate_individual invoke [this error-function i]
clojush.clj:1455
19 clojure.lang.AFn applyToHelper [arglist a1 ifn] AFn.java:165
20 clojure.lang.AFn applyTo [this arglist] AFn.java:151
21 clojure.lang.Agent$Action doRun [action oldval error] Agent.java:
100
22 clojure.lang.Agent$Action run [this] Agent.java:150
23 java.util.concurrent.ThreadPoolExecutor$Worker runTask []
ThreadPoolExecutor.java:886
24 java.util.concurrent.ThreadPoolExecutor$Worker run []
ThreadPoolExecutor.java:908
25 java.lang.Thread run [] Thread.java:637
On Oct 3, 5:07 pm, Lee Spector <[email protected]> wrote:
> On Oct 3, 2010, at 7:16 PM, Lee Spector wrote:
>
>
>
> > I've just done a couple of runs verifying that this happens when using the
> > exact same code in 1.1 and 1.2. (Previously the code I was running under
> > the different versions varied slightly, but now I'm using exactly the same
> > code.)
>
> If anyone feels like trying it themselves -- that would be wonderful -- the
> code is athttp://hampshire.edu/lspector/gptp10/autopush-gptp10-code.zip
>
> Open the regression.clj file in success-12, scroll to the bottom, decrease
> the :population-size parameter near the bottom the file from 100000 to 1000
> (just so it goes through generations faster), and then run that file (which
> will load clojush.clj). Under 1.2 this generally hangs within a couple dozen
> generations for me... sometimes a little longer. (In case this could matter
> I'm running under Mac OS X in Eclipse/Counterclockwise, with the most recent
> versions of everything.) Under 1.1 it runs through at least several hundred
> generations without error or hanging until I stop it. (It's unlikely with
> these parameters but it's possible it would stop earlier because it found a
> solution -- then it would say "Success!".)
>
> If anyone does this please note that I do know that the code in that file is
> TERRIBLE, AWFUL, unidiomatic clojure code. I was still new(er) to clojure
> when I wrote it. My more recent versions are improved in several ways -- some
> of that is athttp://github.com/lspector/Clojush-- but since I wanted code
> that ran in 1.1 I'm using this old version to track down this problem.
>
> -Lee
>
> --
> Lee Spector, Professor of Computer Science
> School of Cognitive Science, Hampshire College
> 893 West Street, Amherst, MA 01002-3359
> [email protected],http://hampshire.edu/lspector/
> Phone: 413-559-5352, Fax: 413-559-5438
>
> Check out Genetic Programming and Evolvable
> Machines:http://www.springer.com/10710-http://gpemjournal.blogspot.com/
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en