Professional Documents
Culture Documents
Daa Mini Project
Daa Mini Project
Algorithms
A PROJECT REPORT
Submitted by
Prabhat Kumar (21BCS8714)
Ashutosh Jaiswal(22BCS8904)
BACHELOR OF ENGINEERING
IN
Chandigarh University
MAY 2023
1
BONAFIDE CERTIFICATE
Certified that this project report “Maze Solver: Navigating Paths with Dijkstra's,
A*, and BFS Algorithms” is the bonafide work of “Prabhat Kumar, Shreya
Kesarwani and Ashutosh Jaiswal who carried out the project work under my
supervision.
SIGNATURE SIGNATURE
2
TABLE OF CONTENTS
Abstract……………………………………………………………………………………….5
CHAPTER 1. INTRODUCTION........................................................................................6-9
1.1 Identification of client………………...……………………………...................................6
1.2 Identification of Problem .................................................................................................6-7
1.3 Identification of Tasks .........................................................................................................7
1.4 Timeline ...............................................................................................................................8
1.5 Organization of the Report ...............................................................................................8-9
CHAPTER 2. DESIGN FLOW.........................................................................................10-14
2.1. Evaluation and selection of specification...........................................................................10
2.2. Design Constraint..........................................................................................................10-11
2.3. Analysis and feature finalisation subject to constraints………………………..................11
2.4. Design Flow………...........................................................................................................12
2.5. Design Selection…............................................................................................................13
2.6. Implementation plan .........................................................................................................14
3
4
ABSTRACT
Maze solving problem is a very old problem, but still now it is considered as an important
field of robotics. This field is based on decision making algorithms. The main aim of this
project is to make an Arduino based efficient autonomous maze solver robot. Two simple
maze solving algorithms “Wall following algorithm” and “Flood fill algorithm” are used to
make this robot. In this project Hardware development, software development and maze
construction had been done. For performance testing, the robot will implement to solve 4×4
maze. Capability of finding the shortest path is also verified.
5
CHAPTER 1.
INTRODUCTION
Need Identification:
Maze solving is the process of figuring out how to move from one place to another through
a maze. This topic has been a contentious study topic in the disciplines of robotics and
computer science for many years. The objective of solving a maze is to locate the shortest
or most efficient path to the destination while avoiding obstacles and dead ends.
To design software for maze solving, construct software with the combination of wall
following and flood fill algorithms then implement the software in the maze solving.
At last, make a maze 6×6 maze to verify.
6
The problem faced is whether the algorithm will be using wall-following, flood-
filling, A* search algorithm and many more methods possible or whether to combine
two or more algorithms in a robot. There are pros and
cons for every each of the algorithm that may varies the results in different efficiency
and effectiveness in solving the maze. Another consideration is that how much time
will it take to find the destination as the robot itself will take time to process it’s
surrounding depending on the algorithm being used by the robot.
• Understand and implement the wall follower and Flood fill algorithm.
• Design and build a program to solve a maze.
• Make a small 4×4 maze.
• Selecting suitable programming interface for writing the code properly and
testing it.
• Develop the code: This will be done in alignment to our project objectives.
This includes developing a facial recognition system, which is the basis of our
project.
• Testing and debugging: Testing the code to ensure that the emotion is being
measured and that the output is accurate. Debugging any issues that may arise
during testing.
• Maintenance: Fixing any bugs encountered during the testing phase and
adding improvements if needed.
7
1.4. Timeline
Chapter 1: Introduction
This chapter provides background information on the project, including the technology
that analyses facial expressions from static images to reveal information on one's
emotional state, the scope of the project, and the objectives. In this chapter, we mainly
focus on what our project is about, who will be our main clients, why we need this
project and what makes us to select this project.
This chapter will involve the steps taken in conducting the research. The design flow
will ensure that the research study will be conducted in a systematic manner to produce
reliable results.
The purpose of this chapter will be to draw meaningful conclusions from the data. In
this chapter, the data will be presented in a clear and concise manner using appropriate
charts, graphs, or tables.
8
Chapter 4: Conclusion And Future Work
9
CHAPTER 2.
DESIGN FLOW/PROCESS
1. Functional Specifications:
• Evaluation: Assess the functionality required for effective maze solving,
considering factors like pathfinding algorithms, sensor integration, and decision-
making processes.
• Selection: Choose specifications that align with the project's primary goal of
navigating mazes efficiently.
2. Performance Specifications:
• Evaluation: Define performance metrics such as speed, accuracy, and reliability.
• Selection: Select specifications that optimize performance within the constraints
of the project.
3. Sensory System:
• Evaluation: Examine sensor options for environment perception, such as
cameras, infrared sensors, or lidar.
• Selection: Choose a sensory system that suits the maze-solving requirements,
considering factors like precision and adaptability.
4. Decision-Making Algorithms:
• Evaluation: Explore various algorithms for decision-making in maze navigation.
• Selection: Select algorithms that strike a balance between computational
efficiency and effective decision-making.
5. Power Requirements:
• Evaluation: Analyze power needs based on the selected features and
components.
• Selection: Opt for power-efficient specifications to extend the maze solver's
operational duration.
1. Regulations:
• Ensure compliance with any relevant industry standards and
regulations.
• Adhere to safety guidelines and protocols in the design and implementation.
10
2. Economic:
• Stay within budget constraints for materials, components, and overall project
cost.
• Consider the economic feasibility of the project in terms of potential benefits and
returns.
3. Environmental:
• Choose materials and manufacturing processes with minimal environmental
impact.
• Consider energy efficiency and sustainable practices in the design.
4. Health:
• Prioritize user safety in the operation of the maze solver.
• Minimize any potential health risks associated with the project.
5. Manufacturability:
• Design components that are feasible to manufacture using available
technologies.
• Consider ease of assembly and maintenance during the
manufacturing process.
1. Regulations:
• Analysis: Examine each feature to ensure compliance with industry regulations
and standards.
• Finalization: Select features that align with regulatory requirements, avoiding
any that may lead to non-compliance.
2. Economic:
• Analysis: Evaluate the cost implications of each feature, including development,
manufacturing, and maintenance costs.
• Finalization: Choose features that offer a balance between functionality and cost-
effectiveness, staying within budget constraints.
3. Environmental:
• Analysis: Assess the environmental impact of materials and processes
11
associated with each feature.
• Finalization: Opt for features that minimize the project's ecological footprint and
promote sustainability.
4. Health:
• Analysis: Identify features that may have health implications for users or those
involved in the manufacturing process.
• Finalization: Prioritize features that enhance user safety and well-being,
eliminating any potential health risks.
5. Manufacturability:
• Analysis: Examine the feasibility of manufacturing each feature, considering
available technologies and resources.
• Finalization: Optimize the design for manufacturability, choosing features that
are practical and efficient to produce.
12
2.5. Design selection
13
2.6. Implementation plan/methodology
14
CHAPTER 3.
RESULTS ANALYSIS AND VALIDATION
3.1.2 A* Algorithm
15
3.1.4 Developing the code
a=[
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0 ,0, 0, 0, 1, 0, 1, 1, 1, 1],
[1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0 ,0, 0, 0, 1, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0 ,0, 0, 0, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
]
zoom = 20 borders = 6
start = 1,1
end = 5,19
def print_m(m):
for i in range(len(m)):
for j in range(len(m[i])):
print( str(m[i][j]).ljust(2),end=' ') print()
16
im = Image.new('RGB', (zoom * len(a[0]), zoom * len(a)), (255,
255, 255))
draw = ImageDraw.Draw(im) for i in
range(len(a)):
for j in range(len(a[i])): color
= (255, 255, 255)
r=0 if a[i][j]
== 1: color = (0,
0, 0) if i == start[0]
and j == start[1]:
color = (0, 255, 0) r=
borders if i == end[0] and j ==
end[1]:
color = (0, 255, 0)
r = borders
draw.rectangle((j*zoom+r, i*zoom+r, j*zoom+zoom-r-1, i*zoom+zoom-
r-1), fill=color) if m[i][j] > 0: r = borders
draw.ellipse((j * zoom + r, i * zoom + r, j * zoom + zoom - r
- 1, i * zoom + zoom - r - 1),
fill=(255,0,0)) for u
in range(len(the_path)-1):
y = the_path[u][0]*zoom + int(zoom/2) x=
the_path[u][1]*zoom + int(zoom/2) y1 =
the_path[u+1][0]*zoom + int(zoom/2) x1 =
the_path[u+1][1]*zoom + int(zoom/2)
draw.line((x,y,x1,y1), fill=(255, 0,0), width=5)
draw.rectangle((0, 0, zoom * len(a[0]), zoom * len(a)), outline=(0,255,0),
width=2)
images.append(im)
m = [] for i in range(len(a)):
m.append([]) for j in
range(len(a[i])):
m[-1].append(0)
i,j = start
m[i][j] = 1
k = 0 while m[end[0]][end[1]] == 0:
k += 1 make_step(k)
draw_matrix(a, m)
17
i, j = end k = m[i][j] the_path = [(i,j)]
while k > 1: if i > 0 and m[i - 1][j]
== k-1: i, j = i-1, j
the_path.append((i, j))
3.1.5 Result
18
CHAPTER 4.
CONCLUSION AND FUTURE WORK
4.1. Conclusion
Robots that can navigate mazes have a huge range of possible uses in a variety of industries.
There are several potential applications for these robots. Maze-solving robots can be
employed in search and rescue operations to find and save individuals in need by
navigating through challenging terrain like buildings or rubble. This can help save a lot of
time and potentially save lives. Robots that can solve mazes can be utilized in
manufacturing and logistics to efficiently transfer products and supplies through factories
or warehouses. We may anticipate seeing more effective and intelligent maze-solving
robots in the future that can carry out more difficult jobs with increased accuracy and
precision thanks to the growing advances in robotics technology. Artificial intelligence and
machine learning can also be used to improve the capabilities of these robots and increase
their adaptability to various settings and tasks. Overall, maze-solving robots have a bright
future, and in the years to come, we may anticipate more fascinating advancements in this
area.
19
REFERENCES
[1] MSP-EXP432P401R: Out of Box MSP-EXP432P401R | Out of Box - MSP-EXP432P401R -
Welcome 1.20.00.45 documentation. (n.d.). Retrieved April 7, 2023, from
https://software-
dl.ti.com/msp430/msp430_public_sw/mcu/msp430/SIMPLELINK_MSP432_S
DK/1.20.00
.45/exports/docs/simplelink_mcu_sdk/project0/project0/docs/MSPEXP432P401R.htm
l
[2] 2.1. System Requirements - Code Composer Studio 12.2.0 Documentation. (n.d.). Retrieved April
7, 2023, from https://software-
dl.ti.com/ccs/esd/documents/users_guide/ccs_overview.html
[3] Wikimedia Foundation. (2023, June 13). Code composer studio. Wikipedia.
https://en.wikipedia.org/wiki/Code_Composer_Studio
[4] Maze Solving Robot with Automated Obstacle Avoidance Redirecting from
https://doi.org/10.1016/j.procs.2017.01.192
[5] Survey on techniques used in Autonomous Maze Solving Robot IEEE Xplore. from
https://ieeexplore.ieee.org/Xplore/guesthome.jsp
[6] Autonomous Maze Solving Robot IEEE Xplore: Advanced Search from
https://ieeexplore.ieee.org/search/advanced
[7] Alamri, S., Alamri, H., Alshehri, W., Alshehri, S., Alaklabi, A., & Alhmiedat, T. (2023,
February 8). An Autonomous Maze-Solving Robotic System Based on an Enhanced
Wall-Follower Approach. Machines; MDPI. https://doi.org/10.3390/machines11020249
[8] An Efficient Algorithm for Robot Maze-Solving. (2010, August 1). IEEE Conference Publication |
IEEE Xplore. https://ieeexplore.ieee.org/document/5591159
[10] Learn How Artificial Intelligence (AI) Is Changing Robotics. (n.d.). Intel.
https://www.intel.com/content/www/us/en/robotics/artificial-intelligence-robotics.html
20
USER MANUAL
1. Introduction
• Purpose of the User Manual.
2. Getting Started
• Mapping of maze should be fixed.
• Indexing should be done.
3. Solving
• Find out all the possible path
• Estimated the shortest path.
21