Discussion:
robocodeEngine is not loading bot
noppelmax via robocode
2016-10-24 16:30:12 UTC
Permalink
Hey,

i use the same directory for the robocode gui as is use for the
robocodeengine. it set it via:
engine = new RobocodeEngine(new File("/home/max/robocode"));

I the gui my bots show up and are running. In the engine only it writes:

Running version is 1.9.2.5
Robotsdir is /home/max/robocode/robots
Err> Can't find 'Test.Test'
Err> Can't find 'noppelma.TestBot'
Err> Can't find 'noppelma.SonOfAWolf'
Msg> Preparing battle...
Msg> ----------------------
Msg> Round 1 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 1 cleaning up.
Msg> ----------------------
Msg> Round 2 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 2 cleaning up.
Msg> ----------------------
Msg> Round 3 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 3 cleaning up.
Msg> ----------------------
Msg> Round 4 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 4 cleaning up.
Msg> ----------------------
Msg> Round 5 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 5 cleaning up.
-- Battle has completed --
Battle results:
sample.RamFire: 0

Do you have any idea what may be wrong. Test.Test is generated and compiled
via die Robocode Gui.

Thanks and best regards,
max
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fnl
2016-10-27 21:16:08 UTC
Permalink
It looks okay to me. Have you checked that the class files for your bot is
located under /home/max/robocode/robots?
If you are using another IDE than the one built-in Robocode, you might have
changed the location for the robots.

You could try and clean the robot database in Robocode (from the GUI/menu).

Best regards,
- Flemming


Hey,
Post by noppelmax via robocode
i use the same directory for the robocode gui as is use for the
engine = new RobocodeEngine(new File("/home/max/robocode"));
Running version is 1.9.2.5
Robotsdir is /home/max/robocode/robots
Err> Can't find 'Test.Test'
Err> Can't find 'noppelma.TestBot'
Err> Can't find 'noppelma.SonOfAWolf'
Msg> Preparing battle...
Msg> ----------------------
Msg> Round 1 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 1 cleaning up.
Msg> ----------------------
Msg> Round 2 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 2 cleaning up.
Msg> ----------------------
Msg> Round 3 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 3 cleaning up.
Msg> ----------------------
Msg> Round 4 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 4 cleaning up.
Msg> ----------------------
Msg> Round 5 initializing..
Msg> Let the games begin!
Msg> .
Msg> Round 5 cleaning up.
-- Battle has completed --
sample.RamFire: 0
Do you have any idea what may be wrong. Test.Test is generated and
compiled via die Robocode Gui.
Thanks and best regards,
max
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
noppelmax via robocode
2017-01-08 18:28:04 UTC
Permalink
Hey fnl,

i have done same further investigations today.

I have copied sample/RamFire.java to noppelma/RamFire.java , changed only
the package from sample to noppelma and recompiled it with the same command
the gui is using:

javac -deprecation -g -source 1.6 -encoding UTF-8 -classpath
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/home/max/robocode/libs/robocode.jar:/home/max/robocode/robots
/home/max/robocode/robots/sample/RamFire.java

javac -deprecation -g -source 1.6 -encoding UTF-8 -classpath
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/home/max/robocode/libs/robocode.jar:/home/max/robocode/robots
/home/max/robocode/robots/noppelma/RamFire.java


I also deleted both .class before and looked if both were regenerated by
those commands. They were. The robocode gui is showing both robots;
sample.RamFire and noppelma.RamFire. While the robocode engine is only
finding the sample.RamFire one.

I tried the same with my Robot: noppelma.TestBot.java
I copied it to sample.TestBot.java and compiled both with the same command.
Again i have the same effect. Gui finding both while the robocode engine is
only detecting the sample.TestBot one. I'm really irritated. Is it possible
that the robocode engine is only looking in sample?

Here are my outputs. Print of version und robotsdir is programmed from me.
Do have any further idea?

Loaded net.sf.robocode.api
Loaded net.sf.robocode.core
Loading plugins from /home/max/robocode/libs
Loaded net.sf.robocode.repository
Loaded net.sf.robocode.host
Loaded net.sf.robocode.ui
Loaded net.sf.robocode.ui.editor
Loaded net.sf.robocode.battle
Loaded net.sf.robocode.sound
Running version is 1.9.2.6
Robotsdir is /home/max/robocode/robots
Err> Can't find 'noppelma.RamFire'
Err> Can't find 'noppelma.TestBot'
Err> Can't find 'noppelma.SonOfAWolf'
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fnl
2017-01-08 19:02:04 UTC
Permalink
You could try to set the ROBOTPATH environment variable e.g. using
-DROBOTPATH=/home/max/robocode/robots when running your application from
the command-line.

Robocode and the RobocodeEngine uses the ROBOTPATH environment to find
where the robots are located.

This old thread might also give you a hint:
https://sourceforge.net/p/robocode/discussion/116459/thread/06b9f3b4/

I hope this works out for you.

Best regards,
- Flemming



Hey fnl,
Post by noppelmax via robocode
i have done same further investigations today.
I have copied sample/RamFire.java to noppelma/RamFire.java , changed only
the package from sample to noppelma and recompiled it with the same command
javac -deprecation -g -source 1.6 -encoding UTF-8 -classpath
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/home/max/robocode/libs/robocode.jar:/home/max/robocode/robots
/home/max/robocode/robots/sample/RamFire.java
javac -deprecation -g -source 1.6 -encoding UTF-8 -classpath
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/home/max/robocode/libs/robocode.jar:/home/max/robocode/robots
/home/max/robocode/robots/noppelma/RamFire.java
I also deleted both .class before and looked if both were regenerated by
those commands. They were. The robocode gui is showing both robots;
sample.RamFire and noppelma.RamFire. While the robocode engine is only
finding the sample.RamFire one.
I tried the same with my Robot: noppelma.TestBot.java
I copied it to sample.TestBot.java and compiled both with the same
command. Again i have the same effect. Gui finding both while the robocode
engine is only detecting the sample.TestBot one. I'm really irritated. Is
it possible that the robocode engine is only looking in sample?
Here are my outputs. Print of version und robotsdir is programmed from me.
Do have any further idea?
Loaded net.sf.robocode.api
Loaded net.sf.robocode.core
Loading plugins from /home/max/robocode/libs
Loaded net.sf.robocode.repository
Loaded net.sf.robocode.host
Loaded net.sf.robocode.ui
Loaded net.sf.robocode.ui.editor
Loaded net.sf.robocode.battle
Loaded net.sf.robocode.sound
Running version is 1.9.2.6
Robotsdir is /home/max/robocode/robots
Err> Can't find 'noppelma.RamFire'
Err> Can't find 'noppelma.TestBot'
Err> Can't find 'noppelma.SonOfAWolf'
--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...