Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Using Python, create a script to find the shortest path from point S (start) to point G (goal) through a discretized workspace (6

image

1. Using Python, create a script to find the shortest path from point S (start) to point G (goal) through a discretized workspace (6 rows by 12 columns) such as this ("." designates a cell of free space, "X" represents a cell fully occupied by an obstacle). Use 4-connectivity (research the subject of connectivity, e.g., here): X X X X X X X X X X X X 2. Find a way to visualize the calculated path, including the path length, with the final state of the wave expansion. 3. Change to 8-connectivity, recalculate, visualize, and interpret the results. 4. Modify the code so that the coordinates of "S" and "G" are randomly generated (obviously, the locations of those cannot be in the obstacle area). Run this simulation in a loop. At the end of each simulation, display the path. For the sake of the exercise, repeat the loop just three times. Either connectivity (4 or 8) is acceptable. For simplicity, you can restrict randomly generated "S"s to the left half and "G"s to the right half.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To solve the problem well use the A algorithm to find the shortest path from the start point S to th... 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

Business Logistics Supply Chain Management

Authors: Ronald H. Ballou

5th edition

130661848, 978-0131076594, 0131076590, 978-0130661845

More Books

Students also viewed these Programming questions