Difference between revisions of "Range Search"

From Robowiki
Jump to navigation Jump to search
m (knn illustration comment updated)
m (format fix)
Line 15: Line 15:
 
| [[File:Knn.gif|K nearest neighbours algorithm]] || [[File:Rs.gif|Range search algorithm]] || [[File:Vcs.gif|Visit count stats algorithm]]
 
| [[File:Knn.gif|K nearest neighbours algorithm]] || [[File:Rs.gif|Range search algorithm]] || [[File:Vcs.gif|Visit count stats algorithm]]
 
|-
 
|-
|align="center"| [[Dynamic Clustering|k-nearest neighbours with Euclidian distnace formula]] algorithm ||align="center"| '''Range search''' algorithm ||align="center"| [[Visit Count Stats]] algorithm
+
|| [[Dynamic Clustering|k-nearest neighbours ]] algorithm <br> with Euclidian distnace formula ||align="center"| '''Range search''' algorithm ||align="center"| [[Visit Count Stats]] algorithm
 
|}
 
|}
  

Revision as of 08:29, 9 August 2011

Range search is a data analysis algorithm, which is very similar to k-NN. The main difference is that k-NN gets a fixed number of data points while range search does not.

How it works

Record state (aka situation, turn snapshot, etc.) with some set of attributes (velocity, acceleration, x, y, etc.). When you need data, calculate some hypercube centered at the current situation. For example, if the current situation is {velocity = 8, acceleration = 0, x = 200, y = 200}, then hypercube can be described as the set of intervals {[6,8], [0,0], [180, 220], [180, 220]}. Then iterate through all data and select the points that are contained by this hypercube. Then use these data points for targeting, movement, etc.

Advantages

The main advantage of range search over the k-NN algorithm is that range search gets only corresponding data. The k-NN algorithm can get data points that do not correspond to the current situation if k is too high for the current data, or it may ignore relevant data, if k is much less than the number of data points 'around' the current situation

Illustrations

Legend:

  • little black dots - data points
  • big red dots - current situation
  • red areas - area of data points used for data analysis
K nearest neighbours algorithm Range search algorithm Visit count stats algorithm
k-nearest neighbours algorithm
with Euclidian distnace formula
Range search algorithm Visit Count Stats algorithm

See also