[Home]Smash

Robo Home | Changes | Preferences | AllPages

Bot Name

Smash

Author

Starrynte

Extends

AdvancedRobot. (duh)

What's special about it?

Nothing really...My first MR Movement bot

Great, I want to try it. Where can I download it?

https://www.robocoderepository.com/BotDetail.jsp?id=3104

How competitive is it?

Can defeat all sample bots

How does it move?

MR Movement in melee, simple dodging movement in 1v1

How does it fire?

Linear or HeadOn? Targeting

How does it dodge bullets?

Only in 1v1

How does the melee strategy differ from one-on-one strategy?

It uses a radar lock in 1v1, or if it will fire soon. Also, see above (Movement)

How does it select a target to attack/avoid in melee?

Usually it attacks the closest. Or sometimes the "queerest" (see SpareParts).

What does it save between rounds and matches?

It saves the enemy info between rounds.

Can I use your code?

I guess...it's kind of messy, but it's at Starrynte/Smash

What's next for your robot?

Smash's days are coming to an end. I'm planning on just ... fixing alot of tiny bugs, e.g. not moving because it keeps selecting a point instead of actually going there (fixed)

Does it have any WhiteWhales?

Probably a lot!

What other robot(s) is it based on?

HawkOnFire, Coriantumr, and alot of ideas from SpareParts

Comments, questions, feedback:

Any idea of what's wrong if it prints out stuff like TARGET:sample.Corners at Point2D.Double[297.6702047421246, 52050.50756068383]? Code is posted at Starrynte/Smash (note: it is in debug mode, so itll print out alot of stuff). --Starrynte

What version of robocode? Older versions had funky teleport bugs. --Chase-san

Wow, your code is like, is in a older style (enumeration, vectors, hashtables). In your evaluate near the bottom, you have while(i.hasNext()){ just after you define a new Iterator, did you mean to use that iterator for that while loop? (you could just reuse the iterator by reassigning it btw, just remove "Iterator d" friom the first part of that). As for your little bug I can't be sure without doing a full trace, but I think it might be a problem in your extrapolate method. If can run a simple check (if(location.getX() < 0 || location.getX() > 800 || location.getY() < 0 || location.getY() > 600) out.println("ERROR! at line <line num>"); --Chase-san

Hmm, did a little test, and these were the results (cropped to a few lines of the output, although most of it is similar to this):

X WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig x=999.2743866043156
Y WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig y=-737.2268427985015
X WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig x=1000.5286926303485
Y WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig y=-743.0942712295143
X WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig x=1001.7829986563813
Y WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig y=-748.9616996605272
X WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig x=1003.0373046824142
Y WRONG: timeDelta=1.0 velocity=6.0 heading=2.9309882324026777 orig y=-754.82912809154
meaning it must be in onScannedRobot...it began to say that around the 11th tick. Did another test, and it began at the 5th tick. The 'onCustomEvent' for the tick works fine, so it's not a 'myPosition' update problem --Starrynte

Wrong test earlier, forgot to take into account abs value and was accidentally comparing x instead of y...but still similar results Another test shows that the onScannedRobot is assigning the enemy position corretly...im wondering if I modified the enemy position in any way besides in onScannedRobot...a quick search shows im not. And i have robocode 1.3.4 Perhaps i should tweak with 1v1 first...--Starrynte

1v1 no problem. Added nano's code for finding the intersection of a line with a shape. melee, still problems with the 'original position'. --Starrynte

Your 'tick' condition looks suspicious to me...for example if you stop moving, and haven't fired, but you've turned, the e.getBearing() in onScannedRobot will be of a heading other than the recorded heading. I would use

return getTime() != time;
as a condition. -- Skilgannon

Why is it that I always miss the obvious?! Thnx for the suggestion, still doesn't really work, thnx still. Oh and btw, the problem occurs more often the more the bots there are. It usually occurs with the bots it hasn't scanned for awhile.--Starrynte (post edited)


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited July 28, 2007 16:33 EST by Starrynte (diff)
Search: