INFO   Main   Docs   FAQ   News   Tutorials   Interviews   Forums   Mailing List
ONLINE    BATTLE ARENA   Accounts   Uploads   Downloads   Hall of Fame
|   No-Limits Challenge: JROBOTS FOREVER! (January 6th 2010)   ||   October-December Challenge: The End! (December 26th 2009)   ||   October-December Challenge: JROBOTS 2K9 Q4! (October 3rd 2009)   ||   September-October Challenge: JROBOTS 2K9 Q3! (July 4th 2009)   ||   April-June Challenge: JROBOTS 2K9 Q2! (March 28th 2009)   ||   Old News  |

MAKE a DONATION

GAME

Main

BATTLE ARENA
Hall of Fame

Downloads

Accounts
Uploads
 
INFO

News

Docs
F.A.Q.
Tutorials
Interviews

Forums
Mailing List
Contact leo
 
Visit the APOCALYX BLOG!

Jrobots FAQ

[English] [Italiano] [Espaņol]

UPLOADS
  1. To add a new Jrobot, you need to compile a Java Program and add it to your files?

  2. If I make any improvements (to my robot) how do I upload them?
    Do I send the same file again or do I choose a new name?

  3. I followed all the rules but the Upload CGI refuses my robot. Why?

  4. I sent a robot to your site, and I can now see it in the list. But when I select it to a match, it does not appear in the arena. Why?

DEVELOPMENT
  1. Why the arena doesn't follow the usual convention for coordinates and angles?

  2. How can I debug my robot and see what is going on inside the code?

  3. When a robot is killed can't the simulator call the finalize() method on that robot? I need this because I have static variables that increment when robots are created.


UPLOADS
  1. Q: To add a new Jrobot, you need to compile a Java Program and add it to your files?

    A: No. You can compile and test your own robot using the off-line package. Then you upload the class file to the site. That file is automatically recognized by the applet that simulates tournaments.

  2. Q: If I make any improvements (to my robot) how do I upload them?
    Do I send the same file again or do I choose a new name?

    A: Send a file with the same name. The old file is overwritten and the new robot inherits the results of its predecessor.
    If you choose a new name you send a robot that can fight against the old one.

  3. Q: I followed all the rules but the Upload CGI refuses my robot. Why?

    A: Case 1 In the program that controls your robot you catch an exception, so in the class file a java.lang.Exception class appears. In such a case a rule was broken: "You can't use the classes of the Java API in the code of your robot"
    Case 2 In the program that controls your robot you use the java.lang.Math class to get the PI constant, so a rule was broken: "You can't use the classes of the Java API in the code of your robot". Define yourself the PI constant in the code of your robot.

  4. Q: I sent a robot to your site, and I can now see it in the list. But when I select it to a match, it does not appear in the arena. Why?

    A: Case 1 The robots can't use inner classes, sorry. All the algorithms must be in a single class. Your robot uses two classes MyRobot.class and MyRobot$1.class. You can upload only a single class, so MyRobot$1 was missing in the on-line version and an exception was thrown.


DEVELOPMENT
  1. Q: Why the arena doesn't follow the usual convention for coordinates and angles?

    A: I use an unusual convention to speed up simulations on slow machines, because calculations are simpler. This is not a problem: the robots can't see the applet and you can watch the arena from the underground ;-)

  2. Q: How can I debug my robot and see what is going on inside the code?

    A: If you use the JDK and the appletviewer, it's really simple. For example you can use this code to print a variable ('a' is an integer variable or whatever else):

    System.out.println("the value of 'a' is: "+a);
    This way you use one of the Java classes to print to the output stream in the command line DOS window. The GUI of the applet will not be affected.
    Remember to remove all these lines when you send your debugged robot: the upload CGI will reject all the robots that contain Java classes.
    If you don't use the JDK and its command line compiler but a complex IDE, the debugging depends on the IDE and I can't help you.

  3. Q: When a robot is killed can't the simulator call the finalize() method on that robot? I need this because I have static variables that increment when robots are created.

    A: There is a security issue with finalize(). That method must be called from the main thread when a robot dies, so the main thread gives control to the code of the robot. Someone could put an infinite loop in finalize() to stop execution and to avoid the negative result.
    To identify the robots check the id() method when the main() method starts. It gives a unique identifier according to the order of creation of the robots.


For other questions send me an email.

For more information
send an email to
TETRACTYS Software
Project Hosted by SourceForge Copyright © 1999-2009 Leonardo Boselli
All Rights Reserved. Legal Terms.