A GENERAL GRAPH SEARCHING ALGORITHM

Estudies4you
A GENERAL GRAPH SEARCHING ALGORITHM in Artificial Intelligence

A GENERAL GRAPH SEARCHING ALGORITHM

Graph search algorithm is more effectively used than other tree search algorithms to overcome the problems that occurs with multiple repeated states

Algorithm for Graph Search

        Function GS(p, fg) returns s or f
        c ⟵ an empty set
        fg ← INSERT (CREATE_NODE (INITIAL_STATE .[PI], fg)
        loop do
        if EMPTY?(fg)
        then return f
        if G_T[p] (STATE[n])
        then return SOLUTION (n)
        if STATE [n] is not in C
        then add STATE [n] to C
        fg ← INSERT_ALL (EXPAND (n, p), fg)
        Where,
        GS ← graph search
        p ← Graph search
        fg ← fringe
        c ← closed
        s ← solution
        f ← failure
        n ← node
        GT ← Goal test

To Top