I need to implement the following requirment, using a search algorithm(A STAR, BEST FIRST): n vehicles occupy squares (1, 1) through (n, 1) (i.e., the bottom row) of an n×n grid. The vehicles must be moved to the top row but in reverse order; so the vehicle i that starts in (i, 1) must end ..

#### Category : a-star

I have been give a problem in which I am provided with user-entered matrix (rows and columns). User will also provide Start State (row and column) and the Goal State. The job is to use A* search to find the path from the start node to the goal node. A sample matrix is provided below, ..

I’m trying to implement an A* algorithm for pathfinding in my 3D grid. I’ve been following a tutorial but I’m not getting a valid path. I’ve stepped through my code to find out what’s going on, but I don’t know how to solve the problem. For the most basic test I’m just using a 2-D ..

My algorithm works almost well, but unfortunately, when it reaches a corner, it can’t move further. Can you give me some hints on what I am doing wrong? If the algorithm does not encounter obstacles, it is free to move left, right, up and down. However, if on a corner, as in the map I ..

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 ..

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 ..

I’m implementing A* algorithm which requires a faster query of data, the best way I could think of is Hash Tables (unordered_map in cpp) but the computation time is little high(4 micro secs for each query) for my use case. A*: A* is a Heuristic-based search method to find the optimal solution in a given ..

I’m trying to create an A star algorithm in c++. However, the target node is never found. I know that the function is incomplete because the path is never updated but that is not relative to my problem. I think I’m doing something wrong with the tentative G score and the neighbor G score at ..

we have a project that makes a robot that finds the shortest route in anywhere from a to b. The image we have is a closed 2D white world with black walls and obstacles. I want to implement the A* pathfinding by first using brushfire algorithm. I successfully managed to use brushfire algorithm in my ..

I am attempting an online coding challenge wherein I am to implement a pathfinding algorithm that finds the shortest path between two points on a 2D grid. The code that is submitted is tested against a number of test cases that I, unfortunately, am unable to see, but it will however tell me if my ..

## Recent Comments