Results 1 to 3 of 3

Thread: Path Finding algorithm help..

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre

    Path Finding algorithm help..

    Got an exam on Monday which is probably going to have this in it. However I'm having a problem understanding part of my lecturers slides.. now I could ask him but it's now the weekend!

    Heres whats from the slides:
    A commonly used algorithm is a simplified
    A* algorithm
    This simplified A* algorithm uses a cost
    function f(x) based on distance:
    f(x) = g(x) + h(x)
    where g(x) is the distance travelled from start node to node x
    where h(x) is the distance from node x to end node
    Algorithm:
    1. Compare f(x) for all possible initial nodes
    2. Select best node as the lowest distance cost
    f(x)
    3. Travel to next node(s) from the lowest
    distance cost f(x) node
    4. Compare f(x) for all of these nodes and that
    from the other possible routes already
    calculated
    5. Repeat from 2 until reached end node


    I think I understand most of it, but I don't understand how the middle dashed line is calculated? the distance that is 4.5... I would have thought you'd have to stick on the given paths?

    Thanks!

  2. #2
    Senior Member mikemikemi's Avatar
    Join Date
    Jan 2010
    Posts
    628
    Thanks
    20
    Thanked
    48 times in 48 posts

    Re: Path Finding algorithm help..

    A*'s just a search algorithm to determine least cost path from one node to another.

    In your example above h(x) isn't calculated, it's given to enable you to answer the question as it's the cost heuristic used as part of f(x) to determine the next node to search. Obviously, outside of the question someone would have to determine an admissible heuristic, for routing it'll probably be straight line distance. Therefore, I think your dashed line is a visual example of h(a), but does not represent a path on the graph.

    Hope that makes sense.

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre

    Re: Path Finding algorithm help..

    Quote Originally Posted by mikemikemi View Post
    A*'s just a search algorithm to determine least cost path from one node to another.

    In your example above h(x) isn't calculated, it's given to enable you to answer the question as it's the cost heuristic used as part of f(x) to determine the next node to search. Obviously, outside of the question someone would have to determine an admissible heuristic, for routing it'll probably be straight line distance. Therefore, I think your dashed line is a visual example of h(a), but does not represent a path on the graph.

    Hope that makes sense.
    Providing that h(x) is provided... then I think I'll be fine!. I think you could be right, at least I hope you are.

    Thanks very much

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. O2 Broadband - Fast Path
    By Jay in forum Networking and Broadband
    Replies: 4
    Last Post: 04-08-2010, 01:03 PM
  2. Path Weedkiller, no chemicals, cheaper too
    By Zak33 in forum General Discussion
    Replies: 38
    Last Post: 13-09-2009, 02:29 PM
  3. finding a course
    By Destroyer^ in forum General Discussion
    Replies: 21
    Last Post: 06-02-2008, 11:12 AM
  4. finding a scrapyard
    By 5lab in forum Automotive
    Replies: 13
    Last Post: 24-06-2006, 12:15 AM
  5. Replies: 0
    Last Post: 04-05-2005, 09:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •