A* Search Algorithm

后端 未结 2 1750
一向
一向 2021-02-13 15:36

I would like to have something clarified with regards to the following A* Search example:

\"A*

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-13 15:54

    This is taking the current best item, removing it, and replacing it with the expansion (inserting the new items into appropriate positions in the list). Think of it like this:

    Expand S:

    • {S,A} f = 1+5 = 6
    • {S,B} f = 2+6 = 8

    Expand A:

    • {S,A} f = 1+5 = 6
    • {S,B} f = 2+6 = 8
    • {S,A,X} f = (1+4)+5 = 10
    • {S,A,Y} f = (1+7)+8 = 16

    Expand B:

    • {S,B} f = 2+6 = 8
    • {S,A,X} f = (1+4)+5 = 10
    • {S,B,C} f = (2+7)+4 = 13
    • {S,A,Y} f = (1+7)+8 = 16
    • {S,B,D} f = (2+1)+15 = 18

提交回复
热议问题