It uses a big brain, implemented trough a big NN. Instead of learning how to target the enemies one by one (and storing data for all of them) it learns to target them all as a whole (in fact, it assumes that ALL bots have commonalities in their movement, so learning how to target one should be good to target the next one).
Also it factors TheBrainPi movement into the targeting system (ie. its brain).
You can download it from the RobocodeRepository.
It's a little bit erratic. If you give it some time to readapt it's brain, its quite effective (in fact, it beats many good bots, but deppends on who fought in the previous battles, the brain mod, and some unknown factors).
I haven't tested it so much.
Just random movement. I added some of Kawigi's code for DynamicDistancing, but I think that in the released version has no effect at all (or may be it has?). Anyway, thanks Kawigi: I discovered the power of DynamicDistance when your Flood's were beating my nanoLauLectik? with just head on targeting.
It uses its brain to predict the enemy position. Note that it's a real brain. I just feed it with TheBrainPi and the enemy position (and some history) and it predicts the future enemy position. But it's just its brain who does it, so no idea how it aims.
It's a pure 1v1 bot.
It's a pure 1v1 bot.
It saves its brain, and some randomly choosen input/output patterns from previous matches, to avoid over-specialization during the first rounds.
There was a movie called PI, where a guy was trying to discover the formula that rules the markets... He gets mad as the movie goes on. TheBrainPi is also the result of madness.
Of course. If you use a signifcative portion of it, please make your bot open source.
Test this crazy idea and see if it has some future.
No idea. I have not tested it (almost).
I don't think it's because of Java 1.3. I'm not concious there is any java 1.4 specific call (and if there is, I can fix it). Could you post the error so I can check it? -- Albert
OK, good to hear it's not yet another 1.4 specific bot. I'll post the stack trace as soon as the current league I'm running is finished. All these pattern matchers take forever to run on nmy ageing laptop. -- PEZ
Here's the error message and stack trace. Good news is that it only happens in the first round and then the brain fights, and fights well! Impressing.
apv.TheBrainPi 0.5: Exception: java.lang.NullPointerException java.lang.NullPointerException at apv.TheBrainPi.buildOutput(TheBrainPi.java:231) at apv.TheBrainPi.learn(TheBrainPi.java:177) at apv.TheBrainPi.onScannedRobot(TheBrainPi.java:143)-- PEZ
Just for reference I do not get that under Java 1.4.1 using the Sun JVM. Though I have a hard time seeing how you could have a null pointer be machine-specific, unless your VM doesn't initialize something the way a newer one does.. *puzzled*
You do, however, have an array which fills up at around round 250.
apv.TheBrainPi 0.5: Exception: java.lang.ArrayIndexOutOfBoundsException: 100002 java.lang.ArrayIndexOutOfBoundsException: 100002 at apv.TheBrainPi.aim(TheBrainPi.java:195) at apv.TheBrainPi.onScannedRobot(TheBrainPi.java:145) at robocode.peer.robot.EventManager.onScannedRobot(EventManager.java:607) at robocode.peer.robot.EventManager.processEvents(EventManager.java:738) at robocode.peer.RobotPeer.tick(RobotPeer.java:1024) at robocode.AdvancedRobot.execute(AdvancedRobot.java:186) at apv.TheBrainPi.run(TheBrainPi.java:118) at robocode.peer.RobotPeer.run(RobotPeer.java:616) at java.lang.Thread.run(Thread.java:536)
Since TheBrainPi isn't codesize restricted, I'd recommend changing the array to a more dynamic storage class, like a [Vector], which can continually expand. If whatever data that array holds gets old you could simply also throw it out, which is again much easier to do in a [Vector]. -- Kuuran
Good idea. I'w do as soon as possible. -- Albert
I thought they were redesigned in 1.2? I might be mistaken.. -- Kuuran
A Vector is a thread safe implementation of an ArrayList. If you are not multi-threaded or if you are willing to worry about synchronization on your own, they are interchangeable. There used to be a significant performance hit for the synchronization in a Vector but that is not so much the case any more. -- jim