Visualizations from Robocode experiments


Below are two images which are visualizations of data which was logged during trials against Wallbot in Robocode.  The axes on both images are the X, Y axis of the actual battlefield. 

The first image shows where the agent prefered to use each advisor, where notably red corresponds to trackfire.  As you can see, the prefered location to use trackfire is very close to, but not exactly along the wall, which is exactly where the sweet spot against wallbot is.  Interestingly, it didn’t seem to recognize that there is a sweet spot along the upper wall as well.

 The second image indicates where the recorded (but as we learned, not necessarily actual) damage ratio changed.  Blue indicates up, and red indicates down.  Observe the very high correlation with red points above (where trackfire was used) and the blue points below (where the damage ratio was expected to go favorably for the agent.  Just as the red band along the top wall is absent above, similarly there was no found high reward band below.  

Interestingly, over the iterations, the sweet spot started at the lower left corner and “grew out” over the iterations to cover the entire lower and left walls, and then up the right wall towards the end.  I think with even more training, it would have found the upper sweet spot as well.

 These results came from a policy that only observed the advisor and current x, y coordinates as the state.  Performance hovered at about a 25% win rate, and score at about 35%.  It seems quite clear that the agent is finding the sweet spot in most places (outside at the top, as mentioned).  So why isn’t it doing better?  I have a few ideas (still not giving up)!

  1. It doesn’t “know” that it can use wallbot to get out of the center.  Since one decision tree is being used for all three advisors, whenever it asks which advisor to use in the center, the decision tree doesn’t differentiate between the three, and just says “bad,” and so all three are given the same score (which I know doesn’t make sense; wallbot should be used in the center so it can enter that dangerous region).  I plan on switching to a separate decision tree for each advisor, so I can know how bad any point is for all three advisors independently, so there is a low probability of a tie (there is a particular method im using to tie-break but in practice its pretty close to uniform, which is not good here).  In the center trackbot and spinbot should end up with much lower scores than wallbot since they basically hang out in that bad area.
  2. Instead of using x, y coordinates as state, I plan on just using distance to the nearest wall, and perhaps also distance to the nearest corner (even though my guess is that isn’t totally necessary).  That way it can generalize very easily and there shouldn’t be missing bands of goodness as occurred in this experiment.

Once I get those experiments up, I’ll have the results posted.  I think there still may be some decent results to be found with tweaks to the representation and data analysis.

Advertisements

3 thoughts on “Visualizations from Robocode experiments

  1. […] Filed under Classification, Robocode So I included the ideas which I mentioned at the end of my previous post, which […]

  2. […] derived features (distance from corner, distance from wall) with just the x, y coordinates.  I had tried this experiment previously, without the separate decision trees, and while there were some interesting trends in the policy found, the overall performance […]

  3. […] https://aresearch.wordpress.com/2008/06/05/visualizations-from-robocode-experiments/ > > The first image shows where the agent prefered to use each advisor, > where notably […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: