Call for Participation - JRobots Programming Challenge

S

Samuel

New Prizes for October Jrobots Programming Challenge.
Jrobots is programming game hosted at <http://www.cfxweb.net/~jrobots>
CFXweb.
You play by programming in basic Java your own robot to fight other
players robots.Use your algorithms to predict opponent movement and
position.

For the third time in the history of Jrobots , there are even money
prizes! (Usually we play Jrobots for the immortal glory more than
anything else;->)

On the <http://www.cfxweb.net/~jrobots> JROBOTS site you can
<http://www.cfxweb.net/~jrobots/jjr_match.shtml> see on-line battles
and download free Jrobots SDK , the off-line Java applet to test your
robots and the source code of the simulator.

Please register to <http://groups.yahoo.com/group/javajousters> our
Java Algorithms Challenges group.
Good luck to all players!
Samuel a1rex@_hotmail_.com
 
S

Samuel

Wayne said:
what is basic java?

Sorry for this confusing term.

You program in Java but there are many restriction how the Java is used (for
security reason).
So for me (old C veteran) is like programing in C without pointers and
complex data structures. The size of the *.class code is restricted to 20
kbytes. No inheritance, only one class, no java API calls. Really simple
staff. This is an example of complete program for this game:

public class __Rabbit_ extends JJRobot {
void main() {
while(true) {
go(rand(1000),rand(1000));
}
}

void go(int dest_x, int dest_y) {
int course;
course = plot_course(dest_x,dest_y);
drive(course,50);
while(distance(loc_x(),loc_y(),dest_x,dest_y) > 50);
drive(course,0);
while (speed() > 0);
}

int distance(int x1, int y1, int x2, int y2) {
int x, y;
x = x1 - x2;
y = y1 - y2;
int d = sqrt((x*x) + (y*y));
return(d);
}

int plot_course(int xx, int yy) {
int d;
int x,y;
int scale;
int curx, cury;
scale = 100000;
curx = loc_x();
cury = loc_y();
x = curx - xx;
y = cury - yy;
if (x == 0) {
if (yy > cury)
d = 90;
else
d = 270;
} else {
if (yy < cury) {
if (xx > curx)
d = 360 + atan((scale * y) / x);
else
d = 180 + atan((scale * y) / x);
} else {
if (xx > curx)
d = atan((scale * y) / x);
else
d = 180 + atan((scale * y) / x);
}
}
return (d);
}
}

It will not win competition but it is a good start.

Best regards,
Samuel
 
M

Micah Cowan

Samuel said:
Sorry for this confusing term.

You program in Java but there are many restriction how the Java is used (for
security reason).
So for me (old C veteran) is like programing in C without pointers and
complex data structures. The size of the *.class code is restricted to 20
kbytes. No inheritance, only one class, no java API calls. Really simple
staff. This is an example of complete program for this game:

<Java code snipped>

Why do you persist in posting off-topic content to this group?
You will be reported to your ISP (if you haven't been already) if
you continue.

The fact that you are an old C veteran does give you license to
post Java code and Java contest announcements to a C-only
newsgroup. Please try over at or
someplace where they actually give a damn.

-Micah
 
J

Joona I Palaste

Micah Cowan said:
<Java code snipped>
Why do you persist in posting off-topic content to this group?
You will be reported to your ISP (if you haven't been already) if
you continue.
The fact that you are an old C veteran does give you license to

Is there a word missing here? Such as "not"?
post Java code and Java contest announcements to a C-only
newsgroup. Please try over at or
someplace where they actually give a damn.

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"And according to Occam's Toothbrush, we only need to optimise the most frequent
instructions."
- Teemu Kerola
 
M

Micah Cowan

Joona I Palaste said:
Is there a word missing here? Such as "not"?

(his claim in the message to which this was my response; just
giving him the benefit of the doubt).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top