There are two things that have to be done. The first is that the bundle has a list of thread workers that are located on your network. I am using it from a single computer so I usually use the loopback IP address. The second is that you have to create the threadworker to do the work.
Here is the content of my jgprog.properties bundle:
host0=127.0.0.1:667
This sets up one worker thread host at port 667 of the local machine using the IP loopback address.
Running the program now will give you a connection refused error because there is no thread at that address.
I am using a single machine so I create the second thread in the main function. For the symbolic regression sample I change the try block to this:
World world = new SymbolicRegressionWorld();
(new ComputeWorker(667, world)).start();
world.create();
world.run(500);
After creating the world this creates a new worker thread listening to port 667 and calls start so it runs in its own thread.
Darryl
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i've just downloaded the latest version, and keep getting this exception whenever I try to run it:
Memory before create: 1M
Creating initial population
Memory before computing initial fitnesses: 4M
Computing fitnesses
java.util.MissingResourceException: Can't find bundle for base name jgprog, locale en_GB
java.util.MissingResourceException: Can't find bundle for base name jgprog, locale en_GB
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:679)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
at com.groovyj.jgprog.World.computeAll(World.java:264)
at com.groovyj.jgprog.World.create(World.java:230)
at com.groovyj.jgprog.SymbolicRegressionWorld.create(SymbolicRegressionWorld.java:57)
at com.groovyj.jgprog.SymbolicRegressionWorld.main(SymbolicRegressionWorld.java:154)
What am I doing wrong? tia for any help!
I get the same behavior. I'm guessing they forgot to include an english resource bundle in the distro...
There are two things that have to be done. The first is that the bundle has a list of thread workers that are located on your network. I am using it from a single computer so I usually use the loopback IP address. The second is that you have to create the threadworker to do the work.
Here is the content of my jgprog.properties bundle:
host0=127.0.0.1:667
This sets up one worker thread host at port 667 of the local machine using the IP loopback address.
Running the program now will give you a connection refused error because there is no thread at that address.
I am using a single machine so I create the second thread in the main function. For the symbolic regression sample I change the try block to this:
World world = new SymbolicRegressionWorld();
(new ComputeWorker(667, world)).start();
world.create();
world.run(500);
After creating the world this creates a new worker thread listening to port 667 and calls start so it runs in its own thread.
Darryl