The Objective Of This Assignment Is To Apply The Concepts Of Threading The objective of this assignment is to apply the concepts of threading by developing a simple C++ Posix threads program to discover the surroundings and the shortest path in a 2D maze. This assignment requires you to write a multi-threaded C/C++ “Pathfinder” program to discover the surroundings of a jungle maze. Each [x, y] location in the maze represents a ‘grid area’ of the jungle terrain. You are provided with header files that contain necessary methods, which you must use to implement your main.cpp file. Your program should utilize these functions/methods to generate the output exactly as specified in the provided document.
Paper For Above instruction This assignment tasks the development of a multi-threaded program in C++ utilizing POSIX threads (pthreads) to explore a complex 2D maze, representing jungle terrain. The goal is to discover surroundings and find the shortest path from a start point to an endpoint within this maze. By employing multi-threading, the program aims to improve efficiency through concurrent exploration of the maze, mimicking real-world jungle navigation where multiple paths are explored simultaneously. The core challenge involves designing an algorithm that can effectively utilize threads to explore multiple nodes or locations within the maze concurrently without conflicts or overlaps. This requires careful synchronization and thread management to ensure accurate maze exploration and shortest path computation. To facilitate this, provided header files contain methods that simplify maze data access, environment discovery, and pathfinding logic. The project begins by understanding the functions provided within the header files, which might include methods for grid status checks, environment exploration, neighbor retrieval, and shortest path algorithms. These functions serve as building blocks where the core logic of threading and pathfinding is implemented. The program must adhere to the provided output format exactly, which implies that the solution must be precise in the sequence and formatting of the printed results. The multi-threaded approach is particularly suitable here because maze exploration is inherently parallelizable. Multiple threads can explore different regions of the maze concurrently, reducing the overall discovery time. Effective thread management, synchronization primitives like mutexes or semaphores, and thread-safe data structures are essential to prevent race conditions during environment discovery and shortest path calculation.