Skip to content
Kul Sapkota edited this page Jun 3, 2017 · 2 revisions

Derivation Search Algorithm is a critical part of the NASA swarmathon competition. We have square ground to find the cube. We do not know the distribution of cubes in the competition, so we have to cover all sides of the ground. Spiral search is one of the easiest search to implement and at the same time quite suitable for our kinds of situation.

The mathematical relation between coordinates, distance with the center and the angle between the center and that point theta are utilized to derive the equations needed for the spiral search. The mathematical relation and desired search pattern are as follows, [caption id="attachment_195" align="aligncenter" width="500"] Maths for spiral search[/caption]

Implementation Once, we understand the math behind this. Implementation is straight forward. We choose a starting radius: we complete a circle increasing the angle from 0 Degree to 360 Degree. After completing a round we increase the radius and repeat until the radius reaches the half size of the arena. If it reaches the maximum length we reset the search radius and repeat.

Clone this wiki locally