DEPTH-FIRST SEARCH (DFS) ALGORITHM (FOR PATH-FINDING APPLICATIONS)
Depth-first Search (DFS) is a Searching Algorithm with many applications in other fields outside of the strictly
Traversing or Searching Trees and Graph Data Structures field. The operational part of the Algorithm commences
from the Root Node (or a user specified Node) with the aim of reaching at an again user-specified Target Node,
if that Node exists, in the Data Structure investigated. The operational characteristic of the Algorithm is that
navigates as far as possible along a Tree Branch sequentially, before backtracking and continuing with the next
of the Tree Branches. The Algorithm dates back to the 19th Century when the French mathematician Charles Pierre
Trémaux proposed a version of the today’s well known “Classical” implementation of the Algorithm as a tool assisting
in solving mazes. In this section, the “Classic” implementation of the Algorithm is given, as well as an implementation
that includes all the necessary modifications for the Algorithm to be used as a “Path-finding” Algorithm for Computer
Games applications.
DETAILS