Rudolf Adamkovič Personal site


Algorithm

The steps of generic search on \(G = (V, E)\), given

are:

  1. start with the frontier \(F = \{(v_1)\}\) and seen vertices \(S = \{v_1\}\)
  2. if \(|F| = 0\), return empty-handed (\(\bot\))
  3. remove some path \(p = (v_1, \ldots, v_k)\) from \(F\)
  4. when the goal predicate \(g(p)\) is true 7, return \(p\) as the solution
  5. select \(N = \{(v_1, v_2, \ldots, v_k, v^*) : v^* \notin S \land (v_k, v^*) \in E\}\)
  6. for each \(n \in N\), insert \(n\) to \(F\)
  7. for each \((v_1, v_2, \ldots, v_k, v^*) \in N\), insert \(v^*\) to \(S\)
  8. go to step 2.

Footnotes

(7)

For all \(p\), \(g(p)\) is tested after adding \(p\) to \(F\) to


© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.