http://www.webplantm...t<br /> <br /> Game 8puzzle with A* Algorithm.
In function build:
void searchTree::build() { read();
makeRoot(initial);
success = false;
tree_node* curr;
heuristic = 1;
int count = 0;
while (stack.size() > 0) {
curr = stack.front();
stack.erase(stack.begin());
insert(curr);
if (curr->distance > count) {
count = curr->distance;
cout << "n = " << count << endl;
}
}
}
What it shows (court << "n = " << count) is the number of nodes opened?


Sign In
Create Account


Back to top










