Algoritmo A* en Java
Aqui teneis la codificacion en Java de uno de los algoritmos de Busqueda de Camino mas usados en Inteligencia Artificial
Java A* Algorithm
=================
// -*- mode: java; folded-file: t -*-
/*
* Author Geert-Jan van Opdorp
*
* Copyright (c) 1995 AI Engineering.
*
*/
package aie.astar;
// {{{ import
import java.awt.*;
import java.awt.image.*;
import java.net.*;
import java.applet.*;
import java.lang.*;
import java.util.*;
// }}}
// {{{ final class node
final class node {
State state;
int costs;
int distance;
int total;
node parent;
node(State theState, node theParent, int theCosts, int theDistance) {
state = theState;
parent = theParent;
costs = theCosts;
distance = theDistance;
total = theCosts + theDistance;
};
}
Algoritmo A* en Java




