[Home]Beginners

Robo Home | Changes | Preferences | AllPages

Just started with Robocode? This page will be your best starting point soon.

First consider reading the BeginnersFAQ.

Other topics of potential interest for beginners:

fits I think. Please create the missing pages and restructure this page and this whole wiki until it becomes easy for beginners to find information that can get them up to speed as fast as possible. -- PEZ

Another reccomendation is to use the Changes page to monitor new topics. There are several members who only look at the changes page, having already seen the rest of the wiki. So while exploring the wiki for yourself, I reccomend you also check out the Changes page to see whats new. -- Jokester


Advice for beginners

Please help this list grow.
PEZ says - I can give one valuable advice to the Robocode newbie: Package your first attempts on improving MyFirstRobot. It's great fun to put it up against your new creations as well as other peoples first-attempt robots. I regret not saving the first Marshmallow version. But I saved version 0.2 and today I put it up against Crippa's and TaqHo's early robot generations. This is the result:

The PEZochCrippa? robot is, if I remember correctlty, a just slighty modified MyFirstRobot. I think I will put MyFirstRobot inte the next newbie league. :)

Insectoid adds: However, MyFirstRobot gets it's butt kicked by ~randomish~ aim, or averaged velocity aim.

Kawigi adds: MyFirstRobot really gets his trash kicked by robots that move around it, even if they shoot directly at it.

Tango adds (btw, is this the new way of saying things? ;-)): MyFirstRobot is useless, but it's meant to be, it's just a tutorial to teach the idea of making bots. It is nice to test your bot against it though, because it shows if you have improved on the default design, and if you haven't then something is seriously wrong.

Miked0801 includes: When I was first creating bots, my first opponent to beat was Ramfire, followed by MyFirstRobot. If it beat them well, next up were Walls, Crazy, and SpinFire?. Once I could beat those, I considered myself graduated from Newbie status and went on to beigger and better things. To beat the sample bots shows your bot can aim, move, and gather information decently. I'd next concentrate on being able to beat most NanoBots. Once you can smash them, you've got at least an average bot :)

Which is why it's painful to see my Marshmallow get beaten by DuelistNano! -- PEZ

Being immune to brutally simple robots is definitely a good quality to have in a robot, especially a big robot. However, sometimes you can make a robot that beats very good robots that still loses to some very simple robots. I don't remember which, but one of the Duelist series actually has been known to lose to SittingDuck, and FloodMicro, now #30 on the EternalRumble can't beat Walls. Such robots have an obvious weakness, but that doesn't make them 'bad', and the weakness isn't always obvious. -- Kawigi

I'm getting this error :(

how should I edit "options" and "code" to get this working with javac, please?

C:\>javac @options @code

error: cannot read: C:\java\source\atreides\robot\atreides.robot.AtreidesRobot1.java 1 error

C:\>type options

-d classes

-g

-sourcepath C:\java\sources -classpath C:\java\classes

C:\>type code

C:\java\source\atreides\robot\atreides.robot.AtreidesRobot1.java

C:\>

Lost in javac land,

-- Thufir Hawat

I had no idea you could stash command line contents in files like that... Anyway, it looks like you are not giving the correct path to the java file. Maybe you are missing the plural 's' in 'sources'? -- PEZ

C:\java\source\atreides\robot\atreides.robot.AtreidesRobot1.java try "\" insted of "." C:\java\source\atreides\robot\atreides\robot\AtreidesRobot1.java

 -- SSO?

got it working, gotta run :) I'll come back and post the solution. for info on how to stash commands: <http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html>;

-- Thufir Hawat

Are there any effective targeting methods that don't use trig? I don't know trig yet, and I want to get at least a decent bot going before the 12th grade. Or can someone at least link me to a decent explanation of trigonometry. I guess this game isn't really beginner friendly unless you've graduated high school with honors in math. /meh Bal

Some very basic trig is kind of fundamental to everything in Robocode (you move and shoot at angles, after all), but the actual data analysis used in most targeting isn't really trig related. If you're in high school, I doubt the trig is anything you can't handle. There are people younger than you in The2000Club. The Trigonometry page on the wiki links to a bunch of decent resources. And there are plenty of OpenSource bots that you could look over if you'd like. Welcome to the wiki! -- Voidious

I'm actually only 15, but I just don't get the "simple" methods that the tutorials state, guess I just need to think harder ;) Thanks -- Bal

If you play this game, you will graduate high school with honors in math ;). This game is hightly math related, though I found you don't really have to deeply understand the math you use, as long as you use it correctly. You don't have to know what range Math.sin() returns, but you might figure out when is best to use it. After awhile you'll figure out what all the "trig" does. -- Chase-san

Well, I homeschool, so really, for me this is part of my math grade, and I have to explain it to get a high grade ( doesn't have to win anything :P) Bal

Well in that case: http://en.wikipedia.org/wiki/Trigonometric_function should help you out. Trig has a basis in both Geometry and Algebra. -- Chase-san

I really should have thoughtn of Wikipedia, but alas, thanks! -- Bal

Here's a gotcha though.. in Robocode when you are trying to predict your future position, you have to swap sine and cosine functions from what you'd normally use. Now I'll give an example from memory that has a 50% chance of confusing you further: x1 = x0 + sin(heading) * velocity becomes x1 = x0 + cos(heading) * velocity. I may have gotten that backwards. I am too lazy to bring up my source code to check. Just a warning. -- Martin

Nah, x uses sine, I double checked, I do it that way in all my bots, seems to work fairly well. =) --Chase-san

To build upon what Martin was saying: in Robocode, up is 0 degrees and it increases clockwise, while in (much more common) [Polar Coordinates], right is 0 degrees and it increases counter clockwise. So in Robocode, when you use Math.atan2, you pass y as the x argument and x as the y argument to get the results you're looking for. -- Voidious

This link http://www.clarku.edu/~djoyce/trig/ also help explain most of it to me, might be useful to some more people in a similar case. -- Bal

I noticed that many bots use the Vector class, when the ArrayList class is the same and is preferred by Java developers. The difference is that Vector is thread-safe, while ArrayList is not. Is this a necessity in Robocode? I was thinking about using a Set in my bot, but didn't know if I'd have to use Collections.syncronizedSet. -- Aziz

    #include <vector>

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited August 25, 2007 17:20 EST by Aziz (diff)
Search: