Difference between revisions of "User talk:Bigfatcat"

From Robowiki
Jump to navigation Jump to search
(another compiler speedup idea)
Line 12: Line 12:
  
 
I'm using Elitism and Roulette Wheel by the way; half of the reproduction pool is selected via elitism and half is selected via Roulette Wheel.--[[User:Bigfatcat|Bigfatcat]] 13:13, 26 April 2011 (UTC)
 
I'm using Elitism and Roulette Wheel by the way; half of the reproduction pool is selected via elitism and half is selected via Roulette Wheel.--[[User:Bigfatcat|Bigfatcat]] 13:13, 26 April 2011 (UTC)
 +
 +
Another thought I had for speeding up the compiling would be to compile all the files you need with one big call to javac instead of lots of little calls. Each time you call javac it needs to load rt.jar which is about 30MB. Jikes gets around this by being implemented in C, but the sun javac is actually written in Java (hence the long init times). --[[User:Skilgannon|Skilgannon]] 15:14, 26 April 2011 (UTC)

Revision as of 16:14, 26 April 2011

Feel free to discuss my Genetic Programming project!

If you need to speed up the compiling you may with to try using Jikes instead of javac. It compiles much faster, but unfortunately only works for Java 1.4 and earlier, so you need to point at an old robocode.jar for your compile classpath. For running, if you have multiple cores you can turn on the robocode option to enable running the robots in parallel. Otherwise you could use something like RoboResearch which can network battles across multiple machines and set up a whole lab to run your battles. Some food for thought =) --Skilgannon 18:30, 25 April 2011 (UTC)

Thanks Skilgannon, really appreciate the suggestions, definitely food for thought :) I'll look into the dual core option, if I have time RoboResearch sounds like a good idea too. For now I'll halve the reproduction rate just so I can run a complete cycle of 50 generations and while I'm waiting I'll look into your suggestions. Cheers! --Bigfatcat 18:40, 25 April 2011 (UTC)

I've been tinkering with genetic algorithms with Robocode - not "genetic programming", just tuning parameters of algorithms. Why increase the population size over time? I just cull to the same population size each generation. My populations tend to be more like 20-50. Currently I breed using "roulette selection", which I think is pretty common. Also, note that you need to run a lot if battles to accurately evaluate performance, especially as your fitness goes up. Something like 50-100 battles (35 rounds each) is what I use until fitness improvement starts really slowing down. In general, as my fitness improvement slows down, I lower mutation rate, increase crossover rate, and increase the battle count. Of course, all these settings vary by the problem you're working with.

As you've noticed, running actual battles is kinda slow, though that also depends on the complexity of the bots. I'm using WaveSim just to work on targeting algorithms. If you can find any way to evaluate fitness without running actual battles, that could help a lot. Good luck. =) --Voidious 23:09, 25 April 2011 (UTC)

I halved the reproduction rate but once it reached the 40th generation it was still taking too long to run. For this reason I'm going to reduce the number of generations to 40. So when you cull your population I assume you just kill the 50% of your population (the weakest)? Doing that though, how do you ensure you're not losing some valuable variety? One of those weakest individuals may have one value that is perfect. Also when you say you run 50-100 battles with 35 rounds each...you do that for each robot? Surely that takes a hell of a long time?

I'm using Elitism and Roulette Wheel by the way; half of the reproduction pool is selected via elitism and half is selected via Roulette Wheel.--Bigfatcat 13:13, 26 April 2011 (UTC)

Another thought I had for speeding up the compiling would be to compile all the files you need with one big call to javac instead of lots of little calls. Each time you call javac it needs to load rt.jar which is about 30MB. Jikes gets around this by being implemented in C, but the sun javac is actually written in Java (hence the long init times). --Skilgannon 15:14, 26 April 2011 (UTC)