Talk:PureAggression

From Robowiki
Revision as of 08:14, 24 May 2009 by Robobot (talk | contribs) (Robobot 0.1 : correcting user page links)
Jump to navigation Jump to search

Comments, questions, feedback:


For future refinements, you may want to investigate the RamBots and RambotChallenge2K6 pages, and see how its kin approach this tactic. -- Martin

There is one way of defending against this type of attack - PerpendicularMovement. The trick to dodging a straight-on rambot is to move perpendicular and orbit it. Effectively, you wait for it to get close, then sidestep out of the way. So basically, any WaveSurfing bot or anything using the MusashiTrick will kill the bot you are proposing. ;-) Consider looking at GrubbmThree for a rambot that doesn't die easily. -- AaronR

I knew there might be some refinements in the close quarters movement necessary... but if I just slow down... then I can turn and pursue quite easily, and if they are standing still, then I should be able to shoot them quite a bit... Actually I'm glad to hear, I pretty much assumed, but I'm glad to have another confirmation that RamBots are not as tough as they might seem. That means there will be many challenges to come. What is the highest ranking RamBot? Or are they even competitive at all? --BenHorner

The highest one I can name off the top of my head is GrubbmThree, which is ranked #226. So no, they aren't really competitive. If you want a good start for a movement, you can get a basic PerpendicularMovement just by adding Math.PI/2 (or 90, if you are using degrees) to your setTurnXXX() line. -- AaronR

The best one to come along was KC's MaxRisk. He withdrew it from the rumble but the rumble has a long memory: ( http://rumble.fervir.com/rumble/RatingDetails?game=roborumble&name=kc.micro.rammer.MaxRisk%200.6 ) 1641 rating is pretty solid, given an approximate average of 1600 across the rumble. The top bots really really hate rambots, because they tend to be problem bots for them, draging their rating down. -- Martin


I've got my gun / radar / robot turning all working together now, and a rudimentary chase'em down movement in place, I notice that when I merely use setAhead(8.0) each turn that my robot only moves at a velocity of 4.0... Does anyone know the reason for this? When I use setAhead(16.0) it's velocity goes up to 7.0... So I've been using setAhead(1000.0) so that it will just go the full 8.0. Do most people just do something like that, and use setMaxVelocity() when they want to slow down? --BenHorner

  • setAhead(8.0) tells the bot to move 8 units ahead and stop. If it moved at velocity 8.0, it would overshoot the mark by 12 units because it can't brake instantly. Let's say you were at a stop and told it to move ahead 8. It would accelerate to a velocity of 1 and move one unit. Then it would accelerate to 2 and move 2 units. Then 3 and 3 units. Then it would slow to 2 and move the final 2 units. Then it would slow to 0. If you were already moving at a velocity between 3 and 6, it would set a velocity of 4, then 2, then 2 again, then 0. I've written an adapter that basically tells it to move forward or backward 64 units (arbitrary) and then hold back the velocity using setMaxVelocity. 'setAhead' is one of the weaker interfaces, in my opinion. -- Martin
    • I couldn't of explained it any better Martin. Robocode is very smart in how it does things, setAhead(8), means to literally move forward 8 pixels. --Chase-san
  • You can actually use this to your advantage. If the enemy has moved to the side, and you have a large adjustment to make to your heading, you can call something like setAhead(30*Math.abs(Math.cos(headingChange))); Because cos is 1 when headingChange is 0, you will move full speed when going straight, but slow down when you need to turn. This can help, because you can turn sharper angles when you are going slower. -- Skilgannon

It's not perfect, but it never will be. It stomps the sample bots! I will have it in the Rumble as soon as I can figure out how to get it in there. :) --BenHorner


I've got an official rank, that seems to move around a bit in the low 440's. Disappointing, it was inevitable I suppose, the realist in me expected this, and is actually quite satisfied, the optimist however is crushed. :) The twentieth percentile, it's a good baseline, lots of room for improvement. Now I can see how smallish tweaks affect overall performance... --BenHorner

One quite obvious improvement you can make, is firing at a greater distance than point-blank only. A lot of bots move away (or at least move) when you get close, so there are only a few moments that you actually ram the opponent. Starting to fire (maybe somewhat lighter bullets) from a distance of lets say 200 pixels would increase your bulletdamage done and therefor your score. Remember that 36 pixels is as close you can get (2 times half botwidth). I found it a good way to start simple and understand the mechanisms of this 'game' instead of trying to fight against the best immediately. My first entrance was a lot worse than yours, so there still is hope. Good luck with your improvements! -- GrubbmGait

One more suggestion, this time on movement. There is a very usefull piece of code to be found at BackAsFront. Short said: If your destination lies behind you, and your turnangle is more than 90 degrees, just drive backward and turn 180-turnangle degrees. -- GrubbmGait

