Skip to content

Instantly share code, notes, and snippets.

@Lorenzobattistela
Created August 25, 2021 00:46
Show Gist options
  • Save Lorenzobattistela/1a5567ab9289b265a4885bd8e0f91181 to your computer and use it in GitHub Desktop.
Save Lorenzobattistela/1a5567ab9289b265a4885bd8e0f91181 to your computer and use it in GitHub Desktop.
Repeat:
1- If frontier is empty:
-Stop. There is no solution to the problem
2- Remove a node from the frontier. This is the node that will be considered
3- If the node contains the goal state:
-Return the solution. Stop.
Else:
Expand the node (find all the new nodes that could be reached from this node),
and add resulting nodes to the frontier.
Add the current node to the explored set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment