View source for Talk:ÉpéeistMicro

From Robowiki
Jump to navigation Jump to search

Contents

Thread titleRepliesLast modified
MicroBot champ!1602:30, 7 May 2013
Bug1215:40, 10 January 2013
Wow!314:34, 10 January 2013

MicroBot champ!

Congrats dude! From someone who knows how tough it is to dethrone Skilgannon... =)

Voidious17:11, 30 April 2013

Thanks!

I tried for a long time to improve the gun, but that didn't work so I ended up just copying Toorkild's new mode selection and improving anti-ram.

Now it's only a matter of waiting for Toorkild 0.4.6. :(

Sheldor17:21, 30 April 2013
 

Wow, impressed that you managed to squeeze that in. Of course, Toorkild is now functionally equivalent at 711 bytes, the real issue is thinking of something to add =) And half of your score margin is from not being in LittleBlackBook's books... perhaps it is time for Waylander to make a comeback?

Skilgannon10:05, 1 May 2013

I wouldn't mind seeing Decado, Waylander, Toorkild, and Connavar back in the rumble. The rule is to not have multiple versions of the same bot in the rumble, not to not have multiple similar bots in the rumble.

Sheldor21:00, 1 May 2013
 

Mwa Ha Ha!

I just did something absolutely brilliant which squeezed 14 bytes from the GFT system itself, and I now have 18 bytes free, plus ~9 bytes if I get desperate. Any ideas about what I should do with that space?

Sheldor20:41, 1 May 2013

Huh, it seems it wasn't so brilliant after all. Version 1.9.0 is ~0.5 APS lower than 1.8.0.

The main change was to the way the wave system gathers bearing offsets. Version 1.8.0 used the traditional, coordinate-based method, whereas version 1.9.0 sums angular velocities. I made sure to keep it as precise as I could, I even adjusted the distance by which I divide the lateral velocity to calculate angular velocities with advancing velocities (actually negative advancing velocities, you might call them "retreating velocities") to account for the opponent moving toward or away from the source location of the wave.

Is there some obscure element of Robocode physics that makes sums of angular velocities inaccurate? Or is there a bug in my code?

Sheldor02:57, 2 May 2013
 

Don't think anything about Robocode itself should lead to an inaccuracy. Could it be a normalization bug? When normalizing angles, an individual angle is equivalent no matter how it gets normalized, but if you're summing or averaging them it can screw things up. E.g., average of {2.9, 3.0, 3.1, -3.1, -3.0, -2.9} is 0, but you'd want the result to be something more like pi.

Voidious04:23, 2 May 2013

Normalization should be irrelevant because everything is already relative.

I might be on to something though. I'm wondering if the inaccuracy is coming from the original absoluteBearing being used to calculate LV and AV. Should it be updated with angular velocities?

Sheldor05:05, 2 May 2013
 

You'd need to keep a list of the positions you were in and backtrace the enemy movement until the wave could originate at your location - a sort of backwards wave, as it were, otherwise you are getting the angular velocities from your current location, not from where you were when you wanted to fire. Also, are the indexes for the VCS calculated using the values from when you were firing, or when you are having the wave hit?

Skilgannon09:59, 2 May 2013

All segmentation is calculated when the wave is fired.

Why do you think I'm getting the angular velocities relative to EM's current location? I store the absoluteBearing from the tick in which the wave was fired, and both e.getVelocity() and e.getHeadingRadians() are absolute and shouldn't be relative to anything.

Thanks

Sheldor13:37, 2 May 2013

Ah, OK, looking at the source I see that you've still kept the wave structure, I thought you had completely gotten rid of it and then each tick look back to see what wave would hit now over the last N ticks of bullet flight time and retro-actively construct the wave from the conditions as they were then. What you've done isn't quite that drastic =)

As for what is different, have you tried projecting the point back into the cartesian plane and printing it to see if it is the same as the actual enemy location? How about using both types of tracking at once and seeing if they are giving the same results at wave-hit time?

Skilgannon14:22, 2 May 2013
 

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:ÉpéeistMicro/MicroBot champ!/reply (11).

 
 
 
 
 

It seems ÉpéeistMicro has a bug somewhere in its gun code. It's throwing "ArrayIndexOutOfBounds" and "NullPointer" exceptions, especially against mirror bots.

The only change I made to the GF code was to change the constant MEA from .7 to 0.727272727272727272727273.

Any ideas?

Thanks

Sheldor17:05, 8 January 2013

Could you post stacktraces?

Jdev17:31, 8 January 2013
 

Here is the console from a battle against stelo.MirrorMicro 1.1.

=========================
Round 1 of 35
=========================
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 has died
=========================
Round 2 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
	at sheldor.micro.EpeeistMicro$Wave.test(EpeeistMicro.java:219)
	at net.sf.robocode.host.events.EventManager.callUserCode(EventManager.java:436)
	at net.sf.robocode.host.events.EventManager.processEvents(EventManager.java:377)
	at net.sf.robocode.host.proxies.BasicRobotProxy.executeImpl(BasicRobotProxy.java:417)
	at net.sf.robocode.host.proxies.HostingRobotProxy.run(HostingRobotProxy.java:228)
	at java.lang.Thread.run(Unknown Source)
=========================
Round 3 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
	at sheldor.micro.EpeeistMicro$Wave.test(EpeeistMicro.java:219)
	at net.sf.robocode.host.events.EventManager.callUserCode(EventManager.java:436)
	at net.sf.robocode.host.events.EventManager.processEvents(EventManager.java:377)
	at net.sf.robocode.host.proxies.BasicRobotProxy.executeImpl(BasicRobotProxy.java:417)
	at net.sf.robocode.host.proxies.HostingRobotProxy.run(HostingRobotProxy.java:228)
	at java.lang.Thread.run(Unknown Source)
=========================
Round 4 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
	at sheldor.micro.EpeeistMicro$Wave.test(EpeeistMicro.java:219)
	at net.sf.robocode.host.events.EventManager.callUserCode(EventManager.java:436)
	at net.sf.robocode.host.events.EventManager.processEvents(EventManager.java:377)
	at net.sf.robocode.host.proxies.BasicRobotProxy.executeImpl(BasicRobotProxy.java:417)
	at net.sf.robocode.host.proxies.HostingRobotProxy.run(HostingRobotProxy.java:228)
	at java.lang.Thread.run(Unknown Source)
=========================
Round 5 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 10
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 6 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 7 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 8 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 9 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 10 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 11 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 12 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 13 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 14 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 15 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 9
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 16 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 17 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 8
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 18 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 12
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 19 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 20 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 has died
=========================
Round 21 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 22 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 8
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 23 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 8
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 24 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 25 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 26 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 27 of 35
=========================
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 has died
=========================
Round 28 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 29 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 30 of 35
=========================
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 has died
=========================
Round 31 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 32 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 33 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 12
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
=========================
Round 34 of 35
=========================
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
SYSTEM: Exception occurred on robocode.ScannedRobotEvent
java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
=========================
Round 35 of 35
=========================
SYSTEM: Bonus for killing stelo.MirrorMicro 1.1: 12
SYSTEM: sheldor.micro.EpeeistMicro 1.7.0 wins the round.
Sheldor18:56, 8 January 2013
 

Looks, like here you have a problem: [(int)enemyDistance / 200] Distance may be more than 800 units (sqrt(800*800 + 600*600)=1000), but you give for this dimension only 4 elements It's another problem, but i cannot find out other problems by codereview and it's too late to debugging it, sorry

Jdev19:29, 8 January 2013

I'm sorry, I don't understand what you're saying. On an 800 by 600 field, the maximum possible distance would be 764, 764 divided by 200 would be 3.82, and 3.82 cast to an int would be 3. Besides, Thorn and a few other micros use the same distance segment code and don't have a problem.

Sheldor20:20, 8 January 2013
 

On an 800x600 field, the distance between opposite corners is 1000 (forming a 3/4/5 right triangle). So I think you do need another distance segment, but I haven't looked through your code/logs enough to be sure that's the problem above.

Voidious20:44, 8 January 2013
 

Thanks! You both nailed it. In older versions I initialized the dimension to 7, I forgot to mention I had reduced it to 4 to save a byte. The reason it was losing to mirror bots was because they were in the opposite corner exactly the same time EM was.

I will give you both a mention in the credits.

Sheldor21:23, 8 January 2013
 

Do you use any version control system (git, mercurial, etc)? I recommend to use it. It will facilitate for such bugs detection.

Jdev06:16, 9 January 2013

No. How do they work?

Sheldor16:57, 9 January 2013
 

I use git for my projects. But I'm sorry to say they don't really save you from silly bugs. =)

Voidious17:35, 9 January 2013
 

They don't save from bugs, but they show all changes between versions:) VCS it's something like source code storage with support of files versions. In case of git or mercurial you can use only local repositories or link them with remote repositories in free clouds (github or bitbucket). In case of local repository, main command is commit - this command pushes current state of yours files to storage and marks it with some identifier and you can always get exact state of all files in repository with identifier. Also vcs supports versioning and if you commit files before every release, you can see all differences in code between releases. It's very useful for robocoding. Read this books: http://git-scm.com/book/ or http://hgbook.red-bean.com/read/. It's a "holywar" choise between git and mercurial, but they are pretty equal and usage of any of them is much better then usage nothing:) I use git at home and mercurial at work and cannot give suggestion - they both cool and you need to try them both to choose for yourself

Also i recommend to use some build system (i use gradle and i for sure ready to suggest to choose it) and enforce semantic versioning by them. You can see example in my new bot repository: https://github.com/aleksey-zhidkov/Violet/blob/master/build.gradle. In Violet i use follow versions:

  • Build: <major>.<minor>.<branch>.<build number> - used to for testing (in hand mode or in batch mode in Distributed_Robocode (some kind of analog of RoboRunner with remote computing support), but each batch test enforces build number increase)
  • Release: <major>.<minor> - user for releases

So my development process is:

  1. Do some changes
  2. Build them
  3. Run robocode to see them
  4. If bugs exists, then go to 1
  5. "Install" Violet - commit changes, copy build to "builds" dir and batch battles executor robots dir and incerment build number
  6. If batch testing shows APS gain, then release it: commit changes, copy build "releases" dir, increment minor version and reset build number and push version to github

By the way, robocoders, lets make page with out development processes for noobies:)

Jdev06:53, 10 January 2013

I use Maven as build system. Never tried gradle.

And I´m not currently using any version control system, but I might try git. There was one episode in the past when I lost hours trying to figure out why my bot score dropped about 30% in challenges. I could have found the bug in minutes with version control.

MN14:25, 10 January 2013

We are use ant and maven at work for enterprise project and gradual migrate to gradle, so i definitely can suggest to try gradle^) Especially because you can easy generate gradle project from maven project: http://gradle.org/docs/current/userguide/bootstrap_plugin.html

Jdev15:40, 10 January 2013
 
 
 
 
 

Very impressive little micro you have here. I've always wondered what it was that PEZ got right with Aristocles, because it is almost impossible to beat with conventional methods. In fact, if you examine its scores, it loses to all of the rambots because (IIRC) it never fires with 3 power bullets if the enemy is close. I'm fairly sure that it would rank significantly higher if that was fixed. Interestingly, your nano Sabreur beats Aristocles fairly well...

Skilgannon23:34, 14 December 2012

Thanks!

Aristocles does fire full power at close range, it loses to ram bots because it doesn't try to run away, it just sits there and takes ram damage. Also, I don't think fixing anti-ram would have a significant impact on its score. Look at RaikoMicro, it only fires power 2s and gets destroyed by ram bots, yet it is seven places ahead!

Sheldor01:15, 15 December 2012

In PL ranking, which favors generalist bots more, they flip positions and Aristocles is ahead.

MN14:34, 10 January 2013
 

I think one reason why he's so good at hitting Random Movement is the number of bins. I ran many tests, and 25 seems to be the best against RM.

Sheldor17:10, 8 January 2013