It reduces symmetry in the search procedure by means of graph pruning, eliminate certain nodes in the grid based on assumptions that can be made about the current node's neighbors, as long as certain conditions relate to the grid are satisfied. As a consequence, the algorithm can consider long" jumps" along straight (horizontal, vertical and diagonal) lines in the grid, rather than the small steps from one grid position to the next that ordinary A * considers. Harabor and Grastien's original publication provides algorithms for neighbour pruning and identifying successors. These optimizations include explore columns or rows of nodes instead of individual nodes, pre-computing" jumps" on the grid, and stronger pruning rules. The original algorithm for neighbour pruning allowed corner-cutting to happen, which meant the algorithm could only be used for move agents with zero width, restricting its application to either real-life agents (e.g. robotics) or simulations (e.g. many games).

COMING SOON!

```
#include <stdio.h>
#include <math.h>
#define min(X,Y) ((X) < (Y) ? (X) : (Y))
int jump_search(int* arr, int x);
int n;
int main() {
int arr[] = { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610 };
n = sizeof(arr) / sizeof(int);
int x = 55;
int index = jump_search(arr, x);
printf("\nNumber %d is at index %d\n", x, index);
}
int jump_search(int* arr, int x) {
int step = floor(sqrt(n));
int prev = 0;
while (*(arr + (min(step, n) - 1)) < x) {
prev = step;
step += floor(sqrt(n));
if (prev >= n)
return -1;
}
while (*(arr + prev) < x) {
prev = prev + 1;
if (prev == fmin(step, n))
return -1;
}
if (*(arr + prev) == x)
return prev;
return -1;
}
```