Difference between revisions of "Archived talk:User:CrazyBassoonist 2009/08/18"
m (signed) |
m (moved User talk:CrazyBassoonist/Archived Talk 2009/08/18 to Archived talk:User:CrazyBassoonist 2009/08/18: move to talkarchive) |
||
(63 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{talkarchive|User talk:CrazyBassoonist}} | |
+ | ==Fuatisha== | ||
+ | Wow, where did this bot come from? | ||
+ | Congrats on 5th place in nano (and thanks for bumping Kitten to above NanoLauLecktrik again xD)! | ||
+ | Wanna tell us about your bot, and what you did? Does it use the nano wavesurfing as in savantWS? Or does it use a misleading endgame to fool the PM guns? Both I think are slightly unlikely based on the scores, but I'm curious now! | ||
+ | And unless I'm mistaken, you didn't include the source with the .jar, you might want to consider keeping it open source, like most nanos ;). [[User:Spinnercat|Spinnercat]] 01:09, 5 August 2009 (UTC) | ||
− | + | Well, first of all it is open source. You can download the source at http://robocoderepository.com/BotDetail.jsp?id=3720. Sorry for not including it, but honestly the problem is that I keep thinking I am including the source while my robots never seem to have the source with them. About Fuatisha, I decided that I would try to make a competitive robot for once instead of stuff like SavantWS that are kind of cool but aren't that great score-wise. So I finally decided to copy a weekendobsession type patternmatcher(the name means copy in swahili). For the movement, it uses stop and go, switching to an oscillator if that fails. The oscillator is technically based off of nanolaulectric, but its been changed a lot using some ideas from robar I read about on the wiki. It randomly changes the frequency of the oscillator when it gets hit, and it uses the enemy's distance to decide how far to move. And you're welcome for the kitten score boost, it's starting to seem like all of my nanobots are just kitten food.--[[User:CrazyBassoonist|CrazyBassoonist]] 01:48, 5 August 2009 (UTC) | |
− | + | By the way, It's 5th place status is not official until it gets two thousand battles, I believe--[[User:CrazyBassoonist|CrazyBassoonist]] 01:49, 5 August 2009 (UTC) | |
− | + | == Misleading Endgame == | |
+ | Rednaxela's comments about signature moves gave me an interesting idea. As bots can still gather data after they are disabled(I think), it might be possible to throw off your enemies targeting system by moving in a misleading way if they get disabled. Does anyone think this would have any effect at all?--[[User:CrazyBassoonist|CrazyBassoonist]] 19:50, 31 July 2009 (UTC) | ||
− | + | I'd think this could have a very significant effect on ''some'' bots, however I think most decently strong bots make sure not to record data on the enemy when disabled. My non-codesize-restricted ones make sure of this anyway. It certainly wouldn't hurt to implement in any case. Actually, the way RougeDC moves when there are no bullets in the air, would already be misleading to any disabled bots that watch it, however RougeDC doesn't let them live long when disabled anyway :) --[[User:Rednaxela|Rednaxela]] 20:26, 31 July 2009 (UTC) | |
− | + | It might be worth looking in to this... many bots only use (or heavily weight) waves that they fire on, so it wouldn't work. But even if these waves only carry 5% of the weight, you still might be able to throw their targeting off by a bit. You'd probably want to be careful that they're actually disabled before doing this, and maybe fire some bullets at times so that the battlefield inactivity thing won't kick in. Like Rednaxela said, it probably wouldn't work against many top bots, but it might be worth looking in to, my guess is that it would probably be enough to bump a decent bot quite a few places. [[User:Spinnercat|Spinnercat]] 00:46, 1 August 2009 (UTC) | |
− | I' | + | It might work especially well against nano patternmatchers. I'm pretty sure that all the weekendobsession type nano PM bots gather data after they are disabled, and it would be very easy to fool them by making it look like you were repeating the pattern they saw while disabled--[[User:CrazyBassoonist|CrazyBassoonist]] 01:06, 1 August 2009 (UTC) |
− | + | It may help you a little bit, yeah. When you are disable, Robocode just restrict you to move and fire, right? One funny thing is that in the virtual gun system of BlackHole, I just detect when the gunheat is zero I fire the virtual bullets, so when it get disabled it fires the VB every tick. | |
− | + | == Repository Problems == | |
− | + | For some reason I cannot access robocoderepository.com, does anyone know why that might be?--[[User:CrazyBassoonist|CrazyBassoonist]] 02:25, 19 May 2009 (UTC) | |
− | + | I've been having troubles since monday. is the pages not loading or a 404 thing? --[[User:J Litewski|HACKhalo2]] 02:28, 19 May 2009 (UTC) | |
− | + | I don't have any problem. Maybe your ISP blocked it? » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 06:50, 19 May 2009 (UTC) | |
− | + | I'm not sure. It will load for me on one computer, but not on the one with Robocode on it.--[[User:CrazyBassoonist|CrazyBassoonist]] 12:15, 19 May 2009 (UTC) | |
− | + | == SavantWS== | |
+ | Quick poll... Can I call this the first ever wavesurfing nanobot?--[[User:CrazyBassoonist|CrazyBassoonist]] 23:50, 29 July 2009 (UTC) | ||
− | I | + | Some info about how it works: When the enemy fires, it logs a wave with information about when the wave will pass it and it's position, and only surfs the closest wave. It tries to move to a certain location on the wave,and it changes its destination when it gets hit. I think this is substantially different enough to be considered [[WaveSurfing]] because unlike robots like SavantVS and acesurf, SavantWS actually moves when a wave passes it in stead of changing when the enemy fires. If only it had enough space for a velocity segment, it might be really killer; as it is it has to use a duelistnano gun and it can't change direction except for on wall hits.--[[User:CrazyBassoonist|CrazyBassoonist]] 01:09, 30 July 2009 (UTC) |
− | + | That being said, I would like to get opinions from other people on the wiki who know more about wavesurfing than I do before I go off and claim that this is the first wavesurfing nano, just in case my interpretation of it is wrong or it has been done this way before and I'm not aware of it.--[[User:CrazyBassoonist|CrazyBassoonist]] 01:33, 30 July 2009 (UTC) | |
− | |||
− | + | I think it is, however it would be good if you can open sourced it so we can confirm it. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 11:06, 30 July 2009 (UTC) | |
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Sorry again (How many sorry I need to post today? Perhaps I should stop posting 'till tomorrow), you hid your source under the source part of RobocodeRepository.com. I'm using Lynx the time I download it for first time (I'm setting some Linux server and get bored =)) and RR.com, unlike the wiki, has very bad HTML layout. I don't think it is Wave Surfing. I think I can squeeze it to 329 bytes, I'll post it if you want, but not here. I think I still call it random mover, you didn't use real GF, but a ''random'' GF. And the way you detect if is quite weird (or ''voodoo'', in Voidious' term) » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 11:30, 30 July 2009 (UTC) | |
− | |||
− | + | Aghh, I didn't realize I hadn't packaged the code with it. Here's the code, along with a few bugfixes and debugging graphics so you can really see what it's doing: | |
− | <pre> | + | <pre>package oog.nano.savantWS; |
− | + | import java.awt.*; | |
− | + | import java.awt.geom.*; | |
− | + | import java.util.*; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | The | + | import robocode.*; |
+ | /*SavantWS- By CrazyBassoonist. | ||
+ | * Graphics version. | ||
+ | */ | ||
+ | public class SavantWS3 extends AdvancedRobot { | ||
+ | final static double BULLET_POWER=2.5; | ||
+ | final static int ASSUMED_SPEED=14; | ||
+ | final static int MAX_REACH=150; | ||
+ | static double GotoPoint; | ||
+ | static int dir; | ||
+ | static double enemyEnergy; | ||
+ | static ArrayList waves; | ||
+ | public void run(){ | ||
+ | dir=1; | ||
+ | waves=new ArrayList(); | ||
+ | |||
+ | turnGunRightRadians(Double.POSITIVE_INFINITY); | ||
+ | } | ||
+ | public void onScannedRobot(ScannedRobotEvent e){ | ||
+ | setTurnRightRadians(Math.cos(e.getBearingRadians())); | ||
+ | if(enemyEnergy>(enemyEnergy=e.getEnergy())){ | ||
+ | //The only way this was fit into a nano was by having the robot make assumptions about half of the wavesurfing. | ||
+ | //Since we aren't using bearing at all, all we do is mark our position and the time the wave will pass us. | ||
+ | wave w=new wave(); | ||
+ | w.x=getX(); | ||
+ | w.y=getY(); | ||
+ | w.endTime=(int)(getTime()+e.getDistance()/ASSUMED_SPEED); | ||
+ | waves.add(w); | ||
+ | } | ||
+ | |||
+ | move(); | ||
+ | for(int i=0;i<waves.size();i++){ | ||
+ | wave w=(wave)waves.get(i); | ||
+ | Graphics2D g=getGraphics(); | ||
+ | g.setColor(Color.blue); | ||
+ | int ex=(int)(getX()+e.getDistance()*Math.sin(e.getBearingRadians()+getHeadingRadians())); | ||
+ | int ey=(int)(getY()+e.getDistance()*Math.cos(e.getBearingRadians()+getHeadingRadians())); | ||
+ | g.drawOval((int)(ex-ASSUMED_SPEED*(getTime()-w.endTime)),(int)(ey-ASSUMED_SPEED*(getTime()-w.endTime)),(int)(2*ASSUMED_SPEED*(getTime()-w.endTime)),(int)(2*ASSUMED_SPEED*(getTime()-w.endTime))); | ||
+ | } | ||
+ | //Gun from duelist nano, smallest radar lock/gun available(AFAIK). | ||
+ | setTurnGunLeftRadians(getGunTurnRemainingRadians()); | ||
+ | setFire(BULLET_POWER); | ||
+ | } | ||
+ | //Reverse when we hit a wall. | ||
+ | public void onHitWall(HitWallEvent e){ | ||
+ | dir=-dir; | ||
+ | } | ||
+ | //Choose a new place to move to. | ||
+ | public void onHitByBullet(HitByBulletEvent e){ | ||
+ | GotoPoint=MAX_REACH*Math.random(); | ||
+ | } | ||
+ | |||
+ | //Cheaper to do this here. | ||
+ | public void move(){ | ||
+ | int closestWave=1000000; | ||
+ | int graphNum=10000; | ||
+ | Graphics2D g=getGraphics(); | ||
+ | for(int i=0;i<waves.size();i++){ | ||
+ | wave w=(wave)waves.get(i); | ||
+ | //Find our closest wave, that's the only one we want to surf. | ||
+ | if(w.endTime<closestWave&&getTime()<w.endTime){ | ||
+ | setAhead(dir*(Point2D.distance(getX(),getY(),w.x,w.y)-GotoPoint)); | ||
+ | graphNum=i; | ||
+ | closestWave=w.endTime; | ||
+ | } | ||
+ | } | ||
+ | if(graphNum!=10000){ | ||
+ | wave GraphicsWave=(wave)waves.get(graphNum); | ||
+ | g.setColor(Color.red); | ||
+ | g.drawOval((int)(GraphicsWave.x-GotoPoint),(int)(GraphicsWave.y-GotoPoint),(int)GotoPoint*2,(int)GotoPoint*2); | ||
+ | } | ||
+ | } | ||
+ | public class wave{ | ||
+ | double x; | ||
+ | double y; | ||
+ | int endTime; | ||
+ | public wave(){} | ||
+ | } | ||
+ | }</pre> | ||
− | + | A bit about the voodoo in this, as nat says: | |
− | + | :*'''Wave Tracking Voodoo'''-It does track waves. The thing is it tracks the waves using the wave's predicted hit time in lieu of normal methods. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | :*'''GF voodoo'''-You are very right that it does not use GF's. Calling that variable GF was more of a joke. As you can see I have changed it in this version. What it really does is create a danger area for each wave, with the size changing based on it getting hit. | |
− | + | :*'''Surfing implementation'''-I think of this as more of a goto bot,as it tries to get to a certain spot on every wave. | |
− | + | :*'''Waves drawn with the graphics'''-I think those could reasonably be called (buggy)waves. It draws them without gathering any extra information besides the enemy's location/absolute bearing. You can really see what it's thinking a lot better with the graphics on. | |
− | I can | + | :*'''Assumed bulletspeed'''-I think that this is one of the big problems for this robot. You can see how it works a lot better if you try it against a robot like ahf.Acero. |
− | + | An interesting note: Almost exactly the same APS in microrumble and nanorumble. I'd be very interested in hearing what everyone has to say about this (thanks nat)--[[User:CrazyBassoonist|CrazyBassoonist]] 16:18, 30 July 2009 (UTC) | |
− | + | It looks more like a random-distance bullet dodger that change the distance every time it is hit. And it try to get to the same distance for every bullet. Actually I have already got the code from the RR.com. I can squeeze it for 9 bytes more. This is 239 bytes: | |
+ | <pre> | ||
+ | package oog.nano; | ||
− | + | import robocode.AdvancedRobot; | |
+ | import robocode.HitByBulletEvent; | ||
+ | import robocode.HitWallEvent; | ||
+ | import robocode.ScannedRobotEvent; | ||
− | + | import java.awt.geom.Point2D; | |
− | + | import java.util.ArrayList; | |
− | + | /* | |
− | + | * SavantWS- By CrazyBassoonist.Version 0.1- Initial release. Still awaiting | |
− | * | + | * judgement on whether I can trulycall this *drumroll*... The first true |
− | + | * wavesurfing nanobot! | |
− | + | */ | |
− | + | public class SaventWS extends AdvancedRobot { | |
− | + | final static double BULLET_POWER = 2.5; | |
− | + | final static int MOVE_UNIT = 20; | |
− | + | final static int ASSUMED_SPEED = 14; | |
− | + | final static int MAX_GF_REACH = 300; | |
− | + | static double GF; | |
− | + | static int dir; | |
− | + | static double enemyEnergy; | |
− | + | static ArrayList<SaventWS.wave> waves; | |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | double | ||
− | |||
− | double | ||
− | |||
− | |||
− | |||
public void run() { | public void run() { | ||
− | + | dir = MOVE_UNIT; | |
− | + | waves = new ArrayList<SaventWS.wave>(); | |
+ | |||
+ | turnGunRightRadians(Double.POSITIVE_INFINITY); | ||
} | } | ||
+ | |||
public void onScannedRobot(ScannedRobotEvent e) { | public void onScannedRobot(ScannedRobotEvent e) { | ||
− | + | wave w; | |
− | + | int et,i,closestWave = 1000000; | |
− | + | ||
− | + | setTurnRightRadians(Math.cos(e.getBearingRadians())); | |
− | + | if (enemyEnergy > (enemyEnergy = e.getEnergy())) { | |
− | + | // The only way this was fit into a nano was by having the robot | |
− | + | // make assumptions about half of the wavesurfing. | |
− | + | // Since we aren't using bearing at all, all we do is mark our | |
− | + | // position and the time the wave will pass us. | |
+ | waves.add(w = new wave()); | ||
+ | w.x = getX(); | ||
+ | w.y = getY(); | ||
+ | w.endTime = (int) (getTime() + e.getDistance() / ASSUMED_SPEED); | ||
} | } | ||
− | |||
− | |||
− | |||
+ | for (i = 0; i < waves.size(); i++) { | ||
+ | w = waves.get(i); | ||
+ | // Find our closest wave, that's the only one we want to surf. | ||
+ | if ((et = w.endTime) < closestWave && getTime() < et) { | ||
+ | |||
+ | // If we haven't reached the GF we want to be at, move there. | ||
+ | if (Point2D.distance(getX(), getY(), w.x, w.y) < GF) { | ||
+ | setAhead(dir); | ||
+ | } | ||
+ | closestWave = et; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Gun from duelist nano, smallest radar lock/gun available (AFAIK). | ||
+ | setTurnGunLeftRadians(getGunTurnRemainingRadians()); | ||
+ | setFire(BULLET_POWER); | ||
+ | } | ||
+ | |||
+ | // Reverse when we hit a wall. | ||
+ | public void onHitWall(HitWallEvent e) { | ||
+ | dir = -dir; | ||
} | } | ||
+ | // Choose a new GF to move to. This isn't really a GF, but it approximates | ||
+ | // it. | ||
+ | public void onHitByBullet(HitByBulletEvent e) { | ||
+ | GF = MAX_GF_REACH * Math.random(); | ||
+ | } | ||
+ | |||
+ | static class wave { | ||
+ | double x; | ||
+ | double y; | ||
+ | int endTime; | ||
+ | } | ||
} | } | ||
</pre> | </pre> | ||
− | + | I haven't test it yet, but I think it can work just like the one you uploaded. And I think it has enough room for simple random gun to put in. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 17:02, 30 July 2009 (UTC) | |
− | + | Hm... maybe it's just me, but I'm not sure the idea of a wave surfing nano is such a good idea. Perhaps Nat touched on it when he said that it did about as well in micro as in nano land. Basically, my interpretation of wavesurfing is that it dodges guessfactors. It works best against GuessFactor Targeting, but most of the bots in Nano-land (at least the top ones) use symbolic pattern matching. And, it seems like always going to the same place on a wave will make it really easy to be hit with a pattern matcher. In micro, there are more GF targeters, which might be one reason that it's doing just as well ;) So perhaps it would be better to keep this as a micro, and maybe develop the gun a bit. Of course, i'm still a bit new to robocode, so i might be giving bad advice. | |
+ | And thanks, your bot was responsible for helping Kitten to 14th place :D [[User:Spinnercat|Spinnercat]] 17:47, 30 July 2009 (UTC) | ||
− | + | @Spinnercat: Glad to help. And by the way, you are completely right. A nano wavesurfing implementation will probably never be strong at all, because it uses a ton of code(if you look at the code, my radar/gun are combined into 2 lines total) and it could never fit in the things that make wavesurfing strong. I'm trying to make a wavesurfing nano just to see if it can be done. You're also right about it being a lot more effective in micro land, I'm actually working on a SavantMicroWS with wavesurfing right now. | |
− | + | @Nat:I'm not really sure what you mean by bullet dodger, but I tend to think of a robot that | |
+ | moves a certain distance when the other robot fires. It's true that this robot's movement looks alot like it is doing that, but if you use the graphics version you can see what it is really doing--[[User:CrazyBassoonist|CrazyBassoonist]] 18:03, 30 July 2009 (UTC) | ||
− | + | I'd certainly say this counts as a wave surfer. Not a strong one, nor a learning one, but it does appear to surf the waves in a limited capacity. A highly-imprecise flattener-only surfer is still a surfer, and that's what this is I'd say. By the way, your "Wave Tracking Voodoo" is nearly exactly the same as something I once had done myself to make a very small codesize bot to dodge pattern matching, it seemed to be kind of broken and I couldn't quite get it into nano size, but I suppose it technically surfed too. I should probably polish it and release it as a micro some time... :) --[[User:Rednaxela|Rednaxela]] 20:33, 30 July 2009 (UTC) | |
− | + | Interesting. SavantWS could probably be changed into an extremely buggy version of that and still be a nano. All you would have to do would be to change the direction and location to move to randomly when a wave passes it instead of when it hits a wall or gets hit.--[[User:CrazyBassoonist|CrazyBassoonist]] 21:05, 30 July 2009 (UTC) | |
− | + | Hey, sure, I'll gladly share my thoughts. I only refrained before because I don't know much about AceSurf or SavantVS. Anyway, yes, I would certainly call this a Wave Surfer. The term "Wave Surfing" is kind of like "GuessFactor Targeting": it has a clear and simple meaning, but 90% of the time, things like [[Precise Prediction]] or [[Visit Count Stats]] come along with it, so people start to associate the term with all those other things, too. I can't really comment on whether it's the "first NanoBot Wave Surfer", though, just because I don't know much about AceSurf or SavantVS. You could always say something like, "it's arguably the first NanoBot Wave Surfer". =) Or just say that you think it is - no harm in that. Pretty cool, by the way! --[[User:Voidious|Voidious]] 02:09, 31 July 2009 (UTC) | |
− | + | Thanks! If you look at the code, robots like SavantVS and AceSurf actually use no waves at all, so I think I'll call it the first if noone else has an objection:-)--[[User:CrazyBassoonist|CrazyBassoonist]] 02:46, 31 July 2009 (UTC) | |
+ | == Bad Results == | ||
+ | For some reason, the new Acraepheus was doing well then started getting zeros. Is this the result of a bug with a different version of robocode, or bad results being uploaded?--[[User:CrazyBassoonist|CrazyBassoonist]] 22:01, 19 May 2009 (UTC) | ||
− | + | By the way, I have 1.6.2--[[User:CrazyBassoonist|CrazyBassoonist]] 22:08, 19 May 2009 (UTC) | |
+ | : The results I'm running show your bot doing fairly well. Perhaps it is a client issue or something. --[[User:Miked0801|Miked0801]] 22:41, 19 May 2009 (UTC) | ||
+ | :: It appears the [[User:Voidious|Voidious]]'s server is the one giving you all the 0s. Perhaps you have an exception or something that only shows up in version 1.5.4? Dunno. --[[User:Miked0801|Miked0801]] 22:44, 19 May 2009 (UTC) | ||
− | + | You're right, thank you very much for drawing that to my attention. Does anyone know of any issues like this that occur in 1.5.4 but not in other versions?--[[User:CrazyBassoonist|CrazyBassoonist]] 22:50, 19 May 2009 (UTC) | |
− | + | Argh, not sure what the problem is, but killed my clients for now. I'll add you to my exclude list before I start 'em again until we figure it out. --[[User:Voidious|Voidious]] 23:00, 19 May 2009 (UTC) | |
− | |||
− | |||
− | + | Thanks. By now I'm guessing that what I need to do is figure out what is making errors in 1.5.4 and fix it then re-upload those versions. --[[User:CrazyBassoonist|CrazyBassoonist]] 23:06, 19 May 2009 (UTC) | |
− | + | Sorry, I was on my way out the door before. Here's the error being hit in 1.5.4: | |
+ | <pre> | ||
+ | Acraepheus 2.2 (1): Throwable: java.lang.NoSuchMethodError: oog.Acraepheus.getGraphics()Ljava/awt/Graphics2D; | ||
+ | java.lang.NoSuchMethodError: oog.Acraepheus.getGraphics()Ljava/awt/Graphics2D; | ||
+ | at oog.Acraepheus.onScannedRobot(Acraepheus.java:75) | ||
+ | at robocode.peer.robot.EventManager.onScannedRobot(Unknown Source) | ||
+ | at robocode.peer.robot.EventManager.processEvents(Unknown Source) | ||
+ | at robocode.peer.RobotPeer.tick(Unknown Source) | ||
+ | at robocode.peer.RobotPeer.turnRadar(Unknown Source) | ||
+ | at robocode._AdvancedRadiansRobot.turnRadarRightRadians(Unknown Source) | ||
+ | at oog.Acraepheus.run(Acraepheus.java:71) | ||
+ | at robocode.peer.RobotPeer.run(Unknown Source) | ||
+ | at java.lang.Thread.run(Thread.java:619) | ||
+ | </pre> | ||
+ | I don't mind updating my clients, but unfortunately, there's no guarantee someone else won't run 1.5.4 as long as it's still allowed... | ||
+ | |||
+ | --[[User:Voidious|Voidious]] 23:52, 19 May 2009 (UTC) | ||
+ | : And I believe that error would happen in 1.6.0 too, I had the same problem once, since then I always get the Graphics2D object out of the onPaint method only. --[[User:Zyx|zyx]] 01:03, 20 May 2009 (UTC) | ||
− | + | Well it looks like it's just a problem with the debugging graphics. Line 75 is this: <pre>Graphics 2D g=getGraphics();</pre> Shouldn't hurt that much to remove it, I probably should have left the debugging graphics out anyway.--[[User:CrazyBassoonist|CrazyBassoonist]] 00:32, 20 May 2009 (UTC) | |
− | + | I've now got it fixed, thanks for the help. How long does it take the rumble to remove robots that have been removed from the participants list? Even some of my very old robots seem to be there still--[[User:CrazyBassoonist|CrazyBassoonist]] 01:08, 20 May 2009 (UTC) | |
− | + | It's not a static delay, as far as I know it's just that it only allows removals from Darkcanuck's clients. That's usually within a day or so, in my experience. No need to wait on posting your new versions, though, at least if you ask me. =) --[[User:Voidious|Voidious]] 01:17, 20 May 2009 (UTC) | |
− | + | Thanks, I was more concerned about the old versions being gigantic problembots for others due to the zeros. Is it normal to see scores that you can't replicate in tests? I've tried my robot against barracuda 1.0 about 20 times by now, and the lowest score I've recorded so far has been 42%. How could it have ended up with 32% against it in the roborumble?--[[User:CrazyBassoonist|CrazyBassoonist]] 01:42, 20 May 2009 (UTC) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Nope, and I also get incredibly frustrated when I see battle results that I can't duplicate locally. But there can be a surprising amount of variance in Robocode battles. --[[User:Voidious|Voidious]] 01:49, 20 May 2009 (UTC) | |
− | + | : Behold, the demon known as Standard Deviation - bane of all robocoders looking for consistant results :) --01:57, 20 May 2009 (UTC) | |
− | + | But wait a second.... I realize that that's within the realm of probability, but what about the 10% against pkkillers.PKassassin? I average around 50% on him in my own tests.... And acraepheus hasn't been doing too well against duelistMicro, but 3% is really pushing it=( Anyway, standard deviance or not, I must sleep now so I'll try to see what it is tomorrow--[[User:CrazyBassoonist|CrazyBassoonist]] 02:06, 20 May 2009 (UTC) | |
− | + | : In both cases, the other bot only has a couple hundred bullet damage (way cool we can see that on Darkcanuck's server), which leads me to believe your bot must have errored out somehow... --[[User:Voidious|Voidious]] 02:10, 20 May 2009 (UTC) | |
− | |||
− | + | Okay... I downloaded 1.6.1.4, and I'm not getting any errors so far--[[User:CrazyBassoonist|CrazyBassoonist]] 21:01, 20 May 2009 (UTC) | |
− | == | + | == Changes checking == |
− | |||
− | |||
− | |||
− | |||
− | + | I'm curious, how can you answer things so fast? I actually checking the recent changes every 10 minutes. But when I'm working, I may left it for hours without checking. Are you using RSS/Atom client which refresh every minute? » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 13:51, 27 May 2009 (UTC) | |
− | + | Theres no secret to it, Its just that I often find myself checking the wiki while developing robots. There's not much to do when waiting for a thousand round melee battle to finish--[[User:CrazyBassoonist|CrazyBassoonist]] 13:55, 27 May 2009 (UTC) | |
− |
Latest revision as of 04:50, 8 October 2009
|
Contents
Fuatisha
Wow, where did this bot come from? Congrats on 5th place in nano (and thanks for bumping Kitten to above NanoLauLecktrik again xD)! Wanna tell us about your bot, and what you did? Does it use the nano wavesurfing as in savantWS? Or does it use a misleading endgame to fool the PM guns? Both I think are slightly unlikely based on the scores, but I'm curious now! And unless I'm mistaken, you didn't include the source with the .jar, you might want to consider keeping it open source, like most nanos ;). Spinnercat 01:09, 5 August 2009 (UTC)
Well, first of all it is open source. You can download the source at http://robocoderepository.com/BotDetail.jsp?id=3720. Sorry for not including it, but honestly the problem is that I keep thinking I am including the source while my robots never seem to have the source with them. About Fuatisha, I decided that I would try to make a competitive robot for once instead of stuff like SavantWS that are kind of cool but aren't that great score-wise. So I finally decided to copy a weekendobsession type patternmatcher(the name means copy in swahili). For the movement, it uses stop and go, switching to an oscillator if that fails. The oscillator is technically based off of nanolaulectric, but its been changed a lot using some ideas from robar I read about on the wiki. It randomly changes the frequency of the oscillator when it gets hit, and it uses the enemy's distance to decide how far to move. And you're welcome for the kitten score boost, it's starting to seem like all of my nanobots are just kitten food.--CrazyBassoonist 01:48, 5 August 2009 (UTC)
By the way, It's 5th place status is not official until it gets two thousand battles, I believe--CrazyBassoonist 01:49, 5 August 2009 (UTC)
Misleading Endgame
Rednaxela's comments about signature moves gave me an interesting idea. As bots can still gather data after they are disabled(I think), it might be possible to throw off your enemies targeting system by moving in a misleading way if they get disabled. Does anyone think this would have any effect at all?--CrazyBassoonist 19:50, 31 July 2009 (UTC)
I'd think this could have a very significant effect on some bots, however I think most decently strong bots make sure not to record data on the enemy when disabled. My non-codesize-restricted ones make sure of this anyway. It certainly wouldn't hurt to implement in any case. Actually, the way RougeDC moves when there are no bullets in the air, would already be misleading to any disabled bots that watch it, however RougeDC doesn't let them live long when disabled anyway :) --Rednaxela 20:26, 31 July 2009 (UTC)
It might be worth looking in to this... many bots only use (or heavily weight) waves that they fire on, so it wouldn't work. But even if these waves only carry 5% of the weight, you still might be able to throw their targeting off by a bit. You'd probably want to be careful that they're actually disabled before doing this, and maybe fire some bullets at times so that the battlefield inactivity thing won't kick in. Like Rednaxela said, it probably wouldn't work against many top bots, but it might be worth looking in to, my guess is that it would probably be enough to bump a decent bot quite a few places. Spinnercat 00:46, 1 August 2009 (UTC)
It might work especially well against nano patternmatchers. I'm pretty sure that all the weekendobsession type nano PM bots gather data after they are disabled, and it would be very easy to fool them by making it look like you were repeating the pattern they saw while disabled--CrazyBassoonist 01:06, 1 August 2009 (UTC)
It may help you a little bit, yeah. When you are disable, Robocode just restrict you to move and fire, right? One funny thing is that in the virtual gun system of BlackHole, I just detect when the gunheat is zero I fire the virtual bullets, so when it get disabled it fires the VB every tick.
Repository Problems
For some reason I cannot access robocoderepository.com, does anyone know why that might be?--CrazyBassoonist 02:25, 19 May 2009 (UTC)
I've been having troubles since monday. is the pages not loading or a 404 thing? --HACKhalo2 02:28, 19 May 2009 (UTC)
I don't have any problem. Maybe your ISP blocked it? » Nat | Talk » 06:50, 19 May 2009 (UTC)
I'm not sure. It will load for me on one computer, but not on the one with Robocode on it.--CrazyBassoonist 12:15, 19 May 2009 (UTC)
SavantWS
Quick poll... Can I call this the first ever wavesurfing nanobot?--CrazyBassoonist 23:50, 29 July 2009 (UTC)
Some info about how it works: When the enemy fires, it logs a wave with information about when the wave will pass it and it's position, and only surfs the closest wave. It tries to move to a certain location on the wave,and it changes its destination when it gets hit. I think this is substantially different enough to be considered WaveSurfing because unlike robots like SavantVS and acesurf, SavantWS actually moves when a wave passes it in stead of changing when the enemy fires. If only it had enough space for a velocity segment, it might be really killer; as it is it has to use a duelistnano gun and it can't change direction except for on wall hits.--CrazyBassoonist 01:09, 30 July 2009 (UTC)
That being said, I would like to get opinions from other people on the wiki who know more about wavesurfing than I do before I go off and claim that this is the first wavesurfing nano, just in case my interpretation of it is wrong or it has been done this way before and I'm not aware of it.--CrazyBassoonist 01:33, 30 July 2009 (UTC)
I think it is, however it would be good if you can open sourced it so we can confirm it. » Nat | Talk » 11:06, 30 July 2009 (UTC)
Sorry again (How many sorry I need to post today? Perhaps I should stop posting 'till tomorrow), you hid your source under the source part of RobocodeRepository.com. I'm using Lynx the time I download it for first time (I'm setting some Linux server and get bored =)) and RR.com, unlike the wiki, has very bad HTML layout. I don't think it is Wave Surfing. I think I can squeeze it to 329 bytes, I'll post it if you want, but not here. I think I still call it random mover, you didn't use real GF, but a random GF. And the way you detect if is quite weird (or voodoo, in Voidious' term) » Nat | Talk » 11:30, 30 July 2009 (UTC)
Aghh, I didn't realize I hadn't packaged the code with it. Here's the code, along with a few bugfixes and debugging graphics so you can really see what it's doing:
package oog.nano.savantWS; import java.awt.*; import java.awt.geom.*; import java.util.*; import robocode.*; /*SavantWS- By CrazyBassoonist. * Graphics version. */ public class SavantWS3 extends AdvancedRobot { final static double BULLET_POWER=2.5; final static int ASSUMED_SPEED=14; final static int MAX_REACH=150; static double GotoPoint; static int dir; static double enemyEnergy; static ArrayList waves; public void run(){ dir=1; waves=new ArrayList(); turnGunRightRadians(Double.POSITIVE_INFINITY); } public void onScannedRobot(ScannedRobotEvent e){ setTurnRightRadians(Math.cos(e.getBearingRadians())); if(enemyEnergy>(enemyEnergy=e.getEnergy())){ //The only way this was fit into a nano was by having the robot make assumptions about half of the wavesurfing. //Since we aren't using bearing at all, all we do is mark our position and the time the wave will pass us. wave w=new wave(); w.x=getX(); w.y=getY(); w.endTime=(int)(getTime()+e.getDistance()/ASSUMED_SPEED); waves.add(w); } move(); for(int i=0;i<waves.size();i++){ wave w=(wave)waves.get(i); Graphics2D g=getGraphics(); g.setColor(Color.blue); int ex=(int)(getX()+e.getDistance()*Math.sin(e.getBearingRadians()+getHeadingRadians())); int ey=(int)(getY()+e.getDistance()*Math.cos(e.getBearingRadians()+getHeadingRadians())); g.drawOval((int)(ex-ASSUMED_SPEED*(getTime()-w.endTime)),(int)(ey-ASSUMED_SPEED*(getTime()-w.endTime)),(int)(2*ASSUMED_SPEED*(getTime()-w.endTime)),(int)(2*ASSUMED_SPEED*(getTime()-w.endTime))); } //Gun from duelist nano, smallest radar lock/gun available(AFAIK). setTurnGunLeftRadians(getGunTurnRemainingRadians()); setFire(BULLET_POWER); } //Reverse when we hit a wall. public void onHitWall(HitWallEvent e){ dir=-dir; } //Choose a new place to move to. public void onHitByBullet(HitByBulletEvent e){ GotoPoint=MAX_REACH*Math.random(); } //Cheaper to do this here. public void move(){ int closestWave=1000000; int graphNum=10000; Graphics2D g=getGraphics(); for(int i=0;i<waves.size();i++){ wave w=(wave)waves.get(i); //Find our closest wave, that's the only one we want to surf. if(w.endTime<closestWave&&getTime()<w.endTime){ setAhead(dir*(Point2D.distance(getX(),getY(),w.x,w.y)-GotoPoint)); graphNum=i; closestWave=w.endTime; } } if(graphNum!=10000){ wave GraphicsWave=(wave)waves.get(graphNum); g.setColor(Color.red); g.drawOval((int)(GraphicsWave.x-GotoPoint),(int)(GraphicsWave.y-GotoPoint),(int)GotoPoint*2,(int)GotoPoint*2); } } public class wave{ double x; double y; int endTime; public wave(){} } }
A bit about the voodoo in this, as nat says:
- Wave Tracking Voodoo-It does track waves. The thing is it tracks the waves using the wave's predicted hit time in lieu of normal methods.
- GF voodoo-You are very right that it does not use GF's. Calling that variable GF was more of a joke. As you can see I have changed it in this version. What it really does is create a danger area for each wave, with the size changing based on it getting hit.
- Surfing implementation-I think of this as more of a goto bot,as it tries to get to a certain spot on every wave.
- Waves drawn with the graphics-I think those could reasonably be called (buggy)waves. It draws them without gathering any extra information besides the enemy's location/absolute bearing. You can really see what it's thinking a lot better with the graphics on.
- Assumed bulletspeed-I think that this is one of the big problems for this robot. You can see how it works a lot better if you try it against a robot like ahf.Acero.
An interesting note: Almost exactly the same APS in microrumble and nanorumble. I'd be very interested in hearing what everyone has to say about this (thanks nat)--CrazyBassoonist 16:18, 30 July 2009 (UTC)
It looks more like a random-distance bullet dodger that change the distance every time it is hit. And it try to get to the same distance for every bullet. Actually I have already got the code from the RR.com. I can squeeze it for 9 bytes more. This is 239 bytes:
package oog.nano; import robocode.AdvancedRobot; import robocode.HitByBulletEvent; import robocode.HitWallEvent; import robocode.ScannedRobotEvent; import java.awt.geom.Point2D; import java.util.ArrayList; /* * SavantWS- By CrazyBassoonist.Version 0.1- Initial release. Still awaiting * judgement on whether I can trulycall this *drumroll*... The first true * wavesurfing nanobot! */ public class SaventWS extends AdvancedRobot { final static double BULLET_POWER = 2.5; final static int MOVE_UNIT = 20; final static int ASSUMED_SPEED = 14; final static int MAX_GF_REACH = 300; static double GF; static int dir; static double enemyEnergy; static ArrayList<SaventWS.wave> waves; public void run() { dir = MOVE_UNIT; waves = new ArrayList<SaventWS.wave>(); turnGunRightRadians(Double.POSITIVE_INFINITY); } public void onScannedRobot(ScannedRobotEvent e) { wave w; int et,i,closestWave = 1000000; setTurnRightRadians(Math.cos(e.getBearingRadians())); if (enemyEnergy > (enemyEnergy = e.getEnergy())) { // The only way this was fit into a nano was by having the robot // make assumptions about half of the wavesurfing. // Since we aren't using bearing at all, all we do is mark our // position and the time the wave will pass us. waves.add(w = new wave()); w.x = getX(); w.y = getY(); w.endTime = (int) (getTime() + e.getDistance() / ASSUMED_SPEED); } for (i = 0; i < waves.size(); i++) { w = waves.get(i); // Find our closest wave, that's the only one we want to surf. if ((et = w.endTime) < closestWave && getTime() < et) { // If we haven't reached the GF we want to be at, move there. if (Point2D.distance(getX(), getY(), w.x, w.y) < GF) { setAhead(dir); } closestWave = et; } } // Gun from duelist nano, smallest radar lock/gun available (AFAIK). setTurnGunLeftRadians(getGunTurnRemainingRadians()); setFire(BULLET_POWER); } // Reverse when we hit a wall. public void onHitWall(HitWallEvent e) { dir = -dir; } // Choose a new GF to move to. This isn't really a GF, but it approximates // it. public void onHitByBullet(HitByBulletEvent e) { GF = MAX_GF_REACH * Math.random(); } static class wave { double x; double y; int endTime; } }
I haven't test it yet, but I think it can work just like the one you uploaded. And I think it has enough room for simple random gun to put in. » Nat | Talk » 17:02, 30 July 2009 (UTC)
Hm... maybe it's just me, but I'm not sure the idea of a wave surfing nano is such a good idea. Perhaps Nat touched on it when he said that it did about as well in micro as in nano land. Basically, my interpretation of wavesurfing is that it dodges guessfactors. It works best against GuessFactor Targeting, but most of the bots in Nano-land (at least the top ones) use symbolic pattern matching. And, it seems like always going to the same place on a wave will make it really easy to be hit with a pattern matcher. In micro, there are more GF targeters, which might be one reason that it's doing just as well ;) So perhaps it would be better to keep this as a micro, and maybe develop the gun a bit. Of course, i'm still a bit new to robocode, so i might be giving bad advice. And thanks, your bot was responsible for helping Kitten to 14th place :D Spinnercat 17:47, 30 July 2009 (UTC)
@Spinnercat: Glad to help. And by the way, you are completely right. A nano wavesurfing implementation will probably never be strong at all, because it uses a ton of code(if you look at the code, my radar/gun are combined into 2 lines total) and it could never fit in the things that make wavesurfing strong. I'm trying to make a wavesurfing nano just to see if it can be done. You're also right about it being a lot more effective in micro land, I'm actually working on a SavantMicroWS with wavesurfing right now.
@Nat:I'm not really sure what you mean by bullet dodger, but I tend to think of a robot that moves a certain distance when the other robot fires. It's true that this robot's movement looks alot like it is doing that, but if you use the graphics version you can see what it is really doing--CrazyBassoonist 18:03, 30 July 2009 (UTC)
I'd certainly say this counts as a wave surfer. Not a strong one, nor a learning one, but it does appear to surf the waves in a limited capacity. A highly-imprecise flattener-only surfer is still a surfer, and that's what this is I'd say. By the way, your "Wave Tracking Voodoo" is nearly exactly the same as something I once had done myself to make a very small codesize bot to dodge pattern matching, it seemed to be kind of broken and I couldn't quite get it into nano size, but I suppose it technically surfed too. I should probably polish it and release it as a micro some time... :) --Rednaxela 20:33, 30 July 2009 (UTC)
Interesting. SavantWS could probably be changed into an extremely buggy version of that and still be a nano. All you would have to do would be to change the direction and location to move to randomly when a wave passes it instead of when it hits a wall or gets hit.--CrazyBassoonist 21:05, 30 July 2009 (UTC)
Hey, sure, I'll gladly share my thoughts. I only refrained before because I don't know much about AceSurf or SavantVS. Anyway, yes, I would certainly call this a Wave Surfer. The term "Wave Surfing" is kind of like "GuessFactor Targeting": it has a clear and simple meaning, but 90% of the time, things like Precise Prediction or Visit Count Stats come along with it, so people start to associate the term with all those other things, too. I can't really comment on whether it's the "first NanoBot Wave Surfer", though, just because I don't know much about AceSurf or SavantVS. You could always say something like, "it's arguably the first NanoBot Wave Surfer". =) Or just say that you think it is - no harm in that. Pretty cool, by the way! --Voidious 02:09, 31 July 2009 (UTC)
Thanks! If you look at the code, robots like SavantVS and AceSurf actually use no waves at all, so I think I'll call it the first if noone else has an objection:-)--CrazyBassoonist 02:46, 31 July 2009 (UTC)
Bad Results
For some reason, the new Acraepheus was doing well then started getting zeros. Is this the result of a bug with a different version of robocode, or bad results being uploaded?--CrazyBassoonist 22:01, 19 May 2009 (UTC)
By the way, I have 1.6.2--CrazyBassoonist 22:08, 19 May 2009 (UTC)
- The results I'm running show your bot doing fairly well. Perhaps it is a client issue or something. --Miked0801 22:41, 19 May 2009 (UTC)
You're right, thank you very much for drawing that to my attention. Does anyone know of any issues like this that occur in 1.5.4 but not in other versions?--CrazyBassoonist 22:50, 19 May 2009 (UTC)
Argh, not sure what the problem is, but killed my clients for now. I'll add you to my exclude list before I start 'em again until we figure it out. --Voidious 23:00, 19 May 2009 (UTC)
Thanks. By now I'm guessing that what I need to do is figure out what is making errors in 1.5.4 and fix it then re-upload those versions. --CrazyBassoonist 23:06, 19 May 2009 (UTC)
Sorry, I was on my way out the door before. Here's the error being hit in 1.5.4:
Acraepheus 2.2 (1): Throwable: java.lang.NoSuchMethodError: oog.Acraepheus.getGraphics()Ljava/awt/Graphics2D; java.lang.NoSuchMethodError: oog.Acraepheus.getGraphics()Ljava/awt/Graphics2D; at oog.Acraepheus.onScannedRobot(Acraepheus.java:75) at robocode.peer.robot.EventManager.onScannedRobot(Unknown Source) at robocode.peer.robot.EventManager.processEvents(Unknown Source) at robocode.peer.RobotPeer.tick(Unknown Source) at robocode.peer.RobotPeer.turnRadar(Unknown Source) at robocode._AdvancedRadiansRobot.turnRadarRightRadians(Unknown Source) at oog.Acraepheus.run(Acraepheus.java:71) at robocode.peer.RobotPeer.run(Unknown Source) at java.lang.Thread.run(Thread.java:619)
I don't mind updating my clients, but unfortunately, there's no guarantee someone else won't run 1.5.4 as long as it's still allowed...
--Voidious 23:52, 19 May 2009 (UTC)
- And I believe that error would happen in 1.6.0 too, I had the same problem once, since then I always get the Graphics2D object out of the onPaint method only. --zyx 01:03, 20 May 2009 (UTC)
Well it looks like it's just a problem with the debugging graphics. Line 75 is this:
Graphics 2D g=getGraphics();
Shouldn't hurt that much to remove it, I probably should have left the debugging graphics out anyway.--CrazyBassoonist 00:32, 20 May 2009 (UTC)
I've now got it fixed, thanks for the help. How long does it take the rumble to remove robots that have been removed from the participants list? Even some of my very old robots seem to be there still--CrazyBassoonist 01:08, 20 May 2009 (UTC)
It's not a static delay, as far as I know it's just that it only allows removals from Darkcanuck's clients. That's usually within a day or so, in my experience. No need to wait on posting your new versions, though, at least if you ask me. =) --Voidious 01:17, 20 May 2009 (UTC)
Thanks, I was more concerned about the old versions being gigantic problembots for others due to the zeros. Is it normal to see scores that you can't replicate in tests? I've tried my robot against barracuda 1.0 about 20 times by now, and the lowest score I've recorded so far has been 42%. How could it have ended up with 32% against it in the roborumble?--CrazyBassoonist 01:42, 20 May 2009 (UTC)
Nope, and I also get incredibly frustrated when I see battle results that I can't duplicate locally. But there can be a surprising amount of variance in Robocode battles. --Voidious 01:49, 20 May 2009 (UTC)
- Behold, the demon known as Standard Deviation - bane of all robocoders looking for consistant results :) --01:57, 20 May 2009 (UTC)
But wait a second.... I realize that that's within the realm of probability, but what about the 10% against pkkillers.PKassassin? I average around 50% on him in my own tests.... And acraepheus hasn't been doing too well against duelistMicro, but 3% is really pushing it=( Anyway, standard deviance or not, I must sleep now so I'll try to see what it is tomorrow--CrazyBassoonist 02:06, 20 May 2009 (UTC)
- In both cases, the other bot only has a couple hundred bullet damage (way cool we can see that on Darkcanuck's server), which leads me to believe your bot must have errored out somehow... --Voidious 02:10, 20 May 2009 (UTC)
Okay... I downloaded 1.6.1.4, and I'm not getting any errors so far--CrazyBassoonist 21:01, 20 May 2009 (UTC)
Changes checking
I'm curious, how can you answer things so fast? I actually checking the recent changes every 10 minutes. But when I'm working, I may left it for hours without checking. Are you using RSS/Atom client which refresh every minute? » Nat | Talk » 13:51, 27 May 2009 (UTC)
Theres no secret to it, Its just that I often find myself checking the wiki while developing robots. There's not much to do when waiting for a thousand round melee battle to finish--CrazyBassoonist 13:55, 27 May 2009 (UTC)