@@ -53,17 +53,17 @@ public interface PlayerAI extends Runnable, Constants {
|
||||
|
||||
/**
|
||||
* The heuristic to get the distance between the start state and the end state
|
||||
* <p>
|
||||
*
|
||||
* Manhattan Distance
|
||||
* Used for 4 direction movements
|
||||
* h = abs (current_cell.x – goal.x) +
|
||||
* abs (current_cell.y – goal.y)
|
||||
* <p>
|
||||
*
|
||||
* Diagonal Distance
|
||||
* Used for 8 direction movements
|
||||
* h = max { abs(current_cell.x – goal.x),
|
||||
* abs(current_cell.y – goal.y) }
|
||||
* <p>
|
||||
*
|
||||
* Euclidean Distance
|
||||
* Used for distance between 2 points
|
||||
* h = sqrt ( (current_cell.x – goal.x)2 +
|
||||
|
Reference in New Issue
Block a user