cosmoharrigan / rl-glue

Automatically exported from code.google.com/p/rl-glue
0 stars 0 forks source link

Examples Broken on OS X #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Java Examples were broken on OS X, for a few reasons.

This all stems from the makefiles having a few inconsistencies, in:

Examples/basic_examples/Java/{Agent/Environment/Experiment}

First, the platform was being determined with uname -o.  This option
doesn't appear to exist on OS X.  I think maybe uname -s is a better option?

Second, there were multiple CLASSPATH variables that were being used for
building with JAVAC and for creating the run script on the fly.  I think
they were working on Windows but not on Mac.

Third, echo -e is used to create the run scripts on the fly, but echo -e
doesn't exist on Mac (-e is supposed to correctly understand escaped
characters like \n).  On Mac, this just works without any extra parameter.

We also have a new way of loading agents and envs with RL-Glue, something a
little cuter.

Instead of:
java -Xmx128M -classpath ./Build:../../../../RL-Glue/Java/RL-Glue.jar
rlglue.agent.AgentLoader RandomAgent.RandomAgent

It is now:
java -Xmx128M -classpath ./Build:../../../../RL-Glue/Java/RL-Glue.jar
rlglue.RLGlueCore --agent RandomAgent.RandomAgent

I like this better, because you can also do:
rlglue.RLGlueCore --environment SomeEnvironment.SomeEnvironment 

or

rlGlue.RLGlueCore --version
(which will print out the version of RL-Glue as defined in it's new Manifest).

It might just be a matter of taste, but I think this comes across more
professional.  The old way still works.

I've updated Agent/makefile to solve these problems and to use the new
loading mechanism.  Someone needs to test it on Windows and Linux please. 
Then, make the same style of changes to the other java makefiles please.

Original issue reported on code.google.com by brian.ta...@gmail.com on 21 Feb 2008 at 11:32

GoogleCodeExporter commented 9 years ago
Marking this as wontfixe and moving it to rl-glue-ext

Original comment by brian.ta...@gmail.com on 2 Sep 2008 at 10:11