Difference between revisions of "User talk:Chase-san/NewTech/KakeruCode"

From Robowiki
Jump to navigation Jump to search
m (removed coment, I was thinking of vectors in cartesian coordinate systems)
 
(One intermediate revision by the same user not shown)
(No difference)

Latest revision as of 19:15, 30 July 2011

Well throwing myself on the whims of the wiki. Now I know most of you are too busy dealing with your own code and your own bugs to look at anyone elses. However I am sure there is another bug in here somewhere. If you need any additional source posted (such as the wave or Vector classes) just ask. — Chase-san 08:52, 28 July 2011 (UTC)

Only thing in addition to that is that I would like to ask how DC is worked into a movement, as my attempts thus far have proved less then successful.

What I am doing currently is:

  1. Record the current state of the robot at the given time (2 turns ago or current state for heat waves)
  2. Store those values normalized (0 to 1) in a class/array and that in the wave.
  3. When you are hit, take the state from the wave that hit and add the guessfactor to it.
  4. Store that state where you can get to it later.
  5. During Surfing, determine the recorded states that are nearest to the waves state and add danger for the GFs from them.
    • I have tried to weight these factors by how close a match the state was as well.
  6. Surf the waves according to these dangers
  7. Profit

However this kills my score, by a great deal. So I think I am missing something.

Chase-san 08:52, 28 July 2011 (UTC)

Sounds like you have the right idea there. How's your score against LT / CT? I might turn off the gun heat waves until later, too. Against learning guns, you'll probably want some way of decaying older data eventually, but I'm not sure if the VCS you're comparing to does that either. CunobelinDC is probably a good place to look for basic guidance, and of course you can also check Diamond. Sorry, maybe I'll look over the code when I have time. --Voidious 17:12, 28 July 2011 (UTC)

Codesize restricted robots are always more trouble to peek through then ones that are not. I poked through Cyanide (one of the smaller codesize top bots), BasicSurfer, and a number of my older surfers. I might take a look at Diamond later on. Right now I am just asking about normal surfing bugs rather then DC system bugs (which are not in this version). — Chase-san 19:31, 28 July 2011 (UTC)

What I'm doing in CunobelinDC is:

  1. Every tick, log the current 'scan' information into a Wave, put the Wave at the beginning of an ArrayList.
  2. When I sense that an enemy has fired, take the Wave from 2 ticks ago and add position and abs bearing from 1 tick ago.
  3. Surf the nearest wave in each direction:
    1. At each endpoint, calculate the danger as follows. For each previous hitwave:
      1. Add 1/(distance*(k + abs(hitGF - currentGF))), where distance is the manhattan distance from the surfwave's scan to the hitwave's scan
  4. Move in the direction of less danger

I would check to make sure you are moving exactly how your precise prediction thinks you are - that is probably where I have spent the majority of my time bughunting, and it has paid off =)--Skilgannon 06:23, 29 July 2011 (UTC)

That last part is interesting. Though I did try to use the same move code in both the robot and the prediction. My robot uses Precise Intersection and so it tests against the intersected gf range for a given wave. — Chase-san 07:46, 29 July 2011 (UTC)