[Home]Jekyl/OldDiscussion

Robo Home | Jekyl | Changes | Preferences | AllPages

Give a non-nano gun a shot, the nano PatternMatching is far from the most reliable solution on larger scales. -- Kuuran

Thanks for the advice Kuuran. I am actually working on two things right now. Improving my movement and a better gun. I have noticed on the EternalRumble that I am getting slaughtered on the damage ratio. These two tweaks will hopefully tilt that balance in my favor. -- Sparafucil3

Random mumbling:

Jekyl uses a pretty simple concept to drive around the field in one-on-one: Try and stay perpendicular to the enemy and try and stay at a predefined distance. In practice this proved to be a bit more difficult than I originally thought. All it took to point this out was a little witch named Aurora. When pitted against this devil in Pink, Jekyl was reduced to one of two states: oscilation against the wall or cornered. Once there Aurora chopped Jekyl to pieces. I was stumped by this at first until I had a conversation with kawigi. While not speaking about this problem directly, something he said struck a one of my memory cells. My predefined distance was was the culprit. The heart of Jekyl's movement system is this line:

        bearing = normalRelativeAngle(Math.toDegrees((e.getBearing() + PI/2 - 0.5236 * direction * 
            (e.getDistance() > DESIRED_DISTANCE ? FORWARD : REVERSE))));

In a nut shell, if Jekyl is at a less than desired distance, turn away, if Jekyl is at a greater than desired distance, turn toward. What happens if you are agressively stalked? You end up pinned. I replaced the constant DESIRED_DISTANCE with a method to better determine what the optimal distance was, based upon who is closer to a wall, the center, each other, etc and the result was that Jekyl does not get pinned nearly as easily or often. There are still situations in which he gets pinned, usually against the bottom wall (must be a bug in there) but when Jekyl does get pinned it now escapes (admitedly some times quicker than others).

In the end, I have to say that I am happy with my movement for now. Admitedly, I am testing it against other bots in the same neighborhood as I am on the eternal rumble, but they are my competition for now. This will not make me a top 10 bot but hopefully this new version (Jekyl 0.35) will start to climb the ladder again.


Congratulations on entering top-40! A major jump those 45 positions. You've got your bot into Outpost Pro Division as well. A major achievment in such a short time. -- PEZ

I know everything about getting pinned. Especially in the corners. I had this strange feeling that I was the only one with this problem since all my posts on the issue has passed unanswered and noone else seems to have posted questions like that. The way I have solved it in most of my bots is to have a function I call isCornered() which tells me if my bot is inside one of the corner squares of about 100x100 pixels. If so I tell my robot to try lessen the distance it has to its opponent. Otherwise follow whatever strategy it might have had for distance management. This seems to work, so I'll probably stick to that solution until I come up with something better. -- PEZ

Coincidentially, PEZ (I don't know if you noticed), That's what GouldingiHT does. And if he gets backed up against a wall (I'm sure the code I put in for that is ALMOST readable), he stays at the same distance. -- Kawigi

Thanks for the words of encouragement. It has been a lot of fun so far. It seems as if we all have come to the same conclusion for staying off the walls. On one hand that is very encouraging. On the other hand, none of us has managed to unseat SandboxDT yet so we all may be barking up the wrong tree. For anyone else following along, this jump is a result of fixing some bugs in Jekyl's movement. I can not stress enough that movement is what makes a bot successful. There was no other change made between 0.34 and 0.35.1. -- Sparafucil3

There's always the question if it's movement or targeting that's most important. I tend to think like you that movement is the most important and it might be. SandboxDT for sure has the best movement of all bots while I think some of the top-10 bots might have equal or better targeting. But there are more factors in here. I think SandboxDT makes the best use of the statistics it gathers. Both in the long and short term. Too many of the competing coders are concentrating on minibots. Paul Evans uses the mega bot bytes too good for minibots to stand a real chance. -- PEZ


I have started to look at SandboxMini (I am looking for any insights possible to take on DT). There is this line of code in it that I do not quite understand:

LinearShootAngle? = Math.asin(e.getVelocity()/11.0 * Math.sin(e.getHeadingRadians()-targetBearingAbs?));

If I am at point A, the target is at point B moving right to left. I shoot at a predicted Intercept point C forming a right triangle. The Line AB is is the hypotenuse, the line AC is the adjacent, the line BC is the opposite. Angle C is the right angle. The second half of the equation above figures out the angle B. From this angle we can figure out the distance of side AC. The first half of the equation is what puzzles me. Angle A can be found by atan(BC/AC). BC = (target Velocity * time to impact). AC = (Bullet Velocity * time to impact). As the time to impact cancles out the Angle A is equal to (Target Velocity/Bullet? Velocity). The part that I do not understand is why take the side AC (Thats essentially what the second part of the equation returns) and multiply that by the angle A and then take the asin of all that? The effect is to return the largest possible movement for a target, and thus shoot angle. But I just do not understand what geometry rule is being used here. Can some one explain it? Please??? -- Sparafucil3

Paul Evans answered this question for me. I am waiting for his permission to post the answer here. The long and short of it is this is not a right triangle and it is using the Law of Sin. It is actually quite clever. -- jim

Big congrats for entering top-20 with your bot. I remember in one of your first e-mails that even though you had aboud just downloaded Robocode you were determined to make a bot that would show up high in the rankings. I immediately thought the determination alone would make you succeed. I also know that you will keep climbing the rankings and that you are becoming one of the larger threats to Marshmallow. -- PEZ

So, does anyone have any advice on how to break a pattern matchers aim? -- Jim

Well to do this, most people pattern match themselves then try and avoid the point predicted by their own pattern matcher. I tried this but ended up with a big spike according to StatistRobot -- Brainfade

Rozu took a good approach to this, as well (That's what GlowBlowAPM is, so apparently it can fit, with a pattern matcher, into a MiniBot). He just went along his usual movement (which was reasonably flat I assume), and whenever he detected his movement was going to be hit by his own pattern-matcher, he'd pick a different vector to travel. -- Kawigi

By the way, for those of you who don't know Jim so well, the "Pattern-matcher" he's trying to beat is Aspid, and he probably won't release another version until he can do it (and probably still beat FloodMini). -- Kawigi

Hey! Jekyl has passed Marshmallow in the RoboRumble/CurrentRankings! That's not allowed. You are supposed to stay behind my best bots a while more Jim. =) -- PEZ

Sorry PEZ, I have bigger fish to fry ;) In all seriousness I thank you for your help getting me this far. I still can not quite toast Marshmallow head - to - head though so it is a pyrrhic vicotry at this point. I think I am finally satisified with my guns performance. Once again it is back to the stinking MovementLaboratory. Oh how I hate that vile place. -- jim

Actually, Jekyl's gun must be pretty good, because its movement is not quite best in breed. You probably already know this, but here goes anyway... According to GloomyDark's stats you seem to visit GuessFactor 0.0 (+/- 0.1) very much, making you vulnerable for HeadOnTargeting and stat guns. That's probably why Marshmallow still learns your movement quite fast (since it has a head-on gun in it's VirtualGuns array). The problem seems to worsen with increasing distance, which implies you should variate some move factor you might have there with distance. (Well, probably you already do that, but not enough.) It seems you have the same profile regardless of bullet power, which is good, since it's hard to achieve that. Also, you should graph against a bot that doesn't refuse to shoot full lead linear aim (GF +/- 1.0). You don't have that problem yet, but if you graph against the wrong bot you can fall into the same trap as the first Tityus releases. I.e. having a nice flat-as-a-pancake profile with an invisible yet huge' spike at GF 1.0. I can send you a modified FloodGrapher that will work on GloomyDark's data files if you like. GD fires at the full spectrum from GF -1.0 to +1.0. It also only fires Waves when it actually fires real bullets so you won't risk looking at the wrong profile. Hey, I'll upload the grapher somewhere and you can use it if you like. It follows the trend of wiki-naming of lately and is called RoboGrapher. =) -- PEZ

PEZ, I will look at your grapher too. I have long suspected that I have a problem with some simple firing systems as some of the nano's seem to hit Jekyl quite easily. According to iiley's StatistRobot and kawigi's FloodGrapher I have a fairly flat movement system. FloodGrapher points out that my movement is towards a wall is really bad. I am almost certain that this also leads to my headon vulnerability. Especially at range. My dodging system could also be responsible. Your observations here are very valuable to me as they point out somethings that I had not thought about. Unfortunatley for Marshmallow, this will undoubtedly lead to a stronger Jekyl =^> -- jim

I don't think you spend enough time aproaching the walls for it to have that impact on the profile. The following is just a guess. I'm developing a Leach bot again which uses a kind of movement I have not heard of before. Since Jekyl is now one of my fav sparring partners I have seen Jekyl move a bit now. I think it looks like it moves too slowly too often. Increasing your speed might give you a broader profile. -- PEZ

PEZ, I have noticed in watching some battle with GloomyDark that at times he shoots these low powered very fast bullets. I am wondering what timing you use to shoot these. You only seem to do it when I am near a wall and thus I think very vulnerable to engagement. Maybe they can tell me when Gloomy thinks I am weakest. I am below Marshmallow now too. -- jim

Nah. Gloomy just fires random powered bullets, though favouring full power the most. And, as I said before, it doesn't seem like Jekyl's profile varies too much with bullet power. The graph on the RoboGrapher page, which isn't from a bot of yours, shows the profile with full power bullets. You have a great position really. Your movement is far from flat, yet you fight up therer with the best bots. I would say you might be on your way to top-3 if you can get an iiley-class movement. You could always try Cigaret movement, just to check where it would get you. -- PEZ

One last question about Gloomy's gun PEZ. How does it choose it's base angle? Does it use direct targeting + a guess factor (Target AbsBearing? + guess) or does it use some sort of lead angle + guess factor (ie. linear targeting + guess)? Jekyl uses abs bearing + guess factor right now. For a moving bot that never reverses I will never use a zero guess factor. If you are using linear targeting and hitting me at guess factor zero then your supposition about my speed is most likely dead on. -- jim

Here's the relevant code:

setTurnGunRightRadians(Utils.normalRelativeAngle(
            enemyAbsoluteBearing + maxEnemyBearing * sign(deltaBearing) * mostVisitedFactor() - getGunHeadingRadians()));
I guess that means I'm using direct targeting + guess factor? -- PEZ

Yep, that looks like direct targeting + guess factor. So too much zero means a reverse frequency that is too small. I have one that is very good out to Gloomy's range "c", but not so good after that. Anyone have any idea how to vary the reverse frequency, linearly as a function of the range to target? -- jim

A reverse frequency that is too high you mean, right? How about

reverseFactor = MAGIC_NUMBER + distance / 2000
or something along those lines. -- PEZ

How about we skip the semantics of frequency and call it a reverse frequency that is too frequent. :-p -- Kawigi

PEZ, Gloomy's page says that it's 5 distance buckets vary based on field size. If it would not be giving away too much could you please let me know what those are for a standard 800 X 600 field? I see some segments where I have a great movement according to Gloomy (especially segment c) but I can not tell where it is. That makes it even harder to figure out what I am doing right. -- jim

No problem:

int distanceSegment(double distance, int segments) {
    return Math.min((int)(distance / (getBattleFieldWidth() / segments)), segments - 1);
}
-- PEZ

This is a really strong bot! Good work Jim. Do you have an estimate as to where it will rank? (It will take quite a few days before we know.) -- PEZ

Thanks PEZ! Two solid days in the movement laboratory resulted in this. I think I am now very close to PoisonMovement?. I have one factor that I can now tweak to move my movement peak to any factor from 0 to +1. As for results, in a focused division with the top 35 bots of the RoboRumble (also known as my training division :)) it consistently placed 6th - 8th. One thing I noticed and wanted to say on that though is I have never trusted focused divisions. As you have found with VertiLeach they are just not very reliable. In my training division SandboxDT finished 4th-6th on average. I think that some bots, which are problematic for Jekyl, get elevated rankings and some bots, which I seem to handle well, get depressed. All performances are rated relative to Jekyl and not all other bots. I also think thats the source of your confusion with VertiLeach. Never trust a focused division. If you want to truly know where you rank, you need to run all the battles. jim

