By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

Call for Participation - JRobots Programming Challenge

P: n/a
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


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Samuel wrote:
You play by programming in basic Java your own robot to fight other


Perhaps this should be posted to Java groups, and not to c.l.c, yes?

--
Tom Zych
This is a fake email address to thwart spammers.
Real address: echo 'g******@cbobk.pbz' | rot13
Nov 13 '05 #2

P: n/a
what is basic java?

Tom Zych wrote:
Samuel wrote:
You play by programming in basic Java your own robot to fight other


Perhaps this should be posted to Java groups, and not to c.l.c, yes?

--
Tom Zych
This is a fake email address to thwart spammers.
Real address: echo 'g******@cbobk.pbz' | rot13


Nov 13 '05 #3

P: n/a
Wayne Rasmussen wrote:
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


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 13 '05 #4

P: n/a
Samuel <a1rex@_hotmail_.com> writes:
Wayne Rasmussen wrote:
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:


<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 news:comp.lang.java.programmer or
someplace where they actually give a damn.

-Micah
Nov 13 '05 #5

P: n/a
Micah Cowan <mi***@cowan.name> scribbled the following:
<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 news:comp.lang.java.programmer or
someplace where they actually give a damn.


--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| 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
Nov 13 '05 #6

P: n/a
Joona I Palaste <pa*****@cc.helsinki.fi> writes:
Micah Cowan <mi***@cowan.name> scribbled the following:
<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"?


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

--
Micah
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.