Archived talk:Aristocles 20090501
- Aristocles Sub-pages:
- Aristocles - Version History - RRGC - Archived Talk 20090501
|
Hmmm, this bot is actually doing better against Raiko than Tityus is in my tests. Is this the next movement for T or is it just because Raiko does worse the worse an opponent is? :-) - Jamougha
It might be the next movement for T, if I can manage to tune it enough and find out what's wrong with it. The reason Raiko might have problems with it is that it tries to give few near-wall hints and I also took your suggestion to change velocity a bit arbritrary to leave less velocity segmentation hints behind me. But something is definately wrong with the movement so it gets completely trashed against certain enemy movement. -- PEZ
Aaargh, you beat me to it again. :-) Maybe I'll do the first MusashiTrick'ed nanobot instead, that should be a challenge. - Jamougha
I guess so. You probably will have some time to do that because I get way to frustrated when I try to code a nano. This Aristocles experiment shows the importance of trade-offs. Switching from a GuessFactorTargeting gun (even if it was simple and unsegmented) to RandomTargeting means Aristocles doesn't beat ad.Bottom too easily. But it gains more MicroBot rating points by exploiting head-on targeting weakness than it loses using a stupid targeting method. 25 points or so. Which means I have finally managed to write a top-10 micro! -- PEZ
You might want to consider using random linear targeting instead of flat out random targeting, it's nice to hit stationary bots now and then. -- Kuuran
Nice indeed. =) I'll figure out something. Thanks! -- PEZ
You're being trashed by the MusashiTrick in 0.2.6 - looks like you're always firing slightly behind the correct guess factor. The culprit seems to be your conversion of guess factors to angles and vica versa. e.g. to find the guess factor from the angle you use
(int)Math.round( ((Utils.normalRelativeAngle(absoluteBearing(wave.wGunLocation, enemyLocation) - wave.wBearing)) / maxEscapeAngle(wave.wBulletPower)) + AIM_FACTORS / 2)
which has a max value of 1 + AIM_FACTORS/2 as far as I can tell, so you probably have only 3 working guess factors. Also it doesn't take into account the opponent's bearing direction. Correct would probably be
(int)Math.round( ((Utils.normalRelativeAngle(((AIM_FACTORS-1)/2*absoluteBearing(wave.wGunLocation, enemyLocation) - wave.wBearing)) /wave.wBearingDirection) + (AIM_FACTORS-1)/2)
and to find the angle again use
bearingDirection * (mostVisited - (AIM_FACTORS-1) / 2)/(AIM_FACTORS - 1)/2
Try that and see if it works better. -- Jamougha
Thanks! I beat you to it by a few seconds though- I have just done exactly that. I found TheArtOfWar among my problem bots and quickly got to work on the gun. =) While bug hunting I restructured some more and now I have 24 bytes to spare... Think I can fit an accel segmentation? -- PEZ
Cool :-) the problem bot list is one of the best tools there is... accel segment in 24 bytes, hmmmm... the smallest way I've found of doing it is something like (int)((1.066 + Math.abs(oldLatVelocity/latVelocity)) % 2.12) - not 100% accurate but close enough for a micro. ;-) I'm not sure that's less than 24, though, looks more like 27+? -- Jamougha
Yeah, maybe I can use LateralVelocity acceleration. I was trying with plain velocity acceleration but it quickly grew out of the 24 bytes. 27 bytes could work. Just need to find 3 bytes more. Shouldn't be too hard. Thanks! -- PEZ
Well, maybe next time. It was 28 bytes before I even started to use it to index the gun. =) -- PEZ
Ah well - just edited it to be slightly smaller - only needs one Math.abs. Might save 6-8 bytes? -- Jamougha
It might go. Though I have used some of the bytes for other stuff now... Post your shrinked version and I might sacrifice something else to get that segmentation added. I'm releasing 0.2.7 now, for better or for worse.... -- PEZ
I edited the version above, when I made the last post... :-) -- Jamougha
Right! But now you'll have to explain how it works. -- PEZ
Ahh, how it works? Did I say I know how it works? :p Well if oldLatVelocity == latVelocity then it reduces to (int)2.066, i.e. 2. .066 is a small fudge factor to allow that some bots (DT and Unnamed) change max velocity slightly to fool this sort of segmentation. If oldLatVelocity > latVelocity then the modulus wraps the value down to 0.x and the (int) casts it to 0. if oldLatVelocity < latVelocity then 1.x gets mapped to 1.
Of course this is total rubbish for small velocities, but the nice thing is that combined with a lateral velocity segment it tends to be consistent rubbish :-) i.e. the meaning of the segments swaps around but you end up with different values being in mostly different buckets. In my tests it performs to pretty much the same level as a 'real' lateral acceleration segment. -- Jamougha
Ok, one of your ProblemBots is Wolverine which would lead me to think that you didnt quite fix your targetting bug (i used to test my gun against wolverine before its crashing started to annoy me) and it has a huge spike just waiting to be hit. Either that or you move very predictably at close ranges. Just an observation... --Brainfade
Thanks again Jamougha. I think I understand some of it. =) Brain, I think that Wolverine finds two weaknesses in Aristocles. The first is one with the targeting. The way I figure out bearingDirection makes it bad to handle stop-and-go movement. I'll see if I can counter that. The other is, as you also guessed, my movement at close ranges. Wolvie likes close battles and I haven't found a good enough way to avoid it or to flatten my curve there. Thanks for alerting me to this. Maybe next version can challenge RaikoMicro for the micro crown. =)
- 2 in Micro!! I never, ever, never thought I would see one of my bots there. Way cooooool!
-- PEZ
Sometimes it might be a bit too effective though:
Fighting battle 7 ... pez.micro.Aristocles 0.2.7,tobe.mini.Charon 0.9 RESULT = pez.micro.Aristocles 0.2.7 wins 4405 to 0 Fighting battle 14 ... pez.micro.Aristocles 0.2.7,davidalves.net.DuelistNano 1.0 RESULT = pez.micro.Aristocles 0.2.7 wins 3754 to 0 Fighting battle 8 ... pez.micro.Aristocles 0.2.7,davidalves.net.DuelistMicroMkII 1.0 RESULT = pez.micro.Aristocles 0.2.7 wins 3502 to 0
-- PEZ
Now Wolverine shouldn't be on my ProblemBot list any longer. And the change shouldn't make things worse against any other bot. It will be interesting to see how many rating points this change collects. -- PEZ
Ooops! I must have broken something badly. Now Aristocles loses against all bots except Wolverine it seems... Gah! -- PEZ
Now then... 0.2.8.1 should have that bug fixed. Go Aristocles! -- PEZ
OK, so I gained 5 points in microrumble by making the gun remember the last bearingDirection when the enemy is stationary. In general rumble I actually lost a point. Both these changes are probably withing the margin of error. This is a bit depressing I must say... But good to know if you need the 20 bytes or so it costs to do the remembering. -- PEZ
in case you want 3 bytes back without using code-shrinking tricks, you could remove the call of Utils.normalRelativeAngle in this line:
double angle = Utils.normalRelativeAngle(absoluteBearing(robotLocation, robotDestination) - getHeadingRadians());
because angle is only used in trigonometric functions afterwards. -- rozu
Do I want 3 bytes back! Millions of thanks. -- PEZ
Now I have 4 bytes free. I would give my right arm to be able to fit the MusashiTrick! If someone sees a way I could do that without shrinking-tricks, letme know and I will be happier than few. -- PEZ
Now I have tried a while myself and I think it is quite impossible. There simply isn't any 15 bytes left to remove without resorting to obfuscating tricks. And I'm quite stubborn about certain principles. =) -- PEZ
How about this. change:
robotDestination = project(enemyLocation, enemyAbsoluteBearing + Math.PI + direction, enemyDistance * (1.2 - tries / 100.0)); //into robotDestination = project(enemyLocation, enemyAbsoluteBearing + direction, enemyDistance * (tries / 100.0 - 1.2));
would save you 4 bytes. just uses the fact that translation with PI will change the sign of both sin and cos. -- rozu
That would be considered a code-shrinking trick in my book. =) A very clever one. I'm sure other miniboters could benefit from it. So, don't hesitate to suggest those tricks I say. Maybe we can make a wiki-packaged bot where you shrinkers can cooperate in shrinking Aristocles down as far as you can. Then it can probably fit the MusashiTrick and more. Could become a pretty strong micro. -- PEZ
Ah ok, I also asked myself if this would be a code shrinking trick. in this case I thought it would more be a mathematical trick. no problem, Aristocles is strong enough anyway ;). It wouldn't be fun to just outperform the original version using code shrinking, so I don't know if a wiki version would be a good idea. -- rozu
Maybe not. About mathematical or shrinking trick... I don't like having to comment my code. In this case a comment about the mathematical trick would be needed I think. Of course there's a gray zone here. I certainly have some code in Aristocles that might need a comment maybe. But it's generally readable in my judgement. And, after all, it's my judgment that counts in my bots. =) -- PEZ
Interesting; you gained quite a few points in the RoboRumble by going survivalist, but lost some ground in the micro competition. I'm going to try something similar but more extreme in RM 1.3; looks pretty good in testing. -- Jamougha
Actually, I gained ground in the micro division too. 1847 in rating. Maybe you are looking at the rating of 0.3.0.1? It's less survivalistic than 0.3.0. (The only difference being that the former fires a bit weaker default bullets.) Which means I am going to use the default bullet power from 0.3.0 in my next release. The survivalistic features in RaikoMicro 1.2 are already more sofisticated than they are in Aristocles 0.3.0. It will be very interesing to see what you'll do in version 1.3! Can you give us a hint? -- PEZ
I can do a bit better, it's now released. :-) Would have done it last night, but the repository was down. -- Jamougha
Oh, catching the out of bounds in the wave - clever :-) I'll definitely copy that. You know, there guns are getting *really* close to nanobot sized, without the segmentation. -- Jamougha
=) If you do, please catch ArrayIndexOutOfBoundsException instead of just Exception as I did in my first try. It communicates better what a crazy thing we are doing. The funny thing with using exception handling there is that it costs zero bytes. Kinda cheap! =) -- PEZ
Wow... What did you change there!? :-) Congrats, I have some work to do I see... -- Jamougha
Thanks! Don't work too hard. I kinda like the current ranking tables. =) The changes are all about segmentation. To fit them I had to restructure some code to make it smaller. A while I had a 750 bytes bots that could beat Sedan and Quest quite comfortably and that gave Lacrimas a fight over 100 rounds. I was quite frustrated I can tell you. But Jim helped me remove 2 bytes just by throwing a glance at the code. I don't know if my accel segmentation is the one giving the extra edge, but it's a bit special I think. Have you looked at VertiLeach segmentation any? If you have you'll notice it uses ReducedDimensionalSegmentation. I decided to try it with the velocity dimension of Aristocles. It's much smaller than regular acceleration segmentation. Yet, in theory, it should provide the same or better granularity. Then of course it depends on implementation. I suspect I sometimes miss some acceleration situations with the current choice of velocity granularity. But it's a trade-off between speed of learning and granularity as always. -- PEZ
Correction. Comparing the LRP graphs of Aristocles 0.3.2 and 0.3.4 I think that what makes the real difference to the rating was my tweaking on head-on-fire-avoidance. It looks like I might not need the MusashiTrick after all. I hope it doesn't save you too many bytes! -- PEZ
i don't know if anyone else is having the problem but my RR client is simply refusing to downlaod Aristocles. i get the error:
Iteration number 72 Preparing battles list ... Using smart battles is true Preventing unknown thread Application Thread from access: (java.io.FilePermission .\pez.micro.Aristocles_0.3.4.jar read))
Is it a problem my end or yours?? -- Brainfade
The problem is not about downloading, but about calculating its codesize. It happens when you download a bot once Robocode has made a first iteration (the problem is caused by the RoboodeSecurityManager, but I don't know how to fix it). JUst stop your RR@H client and start it again. -- Albert
Since I know it will not last I must just notice that Aristocles 0.3.5 after 24 micro-battles is on #7 with a momentom of 903. I've never seen a crazy momentum like that. -- PEZ
Augh! My bot is being beaten by a microbot! What's going on?? -- nano
WOW!!! Aristocles is 11th overall. Ok, that solves it i'm really gonna have to put some time in to finish off my MegaBot. Pez, i really wish you and Jamougha would stop releasing these kick ass restricted size bots - they're putting the rest of us to shame... :) -- Brainfade
The blame is all Jamougha's. I had given up on micro development in general and GuessFactorTargeting in a micro in particluar when he started to raise the bar considerably. The glove had slapped my face and I just had to try accept the challenge. It's quite intersting though that even if it is a struggle with the last bytes all the time we can now pack amazingly much functionality into a micro. My first attempt at a GF gun in a micro ended up with an unsegmented one. Now it's 4-way segmented and with quite sofisticated EnergyManagement! Most of the cred must again go Jamougha's way. Because even if he does a few really ugly shrinking tricks here and there, he also has showed the way to much clearer, smaller and simpler ways to do things without losing much, if any, accuracy. -- PEZ
Despite thinking it's great that you don't use code shrinking tricks, I think you should consider using the tricks, as everyone you are competing against does. Imagine what you could do with the extra bytes! (Keep Aristocles without tricks, and make a new bot with the tricks, so you can still claim the moral high ground with one bot). -- Tango
You're forgetting I'm the DonQuijote of Robocode. =) Though if I would do a nano I would forget about my code clarity rules. There's not much code in a nano anyway so it's mostly readable even with those tricks. But I'm not doing nanos yet. I'm still surprised I'm doing minis even. And to see my bot at #1 in micro is surrelistic to say the least. ... And, I almost faint when I see Aristocles in general top-10! Robocoders that have been around since I started probably remember that I was quite determined never to do minis once. But it was because I thought it had to be obfuscated. Now I have proven myself wrong there. =) Thanks for the faith Tango. It warms my heart! I'm preparing myself for a serious attack at that mega throne. I'll need supporting words to really get started. -- PEZ
Well, if you can get to the top 10 with a micro, I don't see you having much trouble getting to at least the top 5 with a mega. Getting higher than 3rd might be a problem considering who's 2nd and 1st, but... -- Tango
Yeah, but if it was without problems it wouldn't be fun. =) -- PEZ
I'm sure you'll have enough problems beating Shadow and DT to keep you interested. -- Tango
I'm sure I don't have to beat Shadow and DT to reach my goal. -- PEZ
Depends on what your goal is really, doesn't it? Top 5 should be easy, and to get higher than that, you will need to be looking at beating the top bots. -- Tango
The goal is of course to get the #1 ranking. And I'm pretty sure you're wrong. But we might now in a month or so. -- PEZ
Ok Pez, don't know how applicable it is having never extensively read the Tityus code, but surely by plugging in the Energy Managment code from Aristocles into Tityus, you should be able to inflate Tityus's ranking. That of course assumes that tityus doesnt already have its own strategy... --Brainfade
Yeah, the sad story is that Tityus already does that enrgy management, and then some. But there are a few other lessons I've learnt during this micro race that can probably boost Tityus too. We'll see in a few hours. =) -- PEZ
Impressive the synthesis capacity of you two (you and Jamougha)! Aristocles & RaikoMicro are top 10! Apparently you take very serious the "less is better", ain't? The ultimate KISS bots indeed! Congrats! -- Axe
I think it can be summarized "competition is good". Thanks for those words Axe! -- PEZ
1st: pez.micro.Aristocles 0.3.6 8324 3000 600 4138 586 0 0 60 40 2nd: wiki.mini.Sedan 1.0 6809 2000 400 3959 450 0 0 40 60
=) -- PEZ
What about this?
1st: pez.micro.Aristocles 0.3.6 81158 23800 4760 46875 5721 1 0 477 524 2nd: pe.SandboxDT 1.61 77672 26200 5240 40912 5311 9 0 527 476
-- PEZ
Doesn't it have to be 749 in codesize to be a micro? -- nano
Yeah, and it is. I just got it wrong when editing this page. =) -- PEZ
you do have musashi trick,or somthing that does the same thing anyway. but your's is really short.--andrew
- Yeah, something that does some of the same thing, but with some trade-offs. Aristocles can't really see if it's hit at GF1 or not so it just diregards hits while it is WallSmoothing hard. Much smaller in codesize though and I don't have one single byte free in this bot... -- PEZ
can you tell me what the gun bug was? i have a big gun bug myself but don't know what it is--andrew
I'm not sure which bug you are referring to. But I have had tons of them. The one you could start checking for is the one Jamougha found in Tityus. I wasn't using the same bullet power for the wave as I was actually firing with. I have had this bug several times. It's easy to be overly clever with this I guess. -- PEZ
February 23 2004 - 0.3.7 released Added time-since-deccelaration segmentation Fixed a quite large bug in the gun
that bug
I honestly don't remember. But the gun performed quite well with the bug so it probably isn't the same kind of bug as you are looking for. -- PEZ
there seems to be a radar bug which makes aristocles stop moving completly for a round.--andrew
PEZ, i use Aristocles as one of the bots in my testbed (maybe not a smart choice with your rapid improvements in its performance, but it's fast and furious ;-) ). I noticed that v0.3.5 has a much flatter movement than 0.3.7. Did you change the movement aswel? B.t.w., 0.3.7's less flat movement isn't a handicap as it now is even more difficult to hit. --Loki
Interesting that you should notice this! 0.3.5 movement was developed using heavy graphing. It was a lengthy and boring process. With 0.3.7 I took a different approach. I used DT instead. No grapher at all. I decided that tweaking movement to lower DT's hit rate was more fun and possibly more effective than tweaking for a flat profile. And, as you have noticed, this was a winning strategy. I think it is being used by ABC as well, also to great success. -- PEZ
Yes, I use DT for movement optimising. I also use the graphers, but the final test is always a 1000 round test against DT. Imo, a flat profile means you are using the full spectrum of possible guessFactors uniformly, but does not necessarily imply that your movement is unpredictable. It would probably be possible to make a very flat movement that is fodder for a PM gun, and I believe DT's gun would also eventually get you. -- ABC
Well, that differs some from the 0.3.7 movement tweaking process then. Where I used DT all the time and then when it was ready I checked the graph out of curiousity only. -- PEZ
That is exactly what I did with Shadow 2.47. I used the graphers heavily when I was fine-tuning my flattener. Now I am mostly trying to tweak the (more subjective) predictability of the process. -- ABC
Strongest overall micro high score!!!!! Funny for a bot that ends up almost last in Melee =).
- http://robocode.yajags.com/20040320/ - (RLL micro 1v1 division high score: 613.80, overall high score: 272.57)
-- PEZ
Well, FhqwhgadsMicro still holds the record for worst melee bot, you're not quite there... and Shiz wasn't exactly going to be first after you delt it two consecutive shut-outs :-p -- Kawigi
Ah. Didn't check the details very closely. Also explains the 1v1 score I guess. =) -- PEZ
Just checked out the TargetingChallenge/Results and saw Aristocles scoring with 91.76 points. Seems to me really incredible. how do you segment your GFGun ( i guess Aristocles uses GuessFactorTargeting ) ??? --deathcon
It's OpenSource, just look. Yeah, it can be a bit hard to read maybe, some clarity is sacrificed on the altar of micro-sizing. =) Here's the line with the clue:
static int[][][][][] aimFactors = new int[DISTANCE_INDEXES][VELOCITY_INDEXES][LAST_VELOCITY_INDEXES][DECCEL_TIME_INDEXES][WALL_INDEXES][AIM_FACTORS];
The INDEXES-constants are 5, 5, 5, 6 and 2 respectively. The deccel time segmentation is time-since-last-decceleration and the wall segmentation is about running against a wall or not.
-- PEZ
Pez, how exactly do you increment the hits in Aristocles when your test() method returns true in your Wave class? -- Nantuko_Primus
If I'm not mistaken, his test() method never returns true. The increment happens in the if statement before removing the wave as a condition. -- Kawigi
Exactly. I increment the visit counter from inside the test() method. That way I am guaranteed the increment has happened when any event handler is called. -- PEZ
How about this face for this bot? Is was using Google to search for Aristocles (of Messene, the philosopher) and found the link to this page as the 3rd hit out of 2,170!!! I am still interested in Robocode, but expected some other info... --Loki
Cool. =) Aristocles is named from that Plato of Messene actually. -- PEZ
Eh can i have the wall smothing part of the bot please ^o^ - DaFishy
- [View source↑]
- [History↑]
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.