I'm a fan of python syntax,
as it is quite easier than java (especially for beginners).
I tried the method proposed in http://thread.gmane.org/gmane.comp.java.robocode/760
it compiles, but then doesn't get accepted into robot database :/
I found interfaces (for creating robot types ... with other programming languages)
but without tutorial I have insufficient competence/time to understand, how.. :/
There is some tutorial combining Jython with Java apps,
but it creates java class'es from jython runtime, not compiletime.
maybe this could be hacked into controller when robots are added to battle,
but this is again is too much for me :/
Ok, finally I can use python for http://robocode.sf.net
with the help of <jinq0123.at.163.com> I managed to run it on ubuntu 8.04 and 9.04.
install jython2.2 (not 2.5)
install robocode (1.7 was better for me than 1.6 in one aspect )
write yourbot.py and put it in robots directory
there are several types of robots, for example
when writing jython version, don't forget "self" keywords defining your own methods or calling Robot methods ;)
edit compyle-jy221.sh to your needs
(on win some path syntax canges are needed and name compile-jy221.bat)
and compiles using jythonc (indicating robot filename and package name)
find the new .java and .class files
make the appropriate .property file for your bot (not compulsory)
call robocode-jython.sh (adds: 1) NoSecurity option and 2) jython.jar in classpath )
copy files to your robocode directory
ps.: with robocode 1.6 I had to restart the robocode before each battle,
or otherwise jython bot's didn't work..
1.7 didn't have this problem
ps.: still haven't tried to implement more complex robot actions...
just cloned MyFirstRobot and Wall
by the way, JymboWall acts a bit strangely -- when figuring its direction,
it usually is not perpendicular to walls :/
Please see my answer to simillar question here.
We are looking for someone strong enough to help us with that.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.