Thread: A* pathfinding

  1. #1
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    798

    A* pathfinding

    I am possibly looking to develop an A* pathfinding algorithm for part of my project to navigate an entity around a 2D map. I have seen the algorithm implemented using a linked list. Although I have covered linked lists in my studies and would feel confident using them, I would prefer if possible to iterate over an array instead. Does anyone know if this can be done or are the 'next' and 'previous' pointer elements of a linked list going to be crucial in an algroithm such as this?

  2. #2
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511

    Question

    What does the algorithm do? Show us some code?
    Mr. C: Author and Instructor

  3. #3
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    798
    Sorry, I thought it was a pretty standard algorithm that people would be familiar with. This is the example implementation I found on the web and the link is the tutorial of the algorithm.

    http://www.geocities.com/jheyesjones/astar.html

  4. #4
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511

    Cool

    OK, now I know what the A* algorithm does. I did not know this and had to take an AI course in grad school.

    You can have array based lists. Most of your Data Structure books have examples. I am looking at C++ Data Structures and they have an array based list ADT. Other DS texts have something similar.

    Make sense.
    Mr. C: Author and Instructor

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pathfinding question
    By h3ro in forum General AI Programming
    Replies: 13
    Last Post: 05-15-2008, 10:29 AM
  2. All-angle pathfinding algorithm?
    By TriKri in forum Game Programming
    Replies: 6
    Last Post: 06-20-2007, 07:26 PM
  3. Pathfinding AI? (Not the A* Algorithim)
    By harryP in forum C++ Programming
    Replies: 22
    Last Post: 08-01-2003, 02:32 PM
  4. AI (Pathfinding)
    By jdinger in forum Game Programming
    Replies: 7
    Last Post: 04-16-2003, 10:20 AM
  5. AI (pathfinding) tutorial
    By dirkduck in forum Game Programming
    Replies: 3
    Last Post: 02-09-2002, 12:04 PM