Category : a-star

I’m currently working on A* algorithm small project but I think there is a problem with manhattan distance. I mean, when the code equals to: inline int32 manhattanDistance(Node* startNode, Node* endNode) { int32 deltaX = std::abs(startNode->position.x – endNode->position.x); int32 deltaY = std::abs(startNode->position.y – endNode->position.y); return deltaX + deltaY; } It’s returning the path as: Valid ..

Read more

I just started to learn c++ at university, I have to create a pacman in c++. I wanted to integrate the algorithm of A. Star, I tried ^^, I think I have included it well however when the distance of the target is greater than 4, he sends me the list but not with the ..

Read more