First thing first:

Need I say I'm envious? Yes, it's only one 100 rounds battle, but I have no chance to get that kind of results with any of my bots even if I run 1000 battles. Jekyl is much more problematic for the development version of GloomyDark than DT. I'm very curious as to where this Jekyl will rank!

As to your observations on using focused enemies in divsions. I've been using focused enemy divisions for as long as I've been into Robocode, I found your observations out long time ago. It's not the source of the confusion with VertiLeach's ranking. The fact is that VertiLeach beats all minibots. Using 10+ seasons of VertiLeach vs all-other-minis it's easy to see if you accumulate all scores and calculate %score ratios for all bots. And I also think these facts serve to point in the same direction: http:/robocode/uploads/pez/VL0.2.1-RatingDetails.html don't you? -- PEZ

WOW! I have never seen that result vs. SandboxDT. I doubt that will continue to be the norm but heres hoping. As far as rankings go, I just build robots. I am happy to help with backend, CPU cycles, what ever is needed to support the community. I will leave the rankings discussions to those who understand them. I simply do not understand them and have never felt the need to look. I trust you guys to get them right =^> -- jim

=) Welcome to the club of people that don't understand the inner workings of the ranking systems. But I have this strong opinion that even if the ranking system is brain surgery /rocket science stuff the rankings themselves should be intuitive. A bot that beats all other bots should rank #1 in my book. Simple as that. And may Jekyl reach #1 in the 1v1 rankings soon! Do you feel your heart beat hard thinking thoughts like that? -- PEZ

