*refactor the segmentation tree to allow easier experiments with new segments and speed it up *improve close combat
Congratulations on going over 2000! At first I thought you had made amazing progress but then I looked closer at your code. This robot is largely based on CassiusClay, compare the following code:
From CassiusClay:
static final double[] DISTANCE_SLICES = { 150, 300, 450, 600 }; static final double[] DISTANCE_SLICES_FASTER = { 300, 500 }; static final double[] VELOCITY_SLICES = { 1, 3, 5, 7 }; static final double[] VELOCITY_SLICES_FASTER = { 2, 4, 6 }; static final double[] WALL_SLICES = { 0.15, 0.35, 0.55, 0.75 }; static final double[] WALL_SLICES_FASTER = { 0.25, 0.5, 0.75 }; static final double[] WALL_SLICES_REVERSE = { 0.35, 0.7 }; static final double[] TIMER_SLICES = { 0.1, 0.3, 0.7, 1.2 }; static final double[] TIMER_SLICES_FASTER = { 0.1, 0.3, 0.7 };
From Toad (decompiled):
private static final double DISTANCE_SLICES_FAST[] = { 300D, 500D }; private static final double VELOCITY_SLICES_FAST[] = { 2D, 4D, 6D }; private static final double WALL_SLICES_FAST[] = { 0.25D, 0.5D, 0.75D }; private static final double TIME_SLICES_FAST[] = { 0.10000000000000001D, 0.29999999999999999D, 0.69999999999999996D }; private static final double DISTANCE_SLICES[] = { 150D, 300D, 450D, 600D }; private static final double VELOCITY_SLICES[] = { 1.0D, 3D, 5D, 7D }; private static final double WALL_SLICES[] = { 0.14999999999999999D, 0.34999999999999998D, 0.55000000000000004D, 0.75D }; private static final double TIME_SLICES[] = { 0.10000000000000001D, 0.29999999999999999D, 0.69999999999999996D, 1.2D }; private static final double ACCEL_SLICES[] = { -0.5D, 0.5D }; private static final double WALL_SLICES_REVERSE[] = { 0.34999999999999998D, 0.69999999999999996D }; private static final double POWER_SLICES[] = { 0.65000000000000002D, 1.3D, 1.95D, 2.6000000000000001D };
I don't mind if you copy your bot from someone else but please give PEZ proper credit for it. -- StefW
I used PEZ's gun for my segmentation for both movement and gun that's true. Although now all these slices are not used, I discarded some and added an unsegmented buffer because it was slowing down my learning speed. The movement is actually closer to RaikoMX (in my mind) I use the same segmentation for the hits and the flattener. When there is no wave I surf the flattner's wave, I no longer mirror the enemy. I use Axe's (IIRC) power management trick to fire 3 power bullet when the hit rate is above 30%. I use Albert future position to predict my positions. -- Florent
Not to dim the mood but StefW has a point about dishing out credit. PEZ, Jamougha, Axe and Albert all release their open source bots under RWPCL. Officially, there is an expectation that you share the result with the wiki community. C'mon - Toad is a bot to be proud of! ;) --Corbos
I will release it once its clean, I am done removing bugs (I hope). I am implementing gun heat and energy tracking to improve the fire detection. -- Florent
You seem to have gone up another 20 points with 0.6t, you'll be number one soon, congratulations! -- StefW
Thanks, I dont know if it is due to to the segmentation tree for the gun or the more precise energy tracking tough. -- Florent
One change at a time, the hardest rule to follow in Robocode :) -- Pulsar
The temptation is way too big :) -- Florent
Great! Finally a tree based dynamic segmentation gun. And it immediately charges into the 2000 club :-) I would be very curious how it performs in the RRGunChallenge. That would clearly indicate how strong the gun is. Congrats! -- Vic
I have been working on this tree since Froggy but it was not that effective. The results are not always repeatable, but that might be because I only run 35 rounds, after about 85 rounds the tree will be too big to be rebuild with the current settings. I have just created an RRGC version of Toad, I will release it when Toad 0.7t will have stabilised its ranking. --Florent
Toad RRGC is slowing done my RR client a lot, it has been running one battle with Toad RRGC for the last 20 minutes, can you please make it faster or remove it from the RR? Thanks! -- StefW
I will try to make it faster,but I fear it will still be slow. -- Florent
Its uploaded, I played a with threads' priorities it is a bit faster. --Florent
I have the problem listed below with Toad_RRGC. It happens only (as far as I have seen) when Toad_RRGC participates in the first battle. When it is in a next battle there is no problem.
Preparing battles list ... Using smart battles is true Executing battles ... Fighting battle 0 ... drm.CobraBora 1.12,florent.Toad_RRGC 1.2 Exception in thread "Application Thread" java.lang.ArrayIndexOutOfBoundsExceptio n: 1 >= 1 at java.util.Vector.elementAt(Unknown Source) at robocode.peer.ContestantPeerVector.elementAt(ContestantPeerVector.jav a:52) at robocode.battle.BattleResultsTableModel.getValueAt(BattleResultsTable Model.java:75) at roborumble.battlesengine.BattlesRunner.runBattles(BattlesRunner.java: 95) at roborumble.RoboRumbleAtHome.main(RoboRumbleAtHome.java:94) C:\Applicaties\robocode\robots>cd .. C:\Applicaties\robocode>I must note that I still use v1.0.6 for RR@Home, just too lazy to replace it by Kawigi's version of 1.0.7. --GrubbmGait
I'll see what I can do, even if I have no clue why it happens. -- Florent
And it only seems to happen when Toad_RRGC is listed as the second bot in the first battle. (Just to make things a bit more blurry) --GrubbmGait
That's even better ;) . Has any other bot encountered a similar problem? -- Florent
Very rarely I had such a problem before in the middle of a RR@Home sequence, but this is the first time it happens consequently. If other clients do not have this problem, it just may have to do with my configuration. Just set 'BATTLESPERBOT=500' (meaning fill PL-list first), let the client run and watch the Java-window. --GrubbmGait
Toad RRGC tanks nearly every time. I've noticed it as the second bot quite a bit but I don't know that it is the only time it happens. I'd get to someone + toad, it'd tank, I'd get a fresh list and crank through 25, upload, get the same someone + toad battle and it'd tank again, rinse repeat. I've noticed Toad (RRGC and otherwise) is the only bot that times out in melee battles. Something is awry with your segmentation thread thing-a-ma-bob methinks. - Martin Alan Pedersen
Toad is a One on One only, no wonder it crashes in melee. I haven't released a new version, with threads correction because the current one doesn't have all its pairings yet. The computations in the threads does not count in the CPU time fo the robot, what is slow in my robot is the precise pediction. --Florent
It is also possible there is a bug in RR@Home (thread-related) which is only encountered in a situation which occurs with ToadRRGC?. Alas, since this is the first time this happens, ToadRRGC? still is the prime suspect. As for its pairings, it will take some to fill up because it now relies on 'random' battles because the priority battles do not work for ToadRRGC?. --GrubbmGait
Concerning the bug I have just read RoboRumble/ReportedProblems and it already happened with other bots which weren't using threads. The new version should be completly safe regarding the threads, the flags are now declared volatile and its compiled for Java 1.5. I thought I had removed all the bugs in my movement but there seems to still be some.-- Florent