I just wrote something to do just what you've said above, if it's closer to the rear, switch perspectives, an go that way... but I think either the slowdown in transition, or the fact that it can sometimes bounce back and forth a bit when switching directions is a bit of a disadvantage, enough that it counteracts the advantage of following the more direct route... my rating is almost identical (1 spot lower as of now with around 1500 battles...) Does that seem reasonable? Or would you guess I've introduced some other bugs? --BenHorner

If BackAsFront doesn't help for a RamBot, then there are definitely still bugs. And since you're using linear projection for your movement, how about using it for your gun as well? Then you could also take shots (with smaller power bullets) until you get there, because your linear projection will have a better chance of hitting them. But get the bugs out before you add new features =) -- Skilgannon

  • I'm using the linear projection for movement and firing both, it fires if it can hit the projected location within 12 turns... (at the slowest bullet speed of 11, that's a range of 132), do you think I should extend the range further? I already see many misses at that range, I don't want to run myself out of energy... --BenHorner
    • That some of your bullets will miss is inevitable. In fact, it is 'profitable' (ie the enemy loses more energy than you) to fire if your hit rate is above 10%, and you still get more points at less than that due to bullet damage. If I were you I'd fire 2 power bullets at all other distances, and 3 power if you are closer than 150. -- Skilgannon
      • I will try that tweak in isolation, and see what happens to my rating. :) --BenHorner
        • Wow, now I understand what GrubbmGait meant when he said that was an obvious improvement, thanks Skilgannon for bringing it up again... I put that in place, with no other changes, and apparently that was worth an 80 spot jump in the rankings... from 371 to 292 (only about 750 battles so far though) I didn't think it would be that kind of difference... I will pay more attention to everyone in the future! --BenHorner
  • I've watched many battles against all the sample bots (I've run 100 rounds with each of them), I saw no exceptions, no skipped turns, and no radar slips (I explicitly check for skips and slips and output to the robot console)... I actually watched probably 200 battles take place, and didn't notice any behavior that looked like a bug. What would you consider to be a bug (what should I be looking for)? How would you suggest trying to find a bug of this nature? Should I try downloading some of the problem bots? Thanks for any help! --BenHorner
    • A bug would be where, instead of backing up, your bot turned more than 90 degrees and went forward instead. Or maybe if you turned the wrong way. Give your bot a try against RaikoNano. He's one tough bot, especially his movement. The sample bots aren't a very good representation of the Rumble, IMO. -- Skilgannon
      • Wow, I copied and pasted the code since it didn't seem downloadable from anywhere, that thing destroys me... I beat it in score consistently, but it kills be every time. --BenHorner
        • Very unexpected (to me at least), I put in your suggestion, power 2's all the time, and otherwise what I was doing before... power 3s, but try to kill with a ram for bonus. It enabled me to kill RaikoNano 2/10, I was dying 10/10 before... I'm surprised at this, learning experience I guess. I'm playing it too tight with my energy, you have to spend energy to make energy... :) --BenHorner
        • After having thought about this, it makes complete sense... I will get points for hits even if I lose by firing from further away... --BenHorner
          • That's the nature of the scoring system. In the very early versions of Robocode, scoring was based on survival only; this was changed when a few bots were released that couldn't be hit by any form of targeting that existed at the time, and were winning without firing a bullet. -- AaronR
          • Not only do you get points for hits, you also get extra energy every time your bullet hits, in fact, 3 times what the bullets power was. So firing a lot helps in more ways than one. -- Skilgannon
      • I don't think I have any bugs like that, but seeing my robot turn 90 degrees might be a very rare occurance, it recalculates the projections, and turns every tick... I've never seen it run away from anything. The worst thing I can see is that when it wants to go a direction close to perpendicular to it's heading, it sometimes oscillates 10 degrees back and forth, unable to decide between turning and going forward, or turning and going backward... but I think that's just how the numbers work out. --BenHorner

I don't know if you've noticed, but you are 50 points below the top RamBot. Nice! -- Skilgannon

  • Note that the real number 1 rambot is currently not active in the rumble. To match it you need at least an additional 10 points (Just to encourage you ;-) ). But indeed, nice improvements! -- GrubbmGait
    • When you say 10 points... do you mean 10% higher score share average? --BenHorner
    • No, I mean rumble points. GrubbmThree has around 1630 points, MaxRisk had about 1640. -- GrubbmGait
    • Ah sorry, you were saying that I would need an additional 10 rumble points after I hypothetically overtook you... lol, maybe in 2009. I can only think of very minor tweaks to improve ramming, I think most improvement lies in the gun, and that's getting away from being a ram bot... we'll see. --BenHorner

You cannot post new threads to this discussion page because it has been protected from new threads, or you do not currently have permission to edit.

There are no threads on this page yet.