|
@@ -149,6 +149,7 @@ def tenzing_norgay(cities):
|
|
|
|
|
|
|
|
|
# returns the hill climbing solution w/ x random restarts for a given input
|
|
|
+# if you want x restarts, call with x + 1
|
|
|
def reinhold_messner(cities, x):
|
|
|
curcost = length(cities)
|
|
|
curpath = copy.deepcopy(cities)
|
|
@@ -278,7 +279,7 @@ def main():
|
|
|
|
|
|
for i in range(0, 3):
|
|
|
axes[i].plot(range(1, 11), solution_steps[i], label = "Steps to Solution", color = 'b')
|
|
|
- axes[i].set_xlabel("Problem Instance w/ " + i + " cities")
|
|
|
+ axes[i].set_xlabel("Problem Instance w/ " + str(i) + " cities")
|
|
|
axes[i].set_ylabel("Steps Taken", color = 'b')
|
|
|
axis_twin = axes[i].twinx()
|
|
|
axis_twin.plot(range(1, 11), solution_scores[i], label = "Solution Cost/Distance", color = 'r')
|