Skip to content
Advertisement

Tag: a-star

A* pathfinding algorithm is being semi-greedy

So I have been trying to implement the A* pathfinding algorithm for a 2D tilemap in Java from this video: https://www.youtube.com/watch?v=-L-WgKMFuhE. I tried following the pseudocode and not enough details, I felt, were not explained greatly, especially the idea of the G cost. So, I decided to go into the actual code the video creator wrote and used a lot

Java/Processing: A* graph node based game

I am trying to build a little ‘simulation’ game. This game has no real purpose, I am just making small little projects while I try and learn the in’s and out’s of some beginner programming. This is my goal: On the processing canvas, there are multiple ‘Nodes’ that represent where a player can move to. The user will input where

Stuck implementing Wikipedia’s A* (“A star”) algorithm

I’m implementing the A* search algorithm from this pseudo on wikipedia’s article: I’m stuck on the line where I’m asked to retrive the node in openSet with the lowest f value. When has openSet been filled? With what? Should it just have start on the first run? I also don’t undestand the reconstruct path pseudo: How should that pseudo instructions

Advertisement