100% found this document useful (1 vote)
2K views2 pages

CSP U6l04 Activity Guide

This document discusses the traveling salesman problem and algorithms for finding optimal paths between multiple points. It presents a heuristic for solving the traveling salesman problem that involves finding nearby nodes and looping around the area. The heuristic is tested on three levels and performs as well as brute force search, finding the shortest paths without needing to exhaustively check all possibilities. The author's heuristic is not changed as it worked well on the test cases.

Uploaded by

api-524141584
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views2 pages

CSP U6l04 Activity Guide

This document discusses the traveling salesman problem and algorithms for finding optimal paths between multiple points. It presents a heuristic for solving the traveling salesman problem that involves finding nearby nodes and looping around the area. The heuristic is tested on three levels and performs as well as brute force search, finding the shortest paths without needing to exhaustively check all possibilities. The author's heuristic is not changed as it worked well on the test cases.

Uploaded by

api-524141584
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

U6L4: The Traveling Salesman and The Limits of Algorithms

Part 1:
Prompt:
How many different paths can you find to visit all of your friends' houses?
6
Rules:
● You must start and end at your own house (bottom left)
● You can only visit each house once
● You may need to use scratch paper & pencil to sketch out different paths

Part 2:
Directions:
● Navigate to Level 2 on Code Studio
● Try to find the "best" path to visit all nodes.
● Write down a plan or heuristic for choosing a good path below:
○ Note: your heuristic may not always find the best path, but it should be close
enough

Heuristic:
Find a close node and try to create a path that loops around the area

Part 3:
Directions:
● Navigate to Level 3 on Code Studio
● Test your heuristic on three different levels.
● Write down the distance for the path your heuristic finds in the table below
● Then try to find the best version not using the heuristic (brute force) and record the distance in the
table.
○ Can you find a better path using brute force? Is your heuristic on average pretty good? Should
you update your heuristic?

Distance Distance
(Heuristic) (Brute Force)
1183 1183

1042 1042

1024 1024
Part 4:
Reflection Prompts:
How did you create your heuristic?
Thought of a path that ht each point and came back around.
Did you change your heuristic after testing it out?

No, I didn’t change it because my heuristic worked out

You might also like