Comparative Performance Analysis of BFS and Left-Hand Rule Algorithms for Autonomous Maze Navigation in OCaml

Compare the Performance of Global and Local Navigation Paradigms in Autonomous Spatial Path Planning in this Study. The first purpose is to explore the efficiency of algorithms, memory scaling and structure robustness for discrete maze-solving agents built in functional programming languages. Mechanistically, in this way, binary weights are used to convert a continuous environment into a structured two-dimensional grid matrix, the starting coordinate of the entrance is fixed at the lower-right corner, and the target destination is placed on the upper-left boundary of the exit. The two frameworks for modelling path planning are as follows: First, a state-exhaustive Breadth-First Search (BFS) tracking model is employed to use a first-in, first-out queue and a boolean tracking matrix for uniform radial, layer-by-layer exploration; second, a localized Left-Hand Rule algorithm is used, which is structured as a memoryless Finite State Machine that executes a deterministic relative turning priority queue based on real-time directional vectors, prioritising relative left turns and straight movements over relative right turns and backward turnarounds. Benchmarking in OCaml shows that BFS ensures the shortest path by exploring uniformly outwards but is space-intensive; the Left-Hand Rule is very memory-efficient but may lead to non-optimal routing or cyclic deadlocks in multiply connected topologies. BFS is very suitable for resource-intensive applications that require high precision in the end, and the Left-Hand Rule provides an efficient and light-weight paradigm only for simply connected geometric boundaries.

Paper

The full text of this publication is not hosted on 44B due to licensing.

Read it at OpenAlex

Similar papers

© 2026 NYSGPT2525 LLC