Difference between revisions of "Talk:BlackWidow"
RednaxelaBot (talk | contribs) m (Using <syntaxhighlight>.) |
|||
(24 intermediate revisions by 4 users not shown) | |||
Line 11: | Line 11: | ||
» <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 14:14, 7 March 2009 (UTC) | » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 14:14, 7 March 2009 (UTC) | ||
− | + | But BlackWidow is better at Survival (+ ~2%) and beats weaker bots better than Ocnirp. Anyway, on Friday I started to make Mosquito with PM. ;) I implemented WeekendObsession's code and it's 10 bytes less in codesize! I'm considering to update all my pm bots to Simonton's code. I think the top 4 can start to fear. ;) --[[User:Robar|HUNRobar]] 17:06, 8 March 2009 (UTC) | |
---- | ---- | ||
I don't know do you know this or not, but [http://robowiki.net/cgi-bin/robowiki?BlackWidow there is a bot with name BlackWidow already!] » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 10:40, 8 March 2009 (UTC) | I don't know do you know this or not, but [http://robowiki.net/cgi-bin/robowiki?BlackWidow there is a bot with name BlackWidow already!] » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 10:40, 8 March 2009 (UTC) | ||
Yes, I got to know it 2 days ago, but it isn't in the rumble, isn't it? --[[User:Robar|HUNRobar]] 17:06, 8 March 2009 (UTC) | Yes, I got to know it 2 days ago, but it isn't in the rumble, isn't it? --[[User:Robar|HUNRobar]] 17:06, 8 March 2009 (UTC) | ||
+ | |||
+ | Yes, it isn't in the rumble. But next time you should check the robot name more careful to avoid another duplicated =) » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 23:57, 8 March 2009 (UTC) | ||
+ | |||
+ | Just letting you know, you can set your move amount to 37, as 1+2+3+4+5+6+7+5+3+1=37. If you want to dodge the bigger bullets better, at risk of not stopping in time for smaller bullets, you can move 48, 1+2+3+4+5+6+7+8+6+4+2=48. --[[User:Skilgannon|Skilgannon]] 00:27, 28 March 2009 (UTC) | ||
+ | |||
+ | OcnirpSNG use 47 actually. Skilgannon, if I remembered corectly, Waylander move relative to enemy bullet power, right? If you move to dodge 2 power bullets, you can use 1+2+3+4+5+6+7+8+8+8+6+4+2=64. Power 3 allowed you to move up to 80. I think Robar use 36 because WeekendObsession use it. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 04:28, 28 March 2009 (UTC) | ||
+ | |||
+ | No, you need 2 ticks to be at rest before you detect they fire, because that is when they take the data from (think wavesurfing physics). So for power 2 there are only 2 ticks you can be at velocity 8, making the max distance you can travel 56. Yes, all my Micro bots take this into account, and vary between 37 and 48 (and more if bullet power is above 2.5) depending on the bullet power, making them able to effectively dodge bullets all the way down to power 1 while still moving maximum possible distance for larger bullets. --[[User:Skilgannon|Skilgannon]] 08:05, 28 March 2009 (UTC) | ||
+ | |||
+ | I was testing StopNGo with NanoAndrew at that time, and then it seemed 36 is still the best (which is the width of the robot, isn't it? That's how I figured it out.). I tested on it because it uses low-power bullets, probably between 1-2. I didn't make any calculations about the movement. Now I don't do anything about my robots, just look in the wiki daily. I've plans with BlackWidow, though. I will test how it works with setAdjustGun on, but I rather like to implement some velocity-trick into the random movement. In addition, I have a slightly modified random movement which should be tested against pm and anti-pm bots.<br> | ||
+ | Other: After signing Blackwidow up, I replaced the pm with WeekEndObsession's gun and it saved 3-4 bytes. I'm also planning to figure out the PRAL gun. I seems to be quite effective and small-codesize. I think I'll implement it into Mosquito or a super-tuned BlackWidow. ;)--[[User:Robar|HUNRobar]] 16:55, 28 March 2009 (UTC) | ||
+ | |||
+ | I've do some test with PRAL/SRAL and it work best only in short distance, and Neophyte keep distance at 180. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 06:11, 29 March 2009 (UTC) | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Just letting you know, the release date is the date of ''first'' release, not current release. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 19:07, 5 April 2009 (UTC) | ||
+ | |||
+ | Thank's corrected. ;) --[[User:Robar|HUNRobar]] 19:18, 5 April 2009 (UTC) | ||
+ | |||
+ | ---- | ||
+ | |||
+ | I don't even believe that top nano-bot still have a room for color! » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 20:24, 5 April 2009 (UTC) | ||
+ | |||
+ | I managed to squezze the code to about 230 bytes. :) I added lat. vel. rounding, plus colors. Other modifications didn't require more codesize. I'm thinking of some energy management, but I think I'll give Robocode a break again. I also tried distance-control, but I couldn't squeeze the code less than 251 bytes. :) (in there was a distance controlling version but I had to use precalculated bullet flight time from neophyte pattern. It was a lot worse than the original bot.) --[[User:Robar|HUNRobar]] 07:14, 6 April 2009 (UTC) | ||
+ | |||
+ | * Me too, I do recently work (distance control) with OcnirpSNG, but stuck at 251 :-) I always amaze on Neophyte series. I'm going to try Rednaxela way (using java assembly) to manage to kill Neophyte. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 07:20, 6 April 2009 (UTC) | ||
+ | |||
+ | I think we nearly reached the limits of StopNGo/Random bots. I researching new movements, but it's quite hard to find something worthful.<br> | ||
+ | Anyway, the Neophyte series are a nice squeezing work, anyway they are a pack of codes from another bots. (Freddie and WeekendObsession) <br> | ||
+ | Otherwise, can we call the Neophyte movement a nano-sized wavesurfing? I was thinking of the possibility of a GF+Wavesurfer nanobot. :D --[[User:Robar|HUNRobar]] 07:27, 6 April 2009 (UTC) | ||
+ | |||
+ | * (*laugh*) I prefer not to call it wave surfing. Have you ever read articles about wave surfing before? I prefer to call it random movement anyway. I am sure that random movement/stopngo can't go better than WeekendObsession (or BlackWidow or OcnirpSNG) » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 09:07, 6 April 2009 (UTC) | ||
+ | |||
+ | Ok, but it's not random movement at all! It switches between one-way and 'oscillating' movement each hit. I think I'll take a look at some ws tutorials and try to catch the main idea that can be squeezed to a nano. --[[User:Robar|HUNRobar]] 15:51, 6 April 2009 (UTC) | ||
+ | |||
+ | [http://robowiki.net/cgi-bin/robowiki?WaveSurfing/NanoSurfer] and [http://robowiki.net/cgi-bin/robowiki?WaveSnake] are what you need to read after understand WS. Only thing it match Neophyte is distance keeping. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 09:01, 8 April 2009 (UTC) | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Letting you know, I topped score you in every but nanorumble :-) » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 13:53, 16 April 2009 (UTC) | ||
+ | |||
+ | I know that, congratulations, your nano is a better micro/mini/mega, but my nano is a better nano. :D --[[User:Robar|HUNRobar]] 15:44, 16 April 2009 (UTC) | ||
+ | |||
+ | == Gun pattern initialization == | ||
+ | |||
+ | Hey, letting you know that your code: | ||
+ | <syntaxhighlight> | ||
+ | static String enemyLog = "000000000000000000000000000000888888888888888765432100888765432101234567888765432100"; | ||
+ | </syntaxhighlight> | ||
+ | actually has no difference in targeting. Because when you append the pattern, you do: | ||
+ | <syntaxhighlight> | ||
+ | String.valueOf ( (char) Math.round(...) ).concat(enemyLog); | ||
+ | </syntaxhighlight> | ||
+ | the char you actually append and match is <code>(char) -8</code> or <code>(char) 4</code> etc. But with the initialization you do, enemyLog will contain: | ||
+ | <syntaxhighlight> | ||
+ | static String enemyLog = "" + (char) 49 + (char) 49 + (char) 49 + (char) 49 | ||
+ | + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 | ||
+ | + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 | ||
+ | + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 | ||
+ | + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 57 + (char) 57 | ||
+ | + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 | ||
+ | + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 56 | ||
+ | + (char) 55 + (char) 54 + (char) 53 + (char) 52 + (char) 51 + (char) 50 + (char) 49 | ||
+ | + (char) 49 + (char) 57 + (char) 57 + (char) 57 + (char) 56 + (char) 55 + (char) 54 | ||
+ | + (char) 53 + (char) 52 + (char) 51 + (char) 50 + (char) 49 + (char) 50 + (char) 51 | ||
+ | + (char) 52 + (char) 53 + (char) 54 + (char) 55 + (char) 56 + (char) 57 + (char) 57 | ||
+ | + (char) 57 + (char) 56 + (char) 55 + (char) 54 + (char) 53 + (char) 52 + (char) 51 | ||
+ | + (char) 50 + (char) 49 + (char) 49; | ||
+ | </syntaxhighlight> | ||
+ | ... which doesn't help in targeting in any way. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 23:32, 12 May 2009 (UTC) | ||
+ | |||
+ | Lol - I realized that a while ago :) I was the original idiot that added the prefab'd strings. It jsut has to be PATTERN_LENGTH*2 or so in size to prevent buffer overruns at the beginning of a match. The first gen pattern guns had an if check to prevent buffer overruns... --[[User:Miked0801|Miked0801]] 03:19, 13 May 2009 (UTC) | ||
+ | |||
+ | Ok, thanks, I'll correct it in the next release of BlackWidow. :) --[[User:Robar|HUNRobar]] 16:27, 13 May 2009 (UTC) |
Latest revision as of 09:33, 1 July 2010
Can reduced codesize a lot this robot is. I've told you, make a turning before gun code so you can saved one e.getBearingRadians(). I think the distance if assign it to variable will save the codesize, but not sure. I think its random movement is very vulnerable to Circular Targeting. You chose new direction on bullet fire, but if you still go the same direction.... !!!!
Ok-ok, I just set up Eclipse and saw that it's 247 bytes with Jikes instead of 250 with NetBeans. (probably javac) I immediately signed it up to the rumble, so there are many things to optimize.
I don't understand why you mention random movement and circular targeting. That's the stopNgo's task. I optimized random movement against PM and HOT. Anyway, it isn't a lot worse than Ocnirp's random movement, according to the results... --HUNRobar 17:14, 5 March 2009 (UTC)
- Note: Eclipse doesn't use Jikes, I think is is javac, but don't know how that happend. » Nat | Talk » 14:17, 7 March 2009 (UTC)
Right now, I surprised that this bot get higher APS score than OcnirpSNG, but I still win by both PL and ELO :-) Let see when all my test bot removed. But BlackWidow still lost to both Ocnirp and OcnirpSNG. Another surprise is that this one lost much to NanoDeath and NeophyteSRAL!
One more question to ask you, your nano guru HUNRobar, what is smaller, String or StringBuilder (or StringBuffer in that way)? » Nat | Talk » 14:14, 7 March 2009 (UTC)
But BlackWidow is better at Survival (+ ~2%) and beats weaker bots better than Ocnirp. Anyway, on Friday I started to make Mosquito with PM. ;) I implemented WeekendObsession's code and it's 10 bytes less in codesize! I'm considering to update all my pm bots to Simonton's code. I think the top 4 can start to fear. ;) --HUNRobar 17:06, 8 March 2009 (UTC)
I don't know do you know this or not, but there is a bot with name BlackWidow already! » Nat | Talk » 10:40, 8 March 2009 (UTC)
Yes, I got to know it 2 days ago, but it isn't in the rumble, isn't it? --HUNRobar 17:06, 8 March 2009 (UTC)
Yes, it isn't in the rumble. But next time you should check the robot name more careful to avoid another duplicated =) » Nat | Talk » 23:57, 8 March 2009 (UTC)
Just letting you know, you can set your move amount to 37, as 1+2+3+4+5+6+7+5+3+1=37. If you want to dodge the bigger bullets better, at risk of not stopping in time for smaller bullets, you can move 48, 1+2+3+4+5+6+7+8+6+4+2=48. --Skilgannon 00:27, 28 March 2009 (UTC)
OcnirpSNG use 47 actually. Skilgannon, if I remembered corectly, Waylander move relative to enemy bullet power, right? If you move to dodge 2 power bullets, you can use 1+2+3+4+5+6+7+8+8+8+6+4+2=64. Power 3 allowed you to move up to 80. I think Robar use 36 because WeekendObsession use it. » Nat | Talk » 04:28, 28 March 2009 (UTC)
No, you need 2 ticks to be at rest before you detect they fire, because that is when they take the data from (think wavesurfing physics). So for power 2 there are only 2 ticks you can be at velocity 8, making the max distance you can travel 56. Yes, all my Micro bots take this into account, and vary between 37 and 48 (and more if bullet power is above 2.5) depending on the bullet power, making them able to effectively dodge bullets all the way down to power 1 while still moving maximum possible distance for larger bullets. --Skilgannon 08:05, 28 March 2009 (UTC)
I was testing StopNGo with NanoAndrew at that time, and then it seemed 36 is still the best (which is the width of the robot, isn't it? That's how I figured it out.). I tested on it because it uses low-power bullets, probably between 1-2. I didn't make any calculations about the movement. Now I don't do anything about my robots, just look in the wiki daily. I've plans with BlackWidow, though. I will test how it works with setAdjustGun on, but I rather like to implement some velocity-trick into the random movement. In addition, I have a slightly modified random movement which should be tested against pm and anti-pm bots.
Other: After signing Blackwidow up, I replaced the pm with WeekEndObsession's gun and it saved 3-4 bytes. I'm also planning to figure out the PRAL gun. I seems to be quite effective and small-codesize. I think I'll implement it into Mosquito or a super-tuned BlackWidow. ;)--HUNRobar 16:55, 28 March 2009 (UTC)
I've do some test with PRAL/SRAL and it work best only in short distance, and Neophyte keep distance at 180. » Nat | Talk » 06:11, 29 March 2009 (UTC)
Just letting you know, the release date is the date of first release, not current release. » Nat | Talk » 19:07, 5 April 2009 (UTC)
Thank's corrected. ;) --HUNRobar 19:18, 5 April 2009 (UTC)
I don't even believe that top nano-bot still have a room for color! » Nat | Talk » 20:24, 5 April 2009 (UTC)
I managed to squezze the code to about 230 bytes. :) I added lat. vel. rounding, plus colors. Other modifications didn't require more codesize. I'm thinking of some energy management, but I think I'll give Robocode a break again. I also tried distance-control, but I couldn't squeeze the code less than 251 bytes. :) (in there was a distance controlling version but I had to use precalculated bullet flight time from neophyte pattern. It was a lot worse than the original bot.) --HUNRobar 07:14, 6 April 2009 (UTC)
- Me too, I do recently work (distance control) with OcnirpSNG, but stuck at 251 :-) I always amaze on Neophyte series. I'm going to try Rednaxela way (using java assembly) to manage to kill Neophyte. » Nat | Talk » 07:20, 6 April 2009 (UTC)
I think we nearly reached the limits of StopNGo/Random bots. I researching new movements, but it's quite hard to find something worthful.
Anyway, the Neophyte series are a nice squeezing work, anyway they are a pack of codes from another bots. (Freddie and WeekendObsession)
Otherwise, can we call the Neophyte movement a nano-sized wavesurfing? I was thinking of the possibility of a GF+Wavesurfer nanobot. :D --HUNRobar 07:27, 6 April 2009 (UTC)
- (*laugh*) I prefer not to call it wave surfing. Have you ever read articles about wave surfing before? I prefer to call it random movement anyway. I am sure that random movement/stopngo can't go better than WeekendObsession (or BlackWidow or OcnirpSNG) » Nat | Talk » 09:07, 6 April 2009 (UTC)
Ok, but it's not random movement at all! It switches between one-way and 'oscillating' movement each hit. I think I'll take a look at some ws tutorials and try to catch the main idea that can be squeezed to a nano. --HUNRobar 15:51, 6 April 2009 (UTC)
[1] and [2] are what you need to read after understand WS. Only thing it match Neophyte is distance keeping. » Nat | Talk » 09:01, 8 April 2009 (UTC)
Letting you know, I topped score you in every but nanorumble :-) » Nat | Talk » 13:53, 16 April 2009 (UTC)
I know that, congratulations, your nano is a better micro/mini/mega, but my nano is a better nano. :D --HUNRobar 15:44, 16 April 2009 (UTC)
Gun pattern initialization
Hey, letting you know that your code:
static String enemyLog = "000000000000000000000000000000888888888888888765432100888765432101234567888765432100";
actually has no difference in targeting. Because when you append the pattern, you do:
String.valueOf ( (char) Math.round(...) ).concat(enemyLog);
the char you actually append and match is (char) -8
or (char) 4
etc. But with the initialization you do, enemyLog will contain:
static String enemyLog = "" + (char) 49 + (char) 49 + (char) 49 + (char) 49
+ (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49
+ (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49
+ (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49
+ (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 49 + (char) 57 + (char) 57
+ (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57
+ (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 57 + (char) 56
+ (char) 55 + (char) 54 + (char) 53 + (char) 52 + (char) 51 + (char) 50 + (char) 49
+ (char) 49 + (char) 57 + (char) 57 + (char) 57 + (char) 56 + (char) 55 + (char) 54
+ (char) 53 + (char) 52 + (char) 51 + (char) 50 + (char) 49 + (char) 50 + (char) 51
+ (char) 52 + (char) 53 + (char) 54 + (char) 55 + (char) 56 + (char) 57 + (char) 57
+ (char) 57 + (char) 56 + (char) 55 + (char) 54 + (char) 53 + (char) 52 + (char) 51
+ (char) 50 + (char) 49 + (char) 49;
... which doesn't help in targeting in any way. » Nat | Talk » 23:32, 12 May 2009 (UTC)
Lol - I realized that a while ago :) I was the original idiot that added the prefab'd strings. It jsut has to be PATTERN_LENGTH*2 or so in size to prevent buffer overruns at the beginning of a match. The first gen pattern guns had an if check to prevent buffer overruns... --Miked0801 03:19, 13 May 2009 (UTC)
Ok, thanks, I'll correct it in the next release of BlackWidow. :) --HUNRobar 16:27, 13 May 2009 (UTC)