Talk:Portia

From Robowiki
Revision as of 23:54, 19 August 2009 by Voidious (talk | contribs) (reply)
Jump to navigation Jump to search

How many call to sin & cos do you do each tick? If it is below 10,000, that isn't a reason, or you think it is slow while in fact it isn't. Oh I see... you have a lot of small classes, which is obfuscated I think (no one name the class a,aa,ab,...) » Nat | Talk » 10:15, 12 July 2009 (UTC)

Hey Nat, I've tested it, and its speed is about half the speed of Shadow. I believe I'm using about 700 trigonometry functions and 200 sqrts each tick, depending on the situation. If that's not it, I'm not sure what is. Maybe its the simulated bullets, I'll have a look for a next version. I've speed and size optimized the .jar, that's why you see the "a,aa,ab,...". --Positive 18:23, 12 July 2009 (UTC)
Just curious, what program are you using for the speed and size optimizations? I'd be interested in trying it on DrussGT to see if it solves my skipped turn problems =) Also, one way to speed up your bot quite a bit is to only aim your gun for the 4 ticks before you fire, and the rest of the time just point your gun straight at the enemy's location. --Skilgannon 21:23, 12 July 2009 (UTC)
I used ProGuard 4.3 for the optimization. Tell me what it does for Druss. :) Just aiming your gun for the opponent is a good idea, and Portia already does it. :) 22:11, 12 July 2009 (UTC)
I just noticed, Portia doesn't do it for the solo gun. Adding it now. :) --Positive 21:54, 16 July 2009 (UTC)

By the way, I'd like to hear your opinion about Portia (if you've played with him). I think the meleemovement is quite different from most bots, and it seems to be doing great (6th in the meleerumble at the moment). --Positive 22:11, 12 July 2009 (UTC)

Congrats on a really awesome debut, dude! The rating will still fluctuate quite a bit until you hit full pairings and ~2,000 battles, but I bet it stays at 5th or 6th. I've been easing back into work on Diamond -- now I'm even more motivated. ;) --Voidious 22:36, 12 July 2009 (UTC)

Thank you. :) I'm glad my bot poses a new challenge to you. :P For the solo part, I've already spent many hours trying to defeat Dookious as well. Not very successfull though, at least not after he activates that damn flattener. ;)

Hi there, welcome to Robocode. Thanks for making me run some melee battles again, great movement you got there, congrats. I'm even thinking about making my own melee bullet detector now... --ABC 23:47, 13 July 2009 (UTC)

ABC, are you checking the wiki all the time and make no comment? PS. Sorry if I get Portuguese wrong, result from Google Translate » Nat | Talk » 12:44, 14 July 2009 (UTC)
Not all the time, but I still check the wiki and the RR server frequently. My life has been a bit too busy to participate actively, though. Your Portuguese was correct, and I didn't forget the email you sent me, btw. :) --ABC 14:28, 14 July 2009 (UTC)
Thank you. :) --Positive 19:43, 14 July 2009 (UTC)

DC Pattern Matching or DC Play-it Forward? If it is really DC-PM, I'm really interested on how it works. » Nat | Talk » 13:11, 3 August 2009 (UTC)

What's the difference? --Positive 13:27, 3 August 2009 (UTC)
Well, I'm guessing you just mean a DC / "Tron's Gun" style gun, which used to be called a "forward pattern matcher" and was once generally considered PM. But the consensus is that it really isn't pattern matching at all, so I think Nat is wondering if you're doing some new type of DC gun that also uses pattern matching. --Voidious 13:30, 3 August 2009 (UTC)
Yes, I based the gun on TronsGun page. So I guess that makes it a forward pattern matcher. Portia 1.12 makes a "pattern" based on the opponents: displacement vectors for roughly the last 30 ticks, current velocity, acceleration, and other variables like distance to wall. It then stores that "pattern" 100 turns later in the KD-tree, with a reference to the turn it was recorded, if the opponent is still alive. :) --Positive 13:53, 3 August 2009 (UTC)
What do you do with those 30 displacement vectors? Do you have like 35 dimensions in your tree, or is it something else? Great job with the new gun, looks like you might snag 3rd (knock on wood). --Voidious 14:12, 3 August 2009 (UTC)
Thanks (quickly knocks on wood as well)! :) It calculates 3 displacement vectors over those 30 turns, and takes 1 heading difference and 3 displacements from them for dimensions. I don't think 35 dimensions would be very managable. :P --Positive 14:41, 3 August 2009 (UTC)
Wow, really amazing! Huge congrats on 3rd place with 1.12 - and closing in on Aleph! --Voidious 00:44, 4 August 2009 (UTC)
Thankyou. I didn't dare hope such a jump. :) It's pretty exciting how much you can do, and is still possible in melee. :) --Positive 11:04, 4 August 2009 (UTC)

You really are amazing me - congrats on overtaking Aleph for the #2 spot! If I were ABC, I might start getting a little scared. =) But Shadow still has a pretty incredible lead (3.83 was about 1% APS higher than 3.84) ... for now. Best of luck in your quest for the throne! Hope to catch up sometime. --Voidious 16:55, 11 August 2009 (UTC)

Big congrats from me too, great work. Don't stop now, you are going places! ;) --ABC 17:04, 11 August 2009 (UTC)

Very nice job man. I don't know if there are differences on the 1v1 code of versions 1.0 and 1.13, if there are you should enter version 1.13 in the 1v1 competition to compare it to Shadow, maybe there is a chance to boost Portia by turning seconds to firsts? Although looking at their battles, would make me think that you should be improving you gun, check the bullet damage difference between them. Good luck, and congrats again. --zyx 17:18, 11 August 2009 (UTC)

Oh my... very nice stuff here! I really need to finish my accursed melee bot and see if I can at least overtake Diamond. Hmm... I wonder what you would get if you combined Gaff's 1v1 gun, DrussGT's 1v1 movement, Portia's melee movement, and Shadow's melee gun... :) --Rednaxela 18:13, 11 August 2009 (UTC)

In terms of Melee performance... probably something a lot like the current Shadow. :-) --Voidious 18:19, 11 August 2009 (UTC)

Thank you. :) I'm as amazed as you guys. Don't worry, I still have some more ideas. :) Turning more seconds into firsts would be great. The thing is that 1v1 in the meleerumble is a lot different from in the solorumble, so I think something special is needed for that. Right now I'm thinking about perhaps extending the bullet simulation for 1v1, to combine with the Stop 'n go. Would you recommend any quick 1v1-gun technique? --Positive 20:30, 11 August 2009 (UTC)

Congrats from me too! For one-on-one, I think you should take a look into Wave Surfing. I know it isn't fast, but it's fun! And perhaps DC-GF gun will help you too. » Nat | Talk » 23:28, 11 August 2009 (UTC)

A DC-GF gun is certainly not needed. Diamond, and even more so Shadow, have quite strong 1v1 guns that are non-GF DC. Keeping it simple and not using a second gun for 1v1 would probably be a more sensible approach. I'd recommend keeping Portia with the same DC-PIF gun it has now, but simply improving it's 1v1 performance. I recommend experimenting with the dimensions that are used in the KD-Tree, as well as the number of nearest neighbors returned from that at a time. --Rednaxela 00:18, 12 August 2009 (UTC)

I don't think 1v1 performance is even that important in Melee. How much energy you take into the final duel is usually way more important. Some really solid HOT-avoidance is useful, but it sounds like you already have that.

Have you benchmarked your gun at all? You might try some Targeting Challenges if you really think there are lots of points there. I agree you don't need any specific technique, e.g. GuessFactors. Making every aspect of your data collection as accurate as possible is really important. Make sure all your attributes are working right, try different weights and attributes and cluster sizes. Try removing attributes that you "know" are good, but that you've never considered removing, try the exact opposite of what you think should work... =) Good luck.

--Voidious 00:52, 12 August 2009 (UTC)

You're right, the 1v1 code isn't so important in melee. However, I often see Portia lose against robots like Infinity and Griezel because Portia misses most shots. I really like the the idea of somehow using the main DC gun in 1v1, that'd solve the Infinity "problem". :) I haven't done any benchmarking, mainly because I often delete and rewrite entire parts, and the benchmarks would be lost. But I can see how in this case it might be smart. In any case, those definitely are some great tips. Thank you. :) --Positive 12:15, 12 August 2009 (UTC)

Okay I was just buzy with making some screenshots for the Portia page, when I realized it would be cooler to put up a video on youtube for it. Now I've seen some video's on youtube, but there isn't much info on the wiki. I'm thinking to put a description like "For more info about this free programming game, visit robowiki.net" and tag "robocode". I was wondering if you agree and/or have some recommendations? --Positive 22:00, 13 August 2009 (UTC)

I think that would be very cool. I've searched YouTube for Robocode vids a few times so that I could show people what Robocode is like, and while there are some videos there, not too many are showing high level / modern bots. And that's fine, but slightly less impressive when trying to attract newcomers. =) --Voidious 22:10, 13 August 2009 (UTC)
Exactly. :) If more people like to do something like this, we could put a wiki page up for it as well. Do you suggest any tags or description? --Positive 22:14, 13 August 2009 (UTC)

I'm not sure how much it is affecting performance (your MeleeRumble score still seems OK), but I'm seeing a NullPointerException for Portia 1.14 (on both my systems):

java.lang.NullPointerException
	at positive.bd.a(Unknown Source)
	at positive.bf.a(Unknown Source)
	at positive.bf.a(Unknown Source)
	at positive.Portia.onScannedRobot(Unknown Source)
	at robocode.ScannedRobotEvent.dispatch(ScannedRobotEvent.java:297)
	at robocode.Event$HiddenEventHelper.dispatch(Event.java:249)
	at net.sf.robocode.security.HiddenAccess.dispatch(HiddenAccess.java:195)
	at net.sf.robocode.host.events.EventManager.dispatch(EventManager.java:486)
	at net.sf.robocode.host.events.EventManager.processEvents(EventManager.java:459)
	at net.sf.robocode.host.proxies.BasicRobotProxy.executeImpl(BasicRobotProxy.java:403)
	at net.sf.robocode.host.proxies.BasicRobotProxy.execute(BasicRobotProxy.java:119)
	at robocode.AdvancedRobot.execute(AdvancedRobot.java:565)
	at positive.Portia.run(Unknown Source)
	at net.sf.robocode.host.proxies.HostingRobotProxy.run(HostingRobotProxy.java:250)
	at java.lang.Thread.run(Thread.java:619)

--Voidious 20:52, 15 August 2009 (UTC)

Hrm, how much of it are you seeing? --Positive 21:03, 15 August 2009 (UTC)

I saw it a few times each battle on my Linux RoboRumble client, so I ran one battle on my Mac and saw it a couple of times there too (to get the stack trace). Once was right as Portia won the round, the other wasn't (but maybe was right before/after a kill). --Voidious 21:06, 15 August 2009 (UTC)

I'll have to ponder about this. Thank you for the headsup. :) --Positive 21:11, 15 August 2009 (UTC)

As you note you can't seem to reproduce it, I'll just mention that I was also seeing this happen to Portia 1.14 very frequently. It seems to have disappeared in 1.15 though as I haven't seen it throw an exception yet. --Rednaxela 23:41, 18 August 2009 (UTC)
Hmm, it's possible the exception you saw was being caused as a side effect of the solved bug. Could you perhaps do me a favour: run Portia with 9 other bots in your 1.6.1.4 client, run some rounds and look at the output screen. Do you see Portia printing "Caught exception..." there? Thanks for helping in any case. :) --Positive 01:44, 19 August 2009 (UTC)

There's something I've been wondering about. I know your melee movement is largely based on bullet dodging, but I imagine you take other risk-type things into account, as well. I can't help but wonder how well your movement actually dodges bullets - i.e., I wonder if perhaps the bullet dodging just serves as an effective Random Movement, rather than bullet dodging, per se? For instance, against 9 Shiz or HawkOnFire bots, would Portia perform incredibly well, because it actually dodges the HOT very effectively? What against about 9 LT/CT guns? Have you measured the effectiveness of the bullet dodging in this way? Just curious... --Voidious 18:18, 18 August 2009 (UTC)

Yes, I have tested it. It does dodge HOT quite effectively. LT/CT is harder, because there are many different implementations for it. I think it does a best guess, and if it's not correct it will attribute to an at least hard to predict movement. In other words, I don't think its just a good Random Movement. --Positive 20:06, 18 August 2009 (UTC)
My melee bot in progress is still very much a fledgeling, but I find it's HOT dodging, which is somewhat similar to Portia's, is notably better than the movement of MiniSurreptitious. --Rednaxela 22:37, 18 August 2009 (UTC)
I'm also slightly sceptical about the effectiveness of bullet dodging. Like Voidious said, you should see amazing survival scores against a field of HawkOnFires, and I'm not seeing them. In fact, Shadow scores about the same (or slightly worse) with its new HOT surfing movement as it does with the traditional minimum risk movement. The positional strategy in melee is the bigger factor, no use in bullet dodging yourself into the middle of the field where you will die almost instantly... --ABC 12:08, 19 August 2009 (UTC)

Well, Portia 1.15 is about 1% aps lower than 1.13 now, and I really wonder why. Voidious and Rednaxela, I'd be very grateful if you could check if Portia is reporting bugs (in its output screen) in your 1.6.1.4 clients. --Positive 19:45, 19 August 2009 (UTC)

I will run some battles for you manually when I get home and let you know what I find. Like Rednaxela, I didn't notice any exceptions with 1.15 when I watched it for a bit. Sorry, having bad versions and wondering if it's due to weird errors sucks. =( --Voidious 19:49, 19 August 2009 (UTC)
Yes, I'm still seeing it with 1.15. I only had to run one battle, and saw this error in rounds 1 and 22.
positive.Portia 1.15: Exception: java.lang.NullPointerException
java.lang.NullPointerException
	at positive.bd.a(Unknown Source)
	at positive.bf.a(Unknown Source)
	at positive.bf.a(Unknown Source)
	at positive.Portia.onScannedRobot(Unknown Source)
	at robocode.peer.robot.EventManager.onScannedRobot(Unknown Source)
	at robocode.peer.robot.EventManager.dispatchEvent(Unknown Source)
	at robocode.peer.robot.EventManager.processEvents(Unknown Source)
	at robocode.peer.RobotPeer.execute(Unknown Source)
	at robocode.peer.proxies.BasicRobotProxy.execute(Unknown Source)
	at robocode.AdvancedRobot.execute(Unknown Source)
	at positive.Portia.run(Unknown Source)
	at robocode.peer.RobotPeer.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:619)
I'll try to watch some battles and see if I can understand the scenario better. I'm using 3x HawkOnFire, 2x Coriantumr, 2x zyx.nano.BacillusComma 1.0, 1x Diamond 1.272, and 1x zyx.micro.Ant 2.1 as the other bots. --Voidious 21:55, 19 August 2009 (UTC)
Do you see it printing 'Caught an exception...' as well? --Positive 22:31, 19 August 2009 (UTC)
No, I'm not seeing that at all, though I think I remember seeing it in 1.14? The NPE seems very intermittent, I can't reproduce it every match. I tried clearing the data dir and I got it at round 5, but I think that was just coincidence. I really doubt an NPE would be JVM dependent, though, maybe you can try the above test bed? I'll probably tinker with it more later, I'll let you know if I find anything... --Voidious 22:54, 19 August 2009 (UTC)

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.

There are no threads on this page yet.