Python Forum
Traveller salesman backtracking
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Traveller salesman backtracking
#2
Sure. Let's start by saying, lose the single letter variables and use descriptive names instead. Python encourages this. In a few months time, with several programs under your belt, even you will forget what they stand for. Next, you have way to many 'globals' and they should be avoided as much as possible. You say the output of '0-3-3-3-0' is incorrect, what result were you expecting? It is often helpful, when you provide a snippet of the entire program, to include some "real" values we can test with as well as the actual output you are getting.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
Traveller salesman backtracking - by synced - Oct-21-2017, 09:20 PM
RE: Traveller salesman backtracking - by sparkz_alot - Oct-22-2017, 02:15 PM
RE: Traveller salesman backtracking - by synced - Oct-22-2017, 05:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Travelling Salesman Problem huhandrey 2 2,172 Oct-11-2020, 02:55 AM
Last Post: deanhystad
  Algorithm to solve a case of Travelling Salesman Problem Ale888 3 3,259 Dec-11-2018, 07:49 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020