I have never once thought Jekyl to be a candidate for #1. I still don't. I was very suprised to see a result that showed me beating SandboxDT. I am sure once it has saved data it is more than able to beat Jekyl down. Maybe, like always, the next release will be. If it does rise in the standings it is all your fault for pointing out above that Jekyl's movement was weak according to Gloomy. =^> I have also been researching a new sieve for my targeting statistics that I am very hopeful will be an improvement. I first had to find a math wizard to help me understand the Math and convert it into code that I could grasp. Now I need to implement it. More to follow if I am successful. -- jim

Please blame me for this impovement, as long as you damn yourself. =) Seriously it would make me very happy if RoboGrapher made a difference. Please post a graph on the new Jekyl on the RoboGrapher page so that people can appreciate the differences in the curve. (My development RoboGrapher draws really strange curves at the moment...). You don't think Jekyl 0.55 is #1 material? What about #2 then? And once you've tuned the movement a little more and, god forbid, improved that gun who knows what'll happen. This Jekyl might be our Neo. How small do you think you can make your movement? I'd like to blend it with VertiLeach's gun (adapted of course to segment on distance again) and see what happens. Maybe Graphin? can finally take to the air then soon. =) ABout DT catching up on Jekyl in combat. It probably won't happen in the RR@H, since it's very unlikely the two will meet on the same client twice within any close time frame. I've run a series of 35 round battles between the two with a reset of the robotcache between each battle to simulate and Jekyl cleary is the winner. Go Jekyl! -- PEZ

My test with several 35 round battles with resets of the datafiles was a bit unscientific. I ran it again with RoboLeague this time though with manual cleaning of the data files. The first 14 seasons is with Jekyl's bundled data and DT clean (as will most often be the case in RR@H). The last 6 seasons where run with both bots having no data. (It was a mistake, but serves to indicate that DT is still the stronger bot if both start from scratch.) Look here: http:/robocode/uploads/pez/JvsDT/history.html -- PEZ

I knew Jekyl right now is not top dog material. My goal has always been to make top 10 first and then shoot for SandboxDT. I usually pick a group of bots that are in the neighborhood of where I want to be and use them as my test group. I have never even tested vs. DT other than to include it in my training league so as to not be completely embarrassed. In my local testing with RoboLeague these bots beat Jekyl regularly:

pe.SandboxDT 2.11 
cx.BlestPain 1.20 
wiki.mini.Sedan 1.0 
cx.CigaretBH 1.03 
cx.test.CigaretST 
pe.SandboxLump 1.52 
pez.mini.VertiLeach
There are others than are pretty even with it. I am sure there are others that should be on both lists (see the results from MCool on Jekyl_0.55 results page). As always, maybe next release =^> -- jim

But since Jekyl comes preloaded with stats on those enemies it will still give them a fight. VertiLeach, for instance, needs at least one 35 round battle stored on Jekyl 0.55 before it starts beating it. I predict a top-5 rank for this Jekyl. MCool was just lucky. -- PEZ

I have run a few RR@H rounds with Jekyl as focused competitor now. It seems I should leave predictions to rozu. -- PEZ


October 25 2003 - I think we have a strong Jekyl to look forward to. Adding a strong gun to that movement and in a bot with all other strategies in place should make a killer bot! Never mind VertiLeach, I think it's just an effect of Verti being strong at predicting you near-wall movement. If you can afford it, add that segmentation to Jekyl and you should be able to beat Verti, and probably get stronger against many wall bouncers. -- PEZ

I'm just running season 4 or the LongThinLeague and you are getting NullPointerExceptions?. It looks like they are in your onBulletHit? method. It's happening quite a lot, so you may not do very well in this season. -- Tango

I know the problem. Can I send you the fix directly or do you want an upload to the repository? I would like to hold off on the upload as I already have all the clients running Jekyl battles. -- jim

I haven't aborted the season, so you'll just have to hope this version will work well enough to keep you in. I probably won't run the next one until tomorrow, so unless you want to wait longer than that to upload, you don't need to email me. If you don't lose this season, and you don't want to upload, feel free to email: thomas AT vcarter DOT freeserve DOT co DOT uk -- Tango


Congratulations on Jekyl .62! 4th place! -- Vuen

Yes, nice bot that 0.62! (btw no idea how you guys like the outcome of this learning experiment... maybe prelearned data should be banned?) -- Frakir

Way to go with the Jekyl / Hyde misters! Of course prelearned data should not be banned. It's part of Robocode's design that it packs training data into the bot jars. And it adds dimensions to RR@H strategies that are quiet interesting to explore. Can't fit data on 200+ enemies? Tough luck, maybe if you sacrifice something else you can. =) -- PEZ

Eh, in 200kB? Can fit 400+ opponents easy... I am _old_ school :) --Frakir

I wasn't addressing you in particular. =) 400+! That's impressive. What's old school about it? -- PEZ

Something like "don't waste disk/memory for useless data" ? Actually I have no idea how my method of saving 'best offsets only' compares to full save -- Frakir

Great work with Jeckl/Hyde?. Packaged data made a much bigger difference than I expected! I got no problems with it, I like handicaps ;) -- ABC

Thanks everyone. I was targeting the position between Lacrimas and BlestPain with this release. I released MrHyde as a sort of test to see what might be keeping me from releasing a data free robot. I think that there are a couple of things to be learned from this experiment.

If no one seems to be too upset about it I am going to leave MrHyde around for a bit to see if he starts to trend towards Jekyl's postion. Given enough rounds he should eventually get to the point where he and Jekyl are at the same point in the ladder. If anyone starts to get too upset let me know and I can remove it. If you feel really strongly go ahead and remove it yourself and let me that too. =^> -- jim

I find it really interesting to compare http://rumble.robowiki.dyndns.org/servlet/RatingDetails?game=roborumble&name=jekl.Jekyl%20.62 and http://rumble.robowiki.dyndns.org/servlet/RatingDetails?game=roborumble&name=jekl.MrHyde%20.62 Looks like for some bots learning don't help at all (eg HypoLeach in your case) while for others it boosts a lot... most top bots after 2-3 rounds seem to be unaffected though. -- Frakir

I have noticed this too. There are a couple of reasons why this is. Bots that usually present problems for statisticians are the ones that change aspects frequently. All this change means that the information stored in a Wave gets placed into more buckets. This increases learning time and makes it especially hard to react with a slow learning gun like Jekyl's. The other problem bot is one which changes movement methods ala PrairieWolf. All your past learning can be thown to the four winds when they change to different movement mode. As most top bots try to control their distance and aspect to you, interestingly enough, you can focus your learning into the segments that the fight mostly takes place in. As a result you learn much faster. The way to address the weakness I have hilighted is to have a gun that is much faster at learning, in addition to your regular slow learner, and then some sort of VirtualGuns system to chose between them. I am pretty sure that there may need to be a strategy change as well but I have yet to do any really extensive exploration on the subject. I have however refactored Jekyl this release with this in mind.

As for the Leaches, they just happen to take advantage of a weakness that exists in Jekyl's movement. Based on VertiLeach's position in particular, I would say that this is a weakness that exists in a lot of bots. For Jekyl, he assumes that at 300 pixels you want to get away from him as bad as he wants to get away from you. Jekyl wants to fight it out at around 600 pixels or so. The problem with the Leaches is that they *want* to stay at 300. At that range Jekyl reverses far too frequently and becomes very vulnerable to head on targeting or a half decent stat gun. Unfortunately for Jekyl, the Leaches have a very good stat gun and he is pretty much chopped up as punishment. I have a fix for this on the drawing board as well but like I said, I did not want to concentrate on the Leaches this time. Now however, I would like to put PEZ on notice that he may want to purchase some life insurance policies for his bots. The Leaches must die. =^> -- jim

Cool. That's why they are born! =) And you seem to highlight the spelling error in their names... -- PEZ


Robo Home | Jekyl | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited December 9, 2003 22:04 EST by Sparafucil3 (diff)
Search: