A* Search: Good Estimates Find Real Solutions Faster

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 มิ.ย. 2019
  • ** Apologies for the low volume. Just turn it up **
    This video demonstrates A* search on a simple graph problem, and introduces the concept of a heuristic. An example is also shown of how A* search depends on the heuristic, and can even produce bad results of there are problems with the heuristic.

ความคิดเห็น • 11

  • @tatanichakorn7533
    @tatanichakorn7533 4 ปีที่แล้ว

    what if heuristic values are not given and the start and the goal are the same place?
    Could you explain how to find the best solution for such case?

    • @JacobSchrum
      @JacobSchrum  3 ปีที่แล้ว +3

      If you don't have a heuristic, then you can't use A* search. You would have to use some other approach, like Uniform Cost Search. However, if the start and goal are the same, then I'm not sure why you're searching in the first place.

    • @galsoftware
      @galsoftware 2 ปีที่แล้ว

      You can use dijkstra (if the costs are positive)

    • @JacobSchrum
      @JacobSchrum  11 หลายเดือนก่อน

      @@galsoftware With some small caveats, Uniform Cost Search basically is Dijkstra's Algorithm

  • @xinyuanfneg1260
    @xinyuanfneg1260 4 ปีที่แล้ว

    everything just become clear before my midterm

  • @tommcnally3231
    @tommcnally3231 3 ปีที่แล้ว

    Isn't 7 for E an inadmissible heuristic? Since 7 7

    • @tommcnally3231
      @tommcnally3231 3 ปีที่แล้ว +1

      It's also decreasing. f(E) = 15. f(F) = 14. So it's inconsistent. In this example, it finds the optimal path by accident, but it wasn't ensured.

    • @JacobSchrum
      @JacobSchrum  11 หลายเดือนก่อน

      The only routes to the goal from E worth looking at closely are E-F-D-Goal (1+2+5 = 8) and E-D-Goal (4+5 = 9) which are both greater than the heuristic value of 7, so the heuristic is admissible

    • @JacobSchrum
      @JacobSchrum  11 หลายเดือนก่อน

      @@tommcnally3231 Unfortunately, you are correct that the heuristic is not consistent. h(E) = 7 would have to be less then or equal to c(E,F) + h(F) = 1+5 = 6, but that is not true, so good catch. However, the algorithm would find the optimal path anyway with an inconsistent heuristic. All that is required to find the optimal path is for the heuristic to be admissible. Being inconsistent does mean that the search process could be inefficient, but the final result would still be optimal:
      th-cam.com/video/CJmlP03ik5g/w-d-xo.html

  • @oleksandrklimenkov5988
    @oleksandrklimenkov5988 11 หลายเดือนก่อน

    What if B-D edge had a weight of 1? Then this should be the shortest path, but your algorithm flow would not even check it

    • @JacobSchrum
      @JacobSchrum  11 หลายเดือนก่อน

      If the value of the edge from B-D were changed in the way you describe, the heuristic would not be "admissible" which is a concept explained in the next video of this playlist:
      th-cam.com/video/CJmlP03ik5g/w-d-xo.html
      Basically, A* is only guaranteed to give correct answers if you use an admissible heuristic.