Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MAZE SOLVER project Description: You are placed in a maze with a starting point S . Your need to find your way to goal G

MAZE SOLVER project
Description: You are placed in a maze with a starting point S.
Your need to find your way to goal G AS QUICKLY(as few cells/moves as possible) AS POSSIBLE and collect some coins on the way.
Walls are X, each cell in a passage has some coins 0 to 9. So if you have an X --> no passage.
Moves are 1 unit each.
You are ALLOWED TO MOVE DIAGONALLY
Outside maze is lava. (just like a wall; you cant go there ).
Write a program (PROVIDE SINGLE/MULTIPLE FILES) in Python to read text files and solve the maze.
EXAMPLE: if youre using Dijkstra, theres a different implementation (because there are multiple solutions for this). Please, also indicate the solution (what e.g algorithm you used).
OTHER EXPLANATIONS!! PLEASE, ALSO READ:
In this project:
---> For the 11x11 maze (Mazes_to_be_read... file), you can simply CHECK YOUR ANSWER that you receive by the code output through doing it in a piece of paper. That means your algorithmic approach may be correct, e.g if you approach is Dijkstra.
---> For the other TWO mazes, it is going to take very long to do it in paper, so just MAKE SURE THE ALGORITHMIC APPROACH GIVES THE RIGHT ANSWER, SO LOGIC IS CORRECT.
--->Find S, and the path.
----> ALSO VERY IMPORTANT: There may be 2 ways to reach the goal BUT find 1 that gets you out the QUICKEST!!!!!!!
----> E.g 8 and 6 may be valid solutions, but not ideal (you skip the corners)...
ALSO SUBMIT:
1. Also, besides everything I said above, submit solutions to all 3 mazes as text. (single row separated by comma for example 533,1984,9000)
2. In text also provide time and space complexity of your solution. Common algorithms might have different implementations and different complexities.
Solution should be sum of coins collected on the way out of maze!!!!!!!!!!
If there are multiple solutions with same number of moves, I want to see the solution with LEAST coins collected (as I said earlier).
EXAMPLE:
So, this is the maze. You have to get up at the left corner G (7x7 maze)
Diagonal moves -->1 unit each (so NOT Eucleadean, so NOT sqrt(2)).
Youre trying to get out of the maze as soon as possible.
G503746
0XXXXX4
3XS6138
3XXXXXX
1X19736
5XXXXX8
3375042
Solution is 6+1+3+(we skip 8 since we move diagonally)+4+(we skip 6 since we move diagonally)+4+7+3+0+5==33. The answer in this example is 33!!! FOR THIS CASE.
NOW THAT YOU UNDERSTOOD THE LOGIC BY AN EXAMPLE, THE ONLY FILES THAT YOU SHOULD TAKE IN CONSIDERATION FOR THIS PROJECT ARE:
maze_11x11.txt
maze_31x31.txt
maze_101x101.txt (THEY'RE SHOWN IN THE SCREENSHOTS ATTACHED)
So, the maze_11x11.txt:
-----------------------------------------------------------------------
G95X823X101
4X1X7X2X0X8
6X237X569X2
0xxxxxxxxx0
6X858X41707
2X5XXX1XXXX
7X3X525XS68
4X7X9XXXXX6
5X4X6X33242
5X8X3X9XXXX
100X8096058
-------------------------
tHE next one, maze_31x31.txt:
---------------------------------
G06X5X5739507778202X8669926X587
3X1X7X0XXXXXXX0XXXXX6XXX8XXX8X5
2X934X6XS0977X005672965X17932X6
7XXXXX5XXXXX0XXX7XXXXXXX5XXXXX4
27635X081X2X958X8X9X595X1X433X3
XXXX2XXX7X1XXX1X1X3X0X3XXX4X4X2
432X4495878X090X565X5X25196X115
3X5X1XXXXXXX9XXXXXXX1XXXXXXXXX6
4X2X709X4X192X73130X789X95415X7
0X8XXX5X6X9XXX9XXX5XXX1X2XXX0X2
1X6X92690X17269X4X932X2X734X4X7
1X2XXXXX0XXXXXXX8XXX7X7XXX4X4XX
6X99644X8X47193X213X2X83349X477
4XXXXX3X6X8X1X8XXX7X9XXXXXXXXX4
0X968X3X9X5X8X6X080X65959X59913
2XXX4X9XXX8X6X9X6X2XXXXX2X3XXX5
786X3X75365X6X909X813X289X996X3
XX2X2XXXXXXX2XXXXXXXXX5XXX9X1X8
5X1X24193X345X490X88048X5X0X9X9
4X9X2XXXXX7XXX9X7X1XXXXX3X6X4XX
2X2X609X086X248X019X400X724X223
3X3XXX5X7X8X1XXXXXXXXX5X0XXXXX1
8X26459X6X3X1X635X968X539X79923
5XXXXX9X6XXX2X2X2X9X7XXX8X2XXX4
0X04885X17886X6X068X099X9X4X828
3X0XXXXXXXXXXX2XXXXXXX9XXX2XXX0
732X9X7723643X381X638X389X207X8
3XXX5X6XXXXX8X3X7X9X2XXX3XXX1X3
1X81966X882X677X3X9X792X62111X9
6XXXXXXX1X7XXXXX5X2X1XXXXXXXXX1
880688547X7417695X3X53218550162
--------------------------------------
There's also the maze_101x101 attached in the screenshot. PLEASE, I NEED YOUR HELP TO PROVIDE ME WITH CORRECT ANSWER
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

types of programing paradigms

Answered: 1 week ago