{ "cells": [ { "cell_type": "markdown", "id": "forbidden-beast", "metadata": {}, "source": [ "### An engineering problem from \"Engineering Optimization\" by Xin-She Yang" ] }, { "cell_type": "markdown", "id": "removed-toyota", "metadata": {}, "source": [ "Goal: Design an optimal spring (cheapest / least material needed) that does the job. Parameters we can change: $d$, the diameter of the coil; $L$, the length of the spring; $w$, the thickness of the wire." ] }, { "cell_type": "markdown", "id": "located-architecture", "metadata": {}, "source": [ "Task: Minimize $$(2+L)dw^2$$ subject to the constraints\n", "\\begin{align*}\n", "g_1(L,d,w) &= 1 - \\frac{d^3L}{7178w^4} \\leq 0\\\\[5pt]\n", "g_2(L,d,w) &= \\frac{4d^2 - wd}{12566dw^3 - w^4} + \\frac{1}{5108w^2} - 1 \\leq 0\\\\[5pt]\n", "g_3(L,d,w) &= 1 - \\frac{140.45w}{d^2L} \\leq 0\\\\[5pt]\n", "g_4(L,d,w) &= \\frac{w+d}{1.5} - 1 \\leq 0\n", "\\end{align*}\n", "with boundary conditions\n", "$$\n", "0.05 \\leq w \\leq 2.0\n", "\\qquad\\qquad\n", "0.25 \\leq d \\leq 1.3\n", "\\qquad\\qquad\n", "2.0 \\leq L \\leq 15.0\n", "$$" ] }, { "cell_type": "code", "execution_count": 2, "id": "removable-stanford", "metadata": {}, "outputs": [], "source": [ "import math\n", "import random" ] }, { "cell_type": "code", "execution_count": 3, "id": "graphic-connection", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "7.191027336174431" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def random_in_range(lower, upper):\n", " return random.random() * (upper - lower) + lower\n", "random_in_range(2, 15)" ] }, { "cell_type": "code", "execution_count": 4, "id": "regional-brother", "metadata": {}, "outputs": [], "source": [ "def g1(L,d,w):\n", " return 1 - d**3 * L / (7178 * w**4)\n", "\n", "def g2(L,d,w):\n", " return (4*d**2 - w*d)/(12566 * d * w**3 - w**4) + 1/(5108*w**2) - 1\n", "\n", "def g3(L,d,w):\n", " return 1 - 140.45 * w / (d**2*L)\n", "\n", "def g4(L,d,w):\n", " return (w+d)/1.5 - 1\n", "\n", "def satisfies_constraints(L,d,w):\n", " return g1(L,d,w) <= 0 and g2(L,d,w) <= 0 and g3(L,d,w) <= 0 and g4(L,d,w) <= 0" ] }, { "cell_type": "code", "execution_count": 5, "id": "impossible-height", "metadata": {}, "outputs": [], "source": [ "def score(L,d,w): # w-squared is \"w**2\" not \"w^2\"\n", " return (2+L)*d*w**2" ] }, { "cell_type": "code", "execution_count": 6, "id": "physical-photograph", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(14.937625225852454, 1.2947285994812368, 1.9943841844620613)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def tweak(L,d,w):\n", " delta_w = 0.01\n", " delta_d = 0.01\n", " delta_L = 0.1\n", " \n", " new_w = w + random_in_range(-1, 1) * delta_w\n", " while new_w < 0.05 or new_w > 2:\n", " new_w = w + random_in_range(-1, 1) * delta_w\n", " \n", " new_d = d + random_in_range(-1, 1) * delta_d\n", " while new_d < 0.25 or new_d > 1.3:\n", " new_d = d + random_in_range(-1, 1) * delta_d\n", " \n", " new_L = L + random_in_range(-1, 1) * delta_L\n", " while new_L < 2 or new_L > 15:\n", " new_L = L + random_in_range(-1, 1) * delta_L\n", " \n", " return (new_L, new_d, new_w)\n", " \n", "tweak(15, 1.3, 2.0)" ] }, { "cell_type": "code", "execution_count": 7, "id": "american-sleep", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(8.503440073556614, 1.215130153306415, 1.954922170217535)\n" ] } ], "source": [ "def random_solution():\n", " return (\n", " random_in_range(2, 15),\n", " random_in_range(0.25, 1.3),\n", " random_in_range(0.05, 2),\n", " )\n", "print(random_solution())" ] }, { "cell_type": "code", "execution_count": 8, "id": "b1c47481", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "4" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# what does the * do\n", "def test(num1, num2):\n", " return num1 + num2\n", "L = [1,3]\n", "test(*L)" ] }, { "cell_type": "code", "execution_count": null, "id": "4ad15d13", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "fb12fc01", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "c1faf301", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 9, "id": "alien-queensland", "metadata": {}, "outputs": [], "source": [ "def hill_climbing():\n", " \n", " start = random_solution()\n", " while not satisfies_constraints(*start):\n", " start = random_solution()\n", " sol = start\n", " value = score(*sol)\n", "\n", " bad = 0\n", " while True:\n", " new_sol = tweak(*sol)\n", " while not satisfies_constraints(*new_sol):\n", " new_sol = tweak(*sol)\n", " new_value = score(*new_sol)\n", " if new_value < value:\n", " bad = 0\n", " sol = new_sol\n", " value = new_value\n", " \n", " else:\n", " bad += 1\n", " if bad > 1000:\n", " print(value)\n", " return sol\n", " \n" ] }, { "cell_type": "code", "execution_count": null, "id": "d694313b", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 10, "id": "weighted-veteran", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.0068805520270037125\n", "(9.006314472438776, 0.2500170690136024, 0.05000412741244301)\n", "-2.1363839258361597 -0.31699706862769494 -11.475017697295582 -0.799985869049303\n", "0.0068805520270037125\n" ] } ], "source": [ "sol = hill_climbing()\n", "#sol = [2.02310938, 0.25113418, 0.05218225]\n", "# L, d, w\n", "print(sol)\n", "print(g1(*sol), g2(*sol), g3(*sol), g4(*sol))\n", "print(score(*sol))" ] }, { "cell_type": "code", "execution_count": 11, "id": "biblical-kentucky", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.0027511436522230925" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "old_sol = [2.02310938, 0.25113418, 0.05218225]\n", "score(*old_sol)" ] }, { "cell_type": "code", "execution_count": null, "id": "wired-meeting", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 12, "id": "banner-paragraph", "metadata": {}, "outputs": [], "source": [ "# smarter: sample 1000 tweaks to find a good initial_temp that gives a desired p_0\n", "# or: heat the system slowly until the % of worsening solutions is what you want\n", "initial_temp = 0.005\n", "alpha = 0.99\n", "final_temp = initial_temp / 1000\n", "trials_per_temp = 10000\n", "\n", "start = random_solution()\n", "while not satisfies_constraints(*start):\n", " start = random_solution()\n", "sol = start\n", "value = score(*sol)" ] }, { "cell_type": "code", "execution_count": 13, "id": "intended-theater", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gen #1: temp = 0.005000, best score = 0.00318075, cur score = 0.01317111, worse accepted = 75.36%\n", "Gen #2: temp = 0.004950, best score = 0.00318075, cur score = 0.00921724, worse accepted = 59.21%\n", "Gen #3: temp = 0.004901, best score = 0.00318075, cur score = 0.02757053, worse accepted = 67.20%\n", "Gen #4: temp = 0.004851, best score = 0.00318075, cur score = 0.00899667, worse accepted = 58.91%\n", "Gen #5: temp = 0.004803, best score = 0.00318075, cur score = 0.01563525, worse accepted = 66.60%\n", "Gen #6: temp = 0.004755, best score = 0.00318075, cur score = 0.01675689, worse accepted = 56.82%\n", "Gen #7: temp = 0.004707, best score = 0.00318075, cur score = 0.01009962, worse accepted = 62.72%\n", "Gen #8: temp = 0.004660, best score = 0.00318075, cur score = 0.01604365, worse accepted = 56.95%\n", "Gen #9: temp = 0.004614, best score = 0.00318075, cur score = 0.01475345, worse accepted = 59.69%\n", "Gen #10: temp = 0.004568, best score = 0.00318075, cur score = 0.01538009, worse accepted = 58.17%\n", "Gen #11: temp = 0.004522, best score = 0.00318075, cur score = 0.01117693, worse accepted = 66.91%\n", "Gen #12: temp = 0.004477, best score = 0.00318075, cur score = 0.00771964, worse accepted = 72.62%\n", "Gen #13: temp = 0.004432, best score = 0.00318075, cur score = 0.00746049, worse accepted = 73.40%\n", "Gen #14: temp = 0.004388, best score = 0.00318075, cur score = 0.01760469, worse accepted = 65.28%\n", "Gen #15: temp = 0.004344, best score = 0.00318075, cur score = 0.00965595, worse accepted = 64.57%\n", "Gen #16: temp = 0.004300, best score = 0.00318075, cur score = 0.01295641, worse accepted = 62.76%\n", "Gen #17: temp = 0.004257, best score = 0.00318075, cur score = 0.01330950, worse accepted = 68.19%\n", "Gen #18: temp = 0.004215, best score = 0.00318075, cur score = 0.00911940, worse accepted = 69.51%\n", "Gen #19: temp = 0.004173, best score = 0.00318075, cur score = 0.01778541, worse accepted = 70.81%\n", "Gen #20: temp = 0.004131, best score = 0.00318075, cur score = 0.01229621, worse accepted = 64.08%\n", "Gen #21: temp = 0.004090, best score = 0.00318075, cur score = 0.01517331, worse accepted = 68.69%\n", "Gen #22: temp = 0.004049, best score = 0.00318075, cur score = 0.01963701, worse accepted = 60.39%\n", "Gen #23: temp = 0.004008, best score = 0.00318075, cur score = 0.00763392, worse accepted = 63.37%\n", "Gen #24: temp = 0.003968, best score = 0.00318075, cur score = 0.01014335, worse accepted = 70.30%\n", "Gen #25: temp = 0.003928, best score = 0.00318075, cur score = 0.01135714, worse accepted = 69.99%\n", "Gen #26: temp = 0.003889, best score = 0.00318075, cur score = 0.00734171, worse accepted = 65.24%\n", "Gen #27: temp = 0.003850, best score = 0.00318075, cur score = 0.00800536, worse accepted = 66.65%\n", "Gen #28: temp = 0.003812, best score = 0.00318075, cur score = 0.00540427, worse accepted = 71.90%\n", "Gen #29: temp = 0.003774, best score = 0.00318075, cur score = 0.01013185, worse accepted = 65.46%\n", "Gen #30: temp = 0.003736, best score = 0.00318075, cur score = 0.01070060, worse accepted = 71.16%\n", "Gen #31: temp = 0.003699, best score = 0.00318075, cur score = 0.01072884, worse accepted = 71.83%\n", "Gen #32: temp = 0.003662, best score = 0.00312363, cur score = 0.00816220, worse accepted = 70.62%\n", "Gen #33: temp = 0.003625, best score = 0.00312363, cur score = 0.01160498, worse accepted = 68.96%\n", "Gen #34: temp = 0.003589, best score = 0.00312363, cur score = 0.01089108, worse accepted = 57.54%\n", "Gen #35: temp = 0.003553, best score = 0.00292749, cur score = 0.00865637, worse accepted = 72.09%\n", "Gen #36: temp = 0.003517, best score = 0.00292749, cur score = 0.01013998, worse accepted = 56.88%\n", "Gen #37: temp = 0.003482, best score = 0.00292749, cur score = 0.00959675, worse accepted = 62.58%\n", "Gen #38: temp = 0.003447, best score = 0.00292749, cur score = 0.00713570, worse accepted = 71.11%\n", "Gen #39: temp = 0.003413, best score = 0.00292749, cur score = 0.00634233, worse accepted = 69.79%\n", "Gen #40: temp = 0.003379, best score = 0.00292749, cur score = 0.00962166, worse accepted = 61.64%\n", "Gen #41: temp = 0.003345, best score = 0.00292749, cur score = 0.01164708, worse accepted = 65.43%\n", "Gen #42: temp = 0.003311, best score = 0.00292749, cur score = 0.00861756, worse accepted = 67.75%\n", "Gen #43: temp = 0.003278, best score = 0.00292749, cur score = 0.00655333, worse accepted = 67.35%\n", "Gen #44: temp = 0.003246, best score = 0.00292749, cur score = 0.00940042, worse accepted = 67.98%\n", "Gen #45: temp = 0.003213, best score = 0.00292749, cur score = 0.00621375, worse accepted = 72.26%\n", "Gen #46: temp = 0.003181, best score = 0.00292749, cur score = 0.00834432, worse accepted = 63.27%\n", "Gen #47: temp = 0.003149, best score = 0.00292749, cur score = 0.00444329, worse accepted = 71.18%\n", "Gen #48: temp = 0.003118, best score = 0.00292749, cur score = 0.01182605, worse accepted = 56.40%\n", "Gen #49: temp = 0.003086, best score = 0.00292749, cur score = 0.00576266, worse accepted = 66.83%\n", "Gen #50: temp = 0.003056, best score = 0.00292749, cur score = 0.01384612, worse accepted = 70.12%\n", "Gen #51: temp = 0.003025, best score = 0.00292749, cur score = 0.01534885, worse accepted = 63.24%\n", "Gen #52: temp = 0.002995, best score = 0.00292749, cur score = 0.01457414, worse accepted = 53.34%\n", "Gen #53: temp = 0.002965, best score = 0.00292749, cur score = 0.00630223, worse accepted = 61.37%\n", "Gen #54: temp = 0.002935, best score = 0.00292749, cur score = 0.00963101, worse accepted = 71.16%\n", "Gen #55: temp = 0.002906, best score = 0.00292749, cur score = 0.00639567, worse accepted = 69.54%\n", "Gen #56: temp = 0.002877, best score = 0.00292749, cur score = 0.00463958, worse accepted = 70.15%\n", "Gen #57: temp = 0.002848, best score = 0.00292749, cur score = 0.00639724, worse accepted = 69.73%\n", "Gen #58: temp = 0.002820, best score = 0.00292749, cur score = 0.00650905, worse accepted = 66.87%\n", "Gen #59: temp = 0.002791, best score = 0.00292749, cur score = 0.00904718, worse accepted = 58.63%\n", "Gen #60: temp = 0.002763, best score = 0.00292749, cur score = 0.00818893, worse accepted = 69.31%\n", "Gen #61: temp = 0.002736, best score = 0.00292749, cur score = 0.00633786, worse accepted = 61.36%\n", "Gen #62: temp = 0.002708, best score = 0.00292749, cur score = 0.01184236, worse accepted = 57.87%\n", "Gen #63: temp = 0.002681, best score = 0.00292749, cur score = 0.00537377, worse accepted = 63.79%\n", "Gen #64: temp = 0.002655, best score = 0.00292749, cur score = 0.00672594, worse accepted = 67.55%\n", "Gen #65: temp = 0.002628, best score = 0.00292749, cur score = 0.00721884, worse accepted = 66.82%\n", "Gen #66: temp = 0.002602, best score = 0.00292749, cur score = 0.01013539, worse accepted = 64.66%\n", "Gen #67: temp = 0.002576, best score = 0.00292749, cur score = 0.00442682, worse accepted = 67.78%\n", "Gen #68: temp = 0.002550, best score = 0.00292749, cur score = 0.00842368, worse accepted = 64.96%\n", "Gen #69: temp = 0.002524, best score = 0.00292749, cur score = 0.00588087, worse accepted = 66.60%\n", "Gen #70: temp = 0.002499, best score = 0.00282661, cur score = 0.00935362, worse accepted = 70.66%\n", "Gen #71: temp = 0.002474, best score = 0.00282661, cur score = 0.00573556, worse accepted = 62.71%\n", "Gen #72: temp = 0.002449, best score = 0.00282661, cur score = 0.01193311, worse accepted = 65.42%\n", "Gen #73: temp = 0.002425, best score = 0.00282661, cur score = 0.00741618, worse accepted = 61.67%\n", "Gen #74: temp = 0.002401, best score = 0.00282661, cur score = 0.00408055, worse accepted = 65.87%\n", "Gen #75: temp = 0.002377, best score = 0.00282661, cur score = 0.00628956, worse accepted = 64.61%\n", "Gen #76: temp = 0.002353, best score = 0.00282661, cur score = 0.01290997, worse accepted = 63.63%\n", "Gen #77: temp = 0.002329, best score = 0.00282661, cur score = 0.00989243, worse accepted = 59.73%\n", "Gen #78: temp = 0.002306, best score = 0.00282661, cur score = 0.01043133, worse accepted = 52.02%\n", "Gen #79: temp = 0.002283, best score = 0.00282661, cur score = 0.00980625, worse accepted = 55.16%\n", "Gen #80: temp = 0.002260, best score = 0.00282661, cur score = 0.00988374, worse accepted = 42.66%\n", "Gen #81: temp = 0.002238, best score = 0.00282661, cur score = 0.00393125, worse accepted = 50.50%\n", "Gen #82: temp = 0.002215, best score = 0.00282661, cur score = 0.01434670, worse accepted = 61.72%\n", "Gen #83: temp = 0.002193, best score = 0.00282661, cur score = 0.01024228, worse accepted = 62.40%\n", "Gen #84: temp = 0.002171, best score = 0.00282661, cur score = 0.00569420, worse accepted = 65.45%\n", "Gen #85: temp = 0.002149, best score = 0.00282661, cur score = 0.00852656, worse accepted = 58.71%\n", "Gen #86: temp = 0.002128, best score = 0.00282661, cur score = 0.01186993, worse accepted = 48.22%\n", "Gen #87: temp = 0.002107, best score = 0.00282661, cur score = 0.01159017, worse accepted = 46.74%\n", "Gen #88: temp = 0.002086, best score = 0.00282661, cur score = 0.00890170, worse accepted = 55.47%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #89: temp = 0.002065, best score = 0.00282661, cur score = 0.00603980, worse accepted = 53.17%\n", "Gen #90: temp = 0.002044, best score = 0.00282661, cur score = 0.00844879, worse accepted = 62.13%\n", "Gen #91: temp = 0.002024, best score = 0.00282661, cur score = 0.00556486, worse accepted = 61.04%\n", "Gen #92: temp = 0.002003, best score = 0.00282661, cur score = 0.00787471, worse accepted = 55.16%\n", "Gen #93: temp = 0.001983, best score = 0.00282661, cur score = 0.00559748, worse accepted = 61.35%\n", "Gen #94: temp = 0.001964, best score = 0.00282661, cur score = 0.00613000, worse accepted = 64.03%\n", "Gen #95: temp = 0.001944, best score = 0.00282661, cur score = 0.00674110, worse accepted = 61.36%\n", "Gen #96: temp = 0.001924, best score = 0.00282661, cur score = 0.00672075, worse accepted = 49.03%\n", "Gen #97: temp = 0.001905, best score = 0.00282661, cur score = 0.00433382, worse accepted = 59.39%\n", "Gen #98: temp = 0.001886, best score = 0.00282661, cur score = 0.01129704, worse accepted = 60.69%\n", "Gen #99: temp = 0.001867, best score = 0.00282661, cur score = 0.00576753, worse accepted = 54.59%\n", "Gen #100: temp = 0.001849, best score = 0.00282661, cur score = 0.00731889, worse accepted = 60.13%\n", "Gen #101: temp = 0.001830, best score = 0.00282661, cur score = 0.01549982, worse accepted = 43.54%\n", "Gen #102: temp = 0.001812, best score = 0.00282661, cur score = 0.01079824, worse accepted = 36.92%\n", "Gen #103: temp = 0.001794, best score = 0.00282661, cur score = 0.00385118, worse accepted = 54.79%\n", "Gen #104: temp = 0.001776, best score = 0.00282661, cur score = 0.00796348, worse accepted = 55.83%\n", "Gen #105: temp = 0.001758, best score = 0.00282661, cur score = 0.00686512, worse accepted = 57.18%\n", "Gen #106: temp = 0.001740, best score = 0.00282661, cur score = 0.00741053, worse accepted = 57.92%\n", "Gen #107: temp = 0.001723, best score = 0.00282661, cur score = 0.01114745, worse accepted = 62.01%\n", "Gen #108: temp = 0.001706, best score = 0.00282661, cur score = 0.00843024, worse accepted = 58.73%\n", "Gen #109: temp = 0.001689, best score = 0.00282661, cur score = 0.00910167, worse accepted = 50.77%\n", "Gen #110: temp = 0.001672, best score = 0.00282661, cur score = 0.00432675, worse accepted = 60.72%\n", "Gen #111: temp = 0.001655, best score = 0.00282661, cur score = 0.00931679, worse accepted = 55.47%\n", "Gen #112: temp = 0.001639, best score = 0.00282661, cur score = 0.00477305, worse accepted = 57.87%\n", "Gen #113: temp = 0.001622, best score = 0.00282661, cur score = 0.00689935, worse accepted = 57.48%\n", "Gen #114: temp = 0.001606, best score = 0.00282661, cur score = 0.00674704, worse accepted = 56.81%\n", "Gen #115: temp = 0.001590, best score = 0.00282661, cur score = 0.00791337, worse accepted = 55.79%\n", "Gen #116: temp = 0.001574, best score = 0.00282661, cur score = 0.00788331, worse accepted = 61.48%\n", "Gen #117: temp = 0.001558, best score = 0.00282661, cur score = 0.00565482, worse accepted = 57.40%\n", "Gen #118: temp = 0.001543, best score = 0.00282661, cur score = 0.01357446, worse accepted = 54.70%\n", "Gen #119: temp = 0.001527, best score = 0.00282661, cur score = 0.00819742, worse accepted = 49.02%\n", "Gen #120: temp = 0.001512, best score = 0.00282661, cur score = 0.00537375, worse accepted = 44.23%\n", "Gen #121: temp = 0.001497, best score = 0.00282661, cur score = 0.00549928, worse accepted = 57.54%\n", "Gen #122: temp = 0.001482, best score = 0.00282661, cur score = 0.00654766, worse accepted = 57.79%\n", "Gen #123: temp = 0.001467, best score = 0.00282661, cur score = 0.00546782, worse accepted = 50.68%\n", "Gen #124: temp = 0.001452, best score = 0.00282661, cur score = 0.01390658, worse accepted = 50.64%\n", "Gen #125: temp = 0.001438, best score = 0.00282661, cur score = 0.00965466, worse accepted = 35.11%\n", "Gen #126: temp = 0.001424, best score = 0.00282661, cur score = 0.00432680, worse accepted = 42.51%\n", "Gen #127: temp = 0.001409, best score = 0.00282661, cur score = 0.00549220, worse accepted = 51.77%\n", "Gen #128: temp = 0.001395, best score = 0.00282661, cur score = 0.00558550, worse accepted = 50.63%\n", "Gen #129: temp = 0.001381, best score = 0.00282661, cur score = 0.00851975, worse accepted = 43.99%\n", "Gen #130: temp = 0.001367, best score = 0.00282661, cur score = 0.00525424, worse accepted = 53.62%\n", "Gen #131: temp = 0.001354, best score = 0.00282661, cur score = 0.00883971, worse accepted = 55.47%\n", "Gen #132: temp = 0.001340, best score = 0.00282661, cur score = 0.01181239, worse accepted = 44.86%\n", "Gen #133: temp = 0.001327, best score = 0.00282661, cur score = 0.00415453, worse accepted = 54.78%\n", "Gen #134: temp = 0.001314, best score = 0.00282661, cur score = 0.00674542, worse accepted = 50.58%\n", "Gen #135: temp = 0.001300, best score = 0.00282661, cur score = 0.00808884, worse accepted = 49.26%\n", "Gen #136: temp = 0.001287, best score = 0.00282661, cur score = 0.00630639, worse accepted = 57.79%\n", "Gen #137: temp = 0.001275, best score = 0.00282661, cur score = 0.00394369, worse accepted = 57.44%\n", "Gen #138: temp = 0.001262, best score = 0.00282661, cur score = 0.00506361, worse accepted = 54.26%\n", "Gen #139: temp = 0.001249, best score = 0.00282661, cur score = 0.00589698, worse accepted = 50.49%\n", "Gen #140: temp = 0.001237, best score = 0.00282661, cur score = 0.01250980, worse accepted = 57.15%\n", "Gen #141: temp = 0.001224, best score = 0.00282661, cur score = 0.00582950, worse accepted = 48.34%\n", "Gen #142: temp = 0.001212, best score = 0.00282661, cur score = 0.00546796, worse accepted = 55.43%\n", "Gen #143: temp = 0.001200, best score = 0.00282661, cur score = 0.00486565, worse accepted = 54.31%\n", "Gen #144: temp = 0.001188, best score = 0.00282661, cur score = 0.00500985, worse accepted = 53.06%\n", "Gen #145: temp = 0.001176, best score = 0.00282661, cur score = 0.00412281, worse accepted = 54.47%\n", "Gen #146: temp = 0.001164, best score = 0.00282661, cur score = 0.00443705, worse accepted = 50.91%\n", "Gen #147: temp = 0.001153, best score = 0.00282661, cur score = 0.00804479, worse accepted = 53.05%\n", "Gen #148: temp = 0.001141, best score = 0.00282661, cur score = 0.00596906, worse accepted = 46.12%\n", "Gen #149: temp = 0.001130, best score = 0.00282661, cur score = 0.00383877, worse accepted = 47.97%\n", "Gen #150: temp = 0.001118, best score = 0.00282661, cur score = 0.00528697, worse accepted = 53.26%\n", "Gen #151: temp = 0.001107, best score = 0.00282661, cur score = 0.00587131, worse accepted = 44.42%\n", "Gen #152: temp = 0.001096, best score = 0.00282661, cur score = 0.00609579, worse accepted = 53.60%\n", "Gen #153: temp = 0.001085, best score = 0.00282661, cur score = 0.00496971, worse accepted = 49.62%\n", "Gen #154: temp = 0.001074, best score = 0.00282661, cur score = 0.00639860, worse accepted = 51.82%\n", "Gen #155: temp = 0.001064, best score = 0.00282661, cur score = 0.00448618, worse accepted = 52.63%\n", "Gen #156: temp = 0.001053, best score = 0.00282661, cur score = 0.00476551, worse accepted = 49.38%\n", "Gen #157: temp = 0.001042, best score = 0.00282661, cur score = 0.00512304, worse accepted = 47.36%\n", "Gen #158: temp = 0.001032, best score = 0.00282661, cur score = 0.00682004, worse accepted = 46.53%\n", "Gen #159: temp = 0.001022, best score = 0.00282661, cur score = 0.00366915, worse accepted = 49.69%\n", "Gen #160: temp = 0.001012, best score = 0.00282661, cur score = 0.00819022, worse accepted = 52.51%\n", "Gen #161: temp = 0.001001, best score = 0.00282661, cur score = 0.00500139, worse accepted = 50.31%\n", "Gen #162: temp = 0.000991, best score = 0.00282661, cur score = 0.00693965, worse accepted = 51.51%\n", "Gen #163: temp = 0.000981, best score = 0.00282661, cur score = 0.00431034, worse accepted = 49.48%\n", "Gen #164: temp = 0.000972, best score = 0.00282661, cur score = 0.00452080, worse accepted = 48.08%\n", "Gen #165: temp = 0.000962, best score = 0.00282661, cur score = 0.00416894, worse accepted = 49.34%\n", "Gen #166: temp = 0.000952, best score = 0.00282661, cur score = 0.00569337, worse accepted = 46.42%\n", "Gen #167: temp = 0.000943, best score = 0.00282661, cur score = 0.00696801, worse accepted = 50.41%\n", "Gen #168: temp = 0.000933, best score = 0.00282661, cur score = 0.00490875, worse accepted = 44.25%\n", "Gen #169: temp = 0.000924, best score = 0.00282661, cur score = 0.00851127, worse accepted = 49.94%\n", "Gen #170: temp = 0.000915, best score = 0.00282661, cur score = 0.00428826, worse accepted = 46.66%\n", "Gen #171: temp = 0.000906, best score = 0.00282661, cur score = 0.00408402, worse accepted = 45.61%\n", "Gen #172: temp = 0.000897, best score = 0.00282661, cur score = 0.00377077, worse accepted = 51.30%\n", "Gen #173: temp = 0.000888, best score = 0.00282661, cur score = 0.00532509, worse accepted = 49.24%\n", "Gen #174: temp = 0.000879, best score = 0.00282661, cur score = 0.00448850, worse accepted = 47.22%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #175: temp = 0.000870, best score = 0.00282661, cur score = 0.00589635, worse accepted = 48.49%\n", "Gen #176: temp = 0.000861, best score = 0.00282661, cur score = 0.00529465, worse accepted = 47.93%\n", "Gen #177: temp = 0.000853, best score = 0.00282661, cur score = 0.00539788, worse accepted = 40.05%\n", "Gen #178: temp = 0.000844, best score = 0.00282661, cur score = 0.00583703, worse accepted = 45.23%\n", "Gen #179: temp = 0.000836, best score = 0.00282661, cur score = 0.00512243, worse accepted = 43.47%\n", "Gen #180: temp = 0.000827, best score = 0.00282661, cur score = 0.00613741, worse accepted = 48.94%\n", "Gen #181: temp = 0.000819, best score = 0.00282661, cur score = 0.00489782, worse accepted = 49.51%\n", "Gen #182: temp = 0.000811, best score = 0.00282661, cur score = 0.00475974, worse accepted = 44.58%\n", "Gen #183: temp = 0.000803, best score = 0.00282661, cur score = 0.00439465, worse accepted = 47.84%\n", "Gen #184: temp = 0.000795, best score = 0.00282661, cur score = 0.00370539, worse accepted = 52.32%\n", "Gen #185: temp = 0.000787, best score = 0.00282661, cur score = 0.00454872, worse accepted = 45.01%\n", "Gen #186: temp = 0.000779, best score = 0.00282661, cur score = 0.00438460, worse accepted = 45.67%\n", "Gen #187: temp = 0.000771, best score = 0.00282661, cur score = 0.00663540, worse accepted = 46.76%\n", "Gen #188: temp = 0.000763, best score = 0.00282661, cur score = 0.00333624, worse accepted = 43.23%\n", "Gen #189: temp = 0.000756, best score = 0.00282661, cur score = 0.00358590, worse accepted = 47.94%\n", "Gen #190: temp = 0.000748, best score = 0.00282661, cur score = 0.00419399, worse accepted = 47.49%\n", "Gen #191: temp = 0.000741, best score = 0.00282661, cur score = 0.00387020, worse accepted = 42.49%\n", "Gen #192: temp = 0.000733, best score = 0.00282661, cur score = 0.00397253, worse accepted = 47.59%\n", "Gen #193: temp = 0.000726, best score = 0.00282661, cur score = 0.00392905, worse accepted = 45.16%\n", "Gen #194: temp = 0.000719, best score = 0.00282661, cur score = 0.00468710, worse accepted = 46.42%\n", "Gen #195: temp = 0.000712, best score = 0.00282661, cur score = 0.00645702, worse accepted = 44.19%\n", "Gen #196: temp = 0.000704, best score = 0.00282661, cur score = 0.00871027, worse accepted = 37.38%\n", "Gen #197: temp = 0.000697, best score = 0.00282661, cur score = 0.00438427, worse accepted = 34.03%\n", "Gen #198: temp = 0.000690, best score = 0.00282661, cur score = 0.00561223, worse accepted = 44.20%\n", "Gen #199: temp = 0.000684, best score = 0.00282661, cur score = 0.00481326, worse accepted = 45.08%\n", "Gen #200: temp = 0.000677, best score = 0.00282661, cur score = 0.00529511, worse accepted = 45.71%\n", "Gen #201: temp = 0.000670, best score = 0.00282661, cur score = 0.00375117, worse accepted = 45.76%\n", "Gen #202: temp = 0.000663, best score = 0.00282661, cur score = 0.00660788, worse accepted = 40.40%\n", "Gen #203: temp = 0.000657, best score = 0.00282661, cur score = 0.00477518, worse accepted = 40.45%\n", "Gen #204: temp = 0.000650, best score = 0.00282661, cur score = 0.00381553, worse accepted = 41.45%\n", "Gen #205: temp = 0.000644, best score = 0.00282661, cur score = 0.00674731, worse accepted = 42.82%\n", "Gen #206: temp = 0.000637, best score = 0.00282661, cur score = 0.00507404, worse accepted = 41.74%\n", "Gen #207: temp = 0.000631, best score = 0.00282661, cur score = 0.00387023, worse accepted = 43.08%\n", "Gen #208: temp = 0.000624, best score = 0.00282661, cur score = 0.00379453, worse accepted = 38.59%\n", "Gen #209: temp = 0.000618, best score = 0.00282661, cur score = 0.00379551, worse accepted = 44.09%\n", "Gen #210: temp = 0.000612, best score = 0.00282661, cur score = 0.00686508, worse accepted = 41.36%\n", "Gen #211: temp = 0.000606, best score = 0.00282661, cur score = 0.00575734, worse accepted = 46.54%\n", "Gen #212: temp = 0.000600, best score = 0.00282661, cur score = 0.00402467, worse accepted = 34.25%\n", "Gen #213: temp = 0.000594, best score = 0.00282661, cur score = 0.00488084, worse accepted = 38.41%\n", "Gen #214: temp = 0.000588, best score = 0.00282661, cur score = 0.00658277, worse accepted = 43.42%\n", "Gen #215: temp = 0.000582, best score = 0.00282661, cur score = 0.00414736, worse accepted = 46.53%\n", "Gen #216: temp = 0.000576, best score = 0.00282661, cur score = 0.00491747, worse accepted = 41.76%\n", "Gen #217: temp = 0.000570, best score = 0.00282661, cur score = 0.00398667, worse accepted = 37.75%\n", "Gen #218: temp = 0.000565, best score = 0.00282661, cur score = 0.00544286, worse accepted = 40.60%\n", "Gen #219: temp = 0.000559, best score = 0.00282661, cur score = 0.00375443, worse accepted = 41.87%\n", "Gen #220: temp = 0.000553, best score = 0.00282661, cur score = 0.00356531, worse accepted = 45.74%\n", "Gen #221: temp = 0.000548, best score = 0.00282661, cur score = 0.00434275, worse accepted = 42.79%\n", "Gen #222: temp = 0.000542, best score = 0.00282661, cur score = 0.00427053, worse accepted = 43.04%\n", "Gen #223: temp = 0.000537, best score = 0.00282661, cur score = 0.00478075, worse accepted = 43.49%\n", "Gen #224: temp = 0.000532, best score = 0.00282661, cur score = 0.00344677, worse accepted = 45.03%\n", "Gen #225: temp = 0.000526, best score = 0.00282661, cur score = 0.00468339, worse accepted = 37.98%\n", "Gen #226: temp = 0.000521, best score = 0.00282661, cur score = 0.00376493, worse accepted = 41.42%\n", "Gen #227: temp = 0.000516, best score = 0.00282661, cur score = 0.00418492, worse accepted = 41.95%\n", "Gen #228: temp = 0.000511, best score = 0.00282661, cur score = 0.00459169, worse accepted = 39.74%\n", "Gen #229: temp = 0.000506, best score = 0.00282661, cur score = 0.00463981, worse accepted = 41.72%\n", "Gen #230: temp = 0.000501, best score = 0.00282661, cur score = 0.00465303, worse accepted = 37.58%\n", "Gen #231: temp = 0.000496, best score = 0.00282661, cur score = 0.00574690, worse accepted = 40.73%\n", "Gen #232: temp = 0.000491, best score = 0.00282661, cur score = 0.00730144, worse accepted = 37.54%\n", "Gen #233: temp = 0.000486, best score = 0.00282661, cur score = 0.00449385, worse accepted = 35.42%\n", "Gen #234: temp = 0.000481, best score = 0.00282661, cur score = 0.00383889, worse accepted = 39.80%\n", "Gen #235: temp = 0.000476, best score = 0.00282661, cur score = 0.00476359, worse accepted = 42.46%\n", "Gen #236: temp = 0.000471, best score = 0.00282661, cur score = 0.00421692, worse accepted = 34.09%\n", "Gen #237: temp = 0.000467, best score = 0.00282661, cur score = 0.00445784, worse accepted = 40.04%\n", "Gen #238: temp = 0.000462, best score = 0.00282661, cur score = 0.00366558, worse accepted = 43.57%\n", "Gen #239: temp = 0.000457, best score = 0.00282661, cur score = 0.00451394, worse accepted = 38.80%\n", "Gen #240: temp = 0.000453, best score = 0.00282661, cur score = 0.00333729, worse accepted = 41.21%\n", "Gen #241: temp = 0.000448, best score = 0.00282661, cur score = 0.00618332, worse accepted = 35.53%\n", "Gen #242: temp = 0.000444, best score = 0.00282661, cur score = 0.00370802, worse accepted = 40.10%\n", "Gen #243: temp = 0.000439, best score = 0.00282661, cur score = 0.00378263, worse accepted = 42.22%\n", "Gen #244: temp = 0.000435, best score = 0.00282661, cur score = 0.00357070, worse accepted = 33.74%\n", "Gen #245: temp = 0.000430, best score = 0.00282661, cur score = 0.00351541, worse accepted = 39.77%\n", "Gen #246: temp = 0.000426, best score = 0.00282661, cur score = 0.00502131, worse accepted = 34.42%\n", "Gen #247: temp = 0.000422, best score = 0.00282661, cur score = 0.00401208, worse accepted = 31.44%\n", "Gen #248: temp = 0.000418, best score = 0.00282661, cur score = 0.00353567, worse accepted = 39.85%\n", "Gen #249: temp = 0.000414, best score = 0.00282661, cur score = 0.00434035, worse accepted = 39.44%\n", "Gen #250: temp = 0.000409, best score = 0.00282661, cur score = 0.00435307, worse accepted = 37.21%\n", "Gen #251: temp = 0.000405, best score = 0.00282661, cur score = 0.00358010, worse accepted = 37.55%\n", "Gen #252: temp = 0.000401, best score = 0.00282661, cur score = 0.00491627, worse accepted = 39.99%\n", "Gen #253: temp = 0.000397, best score = 0.00282661, cur score = 0.00309982, worse accepted = 37.76%\n", "Gen #254: temp = 0.000393, best score = 0.00282661, cur score = 0.00353355, worse accepted = 34.17%\n", "Gen #255: temp = 0.000389, best score = 0.00282661, cur score = 0.00529054, worse accepted = 39.81%\n", "Gen #256: temp = 0.000385, best score = 0.00282661, cur score = 0.00337113, worse accepted = 36.43%\n", "Gen #257: temp = 0.000382, best score = 0.00282661, cur score = 0.00557516, worse accepted = 35.07%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #258: temp = 0.000378, best score = 0.00282661, cur score = 0.00537380, worse accepted = 33.86%\n", "Gen #259: temp = 0.000374, best score = 0.00282661, cur score = 0.00483649, worse accepted = 31.56%\n", "Gen #260: temp = 0.000370, best score = 0.00282661, cur score = 0.00547199, worse accepted = 35.61%\n", "Gen #261: temp = 0.000367, best score = 0.00282661, cur score = 0.00375781, worse accepted = 37.87%\n", "Gen #262: temp = 0.000363, best score = 0.00282661, cur score = 0.00375528, worse accepted = 33.96%\n", "Gen #263: temp = 0.000359, best score = 0.00282661, cur score = 0.00366420, worse accepted = 37.88%\n", "Gen #264: temp = 0.000356, best score = 0.00282661, cur score = 0.00329811, worse accepted = 35.76%\n", "Gen #265: temp = 0.000352, best score = 0.00282661, cur score = 0.00450894, worse accepted = 40.62%\n", "Gen #266: temp = 0.000349, best score = 0.00282661, cur score = 0.00353979, worse accepted = 40.30%\n", "Gen #267: temp = 0.000345, best score = 0.00282661, cur score = 0.00330167, worse accepted = 37.46%\n", "Gen #268: temp = 0.000342, best score = 0.00282661, cur score = 0.00441921, worse accepted = 36.31%\n", "Gen #269: temp = 0.000338, best score = 0.00282661, cur score = 0.00421720, worse accepted = 37.10%\n", "Gen #270: temp = 0.000335, best score = 0.00282661, cur score = 0.00338645, worse accepted = 40.54%\n", "Gen #271: temp = 0.000331, best score = 0.00282661, cur score = 0.00378909, worse accepted = 39.29%\n", "Gen #272: temp = 0.000328, best score = 0.00282661, cur score = 0.00437926, worse accepted = 37.43%\n", "Gen #273: temp = 0.000325, best score = 0.00282661, cur score = 0.00421014, worse accepted = 36.54%\n", "Gen #274: temp = 0.000322, best score = 0.00282661, cur score = 0.00386403, worse accepted = 33.74%\n", "Gen #275: temp = 0.000318, best score = 0.00282661, cur score = 0.00442910, worse accepted = 30.91%\n", "Gen #276: temp = 0.000315, best score = 0.00282661, cur score = 0.00366909, worse accepted = 34.45%\n", "Gen #277: temp = 0.000312, best score = 0.00282661, cur score = 0.00378888, worse accepted = 34.00%\n", "Gen #278: temp = 0.000309, best score = 0.00282661, cur score = 0.00456441, worse accepted = 37.69%\n", "Gen #279: temp = 0.000306, best score = 0.00282661, cur score = 0.00386842, worse accepted = 35.77%\n", "Gen #280: temp = 0.000303, best score = 0.00282661, cur score = 0.00377567, worse accepted = 32.54%\n", "Gen #281: temp = 0.000300, best score = 0.00282661, cur score = 0.00305584, worse accepted = 38.91%\n", "Gen #282: temp = 0.000297, best score = 0.00282661, cur score = 0.00392994, worse accepted = 32.43%\n", "Gen #283: temp = 0.000294, best score = 0.00282661, cur score = 0.00354092, worse accepted = 36.25%\n", "Gen #284: temp = 0.000291, best score = 0.00282661, cur score = 0.00339903, worse accepted = 32.95%\n", "Gen #285: temp = 0.000288, best score = 0.00282661, cur score = 0.00459809, worse accepted = 30.71%\n", "Gen #286: temp = 0.000285, best score = 0.00282661, cur score = 0.00433662, worse accepted = 33.64%\n", "Gen #287: temp = 0.000282, best score = 0.00282661, cur score = 0.00398044, worse accepted = 37.18%\n", "Gen #288: temp = 0.000279, best score = 0.00282661, cur score = 0.00360523, worse accepted = 35.14%\n", "Gen #289: temp = 0.000277, best score = 0.00282661, cur score = 0.00318246, worse accepted = 34.42%\n", "Gen #290: temp = 0.000274, best score = 0.00282661, cur score = 0.00417210, worse accepted = 36.09%\n", "Gen #291: temp = 0.000271, best score = 0.00282661, cur score = 0.00345508, worse accepted = 34.46%\n", "Gen #292: temp = 0.000268, best score = 0.00282661, cur score = 0.00364420, worse accepted = 33.86%\n", "Gen #293: temp = 0.000266, best score = 0.00282661, cur score = 0.00316944, worse accepted = 30.07%\n", "Gen #294: temp = 0.000263, best score = 0.00282661, cur score = 0.00351377, worse accepted = 35.69%\n", "Gen #295: temp = 0.000260, best score = 0.00282661, cur score = 0.00381939, worse accepted = 34.34%\n", "Gen #296: temp = 0.000258, best score = 0.00282661, cur score = 0.00497365, worse accepted = 34.12%\n", "Gen #297: temp = 0.000255, best score = 0.00282661, cur score = 0.00337896, worse accepted = 34.53%\n", "Gen #298: temp = 0.000253, best score = 0.00282661, cur score = 0.00311224, worse accepted = 35.06%\n", "Gen #299: temp = 0.000250, best score = 0.00282661, cur score = 0.00320289, worse accepted = 33.44%\n", "Gen #300: temp = 0.000248, best score = 0.00282661, cur score = 0.00329654, worse accepted = 35.66%\n", "Gen #301: temp = 0.000245, best score = 0.00282661, cur score = 0.00371379, worse accepted = 33.91%\n", "Gen #302: temp = 0.000243, best score = 0.00282661, cur score = 0.00389972, worse accepted = 34.24%\n", "Gen #303: temp = 0.000240, best score = 0.00282661, cur score = 0.00350519, worse accepted = 33.88%\n", "Gen #304: temp = 0.000238, best score = 0.00282661, cur score = 0.00365876, worse accepted = 35.81%\n", "Gen #305: temp = 0.000236, best score = 0.00282661, cur score = 0.00390632, worse accepted = 35.87%\n", "Gen #306: temp = 0.000233, best score = 0.00282661, cur score = 0.00304704, worse accepted = 35.98%\n", "Gen #307: temp = 0.000231, best score = 0.00282661, cur score = 0.00364506, worse accepted = 32.25%\n", "Gen #308: temp = 0.000229, best score = 0.00282661, cur score = 0.00325740, worse accepted = 31.86%\n", "Gen #309: temp = 0.000226, best score = 0.00282661, cur score = 0.00371654, worse accepted = 30.87%\n", "Gen #310: temp = 0.000224, best score = 0.00282661, cur score = 0.00363932, worse accepted = 34.35%\n", "Gen #311: temp = 0.000222, best score = 0.00282661, cur score = 0.00335461, worse accepted = 28.34%\n", "Gen #312: temp = 0.000220, best score = 0.00282661, cur score = 0.00333056, worse accepted = 30.12%\n", "Gen #313: temp = 0.000217, best score = 0.00282661, cur score = 0.00375610, worse accepted = 34.85%\n", "Gen #314: temp = 0.000215, best score = 0.00282661, cur score = 0.00352201, worse accepted = 33.29%\n", "Gen #315: temp = 0.000213, best score = 0.00282661, cur score = 0.00334300, worse accepted = 31.32%\n", "Gen #316: temp = 0.000211, best score = 0.00282661, cur score = 0.00322346, worse accepted = 34.29%\n", "Gen #317: temp = 0.000209, best score = 0.00282661, cur score = 0.00367602, worse accepted = 30.32%\n", "Gen #318: temp = 0.000207, best score = 0.00282661, cur score = 0.00352061, worse accepted = 34.42%\n", "Gen #319: temp = 0.000205, best score = 0.00282661, cur score = 0.00488841, worse accepted = 30.36%\n", "Gen #320: temp = 0.000203, best score = 0.00282661, cur score = 0.00338375, worse accepted = 28.68%\n", "Gen #321: temp = 0.000201, best score = 0.00282661, cur score = 0.00344369, worse accepted = 34.78%\n", "Gen #322: temp = 0.000199, best score = 0.00282661, cur score = 0.00320313, worse accepted = 33.86%\n", "Gen #323: temp = 0.000197, best score = 0.00282661, cur score = 0.00374112, worse accepted = 32.69%\n", "Gen #324: temp = 0.000195, best score = 0.00282661, cur score = 0.00368875, worse accepted = 35.21%\n", "Gen #325: temp = 0.000193, best score = 0.00282661, cur score = 0.00441963, worse accepted = 32.43%\n", "Gen #326: temp = 0.000191, best score = 0.00282661, cur score = 0.00408800, worse accepted = 34.08%\n", "Gen #327: temp = 0.000189, best score = 0.00282661, cur score = 0.00326596, worse accepted = 30.24%\n", "Gen #328: temp = 0.000187, best score = 0.00282661, cur score = 0.00321169, worse accepted = 32.37%\n", "Gen #329: temp = 0.000185, best score = 0.00282661, cur score = 0.00340198, worse accepted = 34.55%\n", "Gen #330: temp = 0.000183, best score = 0.00282661, cur score = 0.00349318, worse accepted = 33.37%\n", "Gen #331: temp = 0.000181, best score = 0.00282661, cur score = 0.00344235, worse accepted = 31.45%\n", "Gen #332: temp = 0.000180, best score = 0.00282661, cur score = 0.00357427, worse accepted = 35.73%\n", "Gen #333: temp = 0.000178, best score = 0.00282661, cur score = 0.00419379, worse accepted = 30.03%\n", "Gen #334: temp = 0.000176, best score = 0.00282661, cur score = 0.00335502, worse accepted = 35.74%\n", "Gen #335: temp = 0.000174, best score = 0.00282661, cur score = 0.00301339, worse accepted = 29.06%\n", "Gen #336: temp = 0.000172, best score = 0.00282661, cur score = 0.00309874, worse accepted = 33.59%\n", "Gen #337: temp = 0.000171, best score = 0.00282661, cur score = 0.00332408, worse accepted = 31.01%\n", "Gen #338: temp = 0.000169, best score = 0.00282661, cur score = 0.00398630, worse accepted = 30.54%\n", "Gen #339: temp = 0.000167, best score = 0.00282661, cur score = 0.00347274, worse accepted = 31.66%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #340: temp = 0.000166, best score = 0.00282661, cur score = 0.00334587, worse accepted = 31.53%\n", "Gen #341: temp = 0.000164, best score = 0.00282661, cur score = 0.00333895, worse accepted = 27.55%\n", "Gen #342: temp = 0.000162, best score = 0.00282661, cur score = 0.00383468, worse accepted = 29.54%\n", "Gen #343: temp = 0.000161, best score = 0.00282661, cur score = 0.00300442, worse accepted = 30.38%\n", "Gen #344: temp = 0.000159, best score = 0.00282661, cur score = 0.00328705, worse accepted = 30.25%\n", "Gen #345: temp = 0.000158, best score = 0.00282661, cur score = 0.00329486, worse accepted = 29.54%\n", "Gen #346: temp = 0.000156, best score = 0.00282661, cur score = 0.00326530, worse accepted = 26.99%\n", "Gen #347: temp = 0.000154, best score = 0.00282661, cur score = 0.00359273, worse accepted = 29.73%\n", "Gen #348: temp = 0.000153, best score = 0.00282661, cur score = 0.00309402, worse accepted = 31.04%\n", "Gen #349: temp = 0.000151, best score = 0.00282661, cur score = 0.00357600, worse accepted = 32.28%\n", "Gen #350: temp = 0.000150, best score = 0.00282661, cur score = 0.00361079, worse accepted = 29.96%\n", "Gen #351: temp = 0.000148, best score = 0.00282661, cur score = 0.00302783, worse accepted = 29.31%\n", "Gen #352: temp = 0.000147, best score = 0.00282661, cur score = 0.00312155, worse accepted = 31.36%\n", "Gen #353: temp = 0.000145, best score = 0.00282661, cur score = 0.00327539, worse accepted = 30.27%\n", "Gen #354: temp = 0.000144, best score = 0.00282661, cur score = 0.00295598, worse accepted = 29.88%\n", "Gen #355: temp = 0.000143, best score = 0.00282661, cur score = 0.00333789, worse accepted = 29.17%\n", "Gen #356: temp = 0.000141, best score = 0.00282661, cur score = 0.00344515, worse accepted = 30.21%\n", "Gen #357: temp = 0.000140, best score = 0.00282661, cur score = 0.00369448, worse accepted = 30.22%\n", "Gen #358: temp = 0.000138, best score = 0.00282661, cur score = 0.00347252, worse accepted = 29.93%\n", "Gen #359: temp = 0.000137, best score = 0.00282661, cur score = 0.00342034, worse accepted = 29.68%\n", "Gen #360: temp = 0.000136, best score = 0.00282661, cur score = 0.00343856, worse accepted = 28.99%\n", "Gen #361: temp = 0.000134, best score = 0.00282661, cur score = 0.00346090, worse accepted = 30.34%\n", "Gen #362: temp = 0.000133, best score = 0.00282661, cur score = 0.00309166, worse accepted = 29.38%\n", "Gen #363: temp = 0.000131, best score = 0.00282661, cur score = 0.00362039, worse accepted = 28.25%\n", "Gen #364: temp = 0.000130, best score = 0.00282661, cur score = 0.00386675, worse accepted = 29.16%\n", "Gen #365: temp = 0.000129, best score = 0.00282661, cur score = 0.00391520, worse accepted = 29.04%\n", "Gen #366: temp = 0.000128, best score = 0.00282661, cur score = 0.00312060, worse accepted = 29.37%\n", "Gen #367: temp = 0.000126, best score = 0.00282661, cur score = 0.00317608, worse accepted = 29.12%\n", "Gen #368: temp = 0.000125, best score = 0.00282661, cur score = 0.00309498, worse accepted = 26.75%\n", "Gen #369: temp = 0.000124, best score = 0.00282661, cur score = 0.00291450, worse accepted = 30.33%\n", "Gen #370: temp = 0.000123, best score = 0.00282661, cur score = 0.00318606, worse accepted = 26.65%\n", "Gen #371: temp = 0.000121, best score = 0.00282661, cur score = 0.00304120, worse accepted = 29.22%\n", "Gen #372: temp = 0.000120, best score = 0.00282661, cur score = 0.00327950, worse accepted = 28.58%\n", "Gen #373: temp = 0.000119, best score = 0.00282661, cur score = 0.00298586, worse accepted = 27.16%\n", "Gen #374: temp = 0.000118, best score = 0.00282661, cur score = 0.00297410, worse accepted = 28.19%\n", "Gen #375: temp = 0.000117, best score = 0.00282661, cur score = 0.00349457, worse accepted = 28.64%\n", "Gen #376: temp = 0.000115, best score = 0.00282661, cur score = 0.00314929, worse accepted = 28.66%\n", "Gen #377: temp = 0.000114, best score = 0.00282661, cur score = 0.00321478, worse accepted = 30.44%\n", "Gen #378: temp = 0.000113, best score = 0.00282661, cur score = 0.00358000, worse accepted = 27.22%\n", "Gen #379: temp = 0.000112, best score = 0.00282661, cur score = 0.00305913, worse accepted = 28.52%\n", "Gen #380: temp = 0.000111, best score = 0.00282661, cur score = 0.00359652, worse accepted = 26.76%\n", "Gen #381: temp = 0.000110, best score = 0.00282661, cur score = 0.00328652, worse accepted = 27.28%\n", "Gen #382: temp = 0.000109, best score = 0.00282661, cur score = 0.00324564, worse accepted = 25.16%\n", "Gen #383: temp = 0.000108, best score = 0.00282661, cur score = 0.00331168, worse accepted = 25.41%\n", "Gen #384: temp = 0.000106, best score = 0.00282661, cur score = 0.00350843, worse accepted = 26.49%\n", "Gen #385: temp = 0.000105, best score = 0.00282661, cur score = 0.00327097, worse accepted = 26.68%\n", "Gen #386: temp = 0.000104, best score = 0.00282661, cur score = 0.00353260, worse accepted = 25.40%\n", "Gen #387: temp = 0.000103, best score = 0.00282661, cur score = 0.00362527, worse accepted = 23.81%\n", "Gen #388: temp = 0.000102, best score = 0.00282661, cur score = 0.00373238, worse accepted = 26.24%\n", "Gen #389: temp = 0.000101, best score = 0.00282661, cur score = 0.00318451, worse accepted = 26.10%\n", "Gen #390: temp = 0.000100, best score = 0.00282661, cur score = 0.00322435, worse accepted = 26.27%\n", "Gen #391: temp = 0.000099, best score = 0.00282661, cur score = 0.00320603, worse accepted = 24.71%\n", "Gen #392: temp = 0.000098, best score = 0.00282661, cur score = 0.00293739, worse accepted = 27.05%\n", "Gen #393: temp = 0.000097, best score = 0.00282661, cur score = 0.00303683, worse accepted = 26.28%\n", "Gen #394: temp = 0.000096, best score = 0.00282661, cur score = 0.00339296, worse accepted = 26.21%\n", "Gen #395: temp = 0.000095, best score = 0.00282555, cur score = 0.00347343, worse accepted = 25.69%\n", "Gen #396: temp = 0.000094, best score = 0.00282555, cur score = 0.00326278, worse accepted = 23.48%\n", "Gen #397: temp = 0.000093, best score = 0.00282555, cur score = 0.00315376, worse accepted = 24.52%\n", "Gen #398: temp = 0.000093, best score = 0.00282555, cur score = 0.00306899, worse accepted = 25.42%\n", "Gen #399: temp = 0.000092, best score = 0.00282555, cur score = 0.00354280, worse accepted = 24.67%\n", "Gen #400: temp = 0.000091, best score = 0.00282555, cur score = 0.00295940, worse accepted = 24.43%\n", "Gen #401: temp = 0.000090, best score = 0.00282555, cur score = 0.00341952, worse accepted = 25.28%\n", "Gen #402: temp = 0.000089, best score = 0.00282555, cur score = 0.00309021, worse accepted = 24.80%\n", "Gen #403: temp = 0.000088, best score = 0.00282555, cur score = 0.00293346, worse accepted = 24.96%\n", "Gen #404: temp = 0.000087, best score = 0.00282555, cur score = 0.00326222, worse accepted = 24.60%\n", "Gen #405: temp = 0.000086, best score = 0.00282555, cur score = 0.00320245, worse accepted = 24.40%\n", "Gen #406: temp = 0.000085, best score = 0.00282555, cur score = 0.00300466, worse accepted = 23.58%\n", "Gen #407: temp = 0.000085, best score = 0.00282555, cur score = 0.00314200, worse accepted = 24.31%\n", "Gen #408: temp = 0.000084, best score = 0.00282555, cur score = 0.00300882, worse accepted = 24.26%\n", "Gen #409: temp = 0.000083, best score = 0.00282555, cur score = 0.00328385, worse accepted = 23.94%\n", "Gen #410: temp = 0.000082, best score = 0.00282555, cur score = 0.00301955, worse accepted = 22.89%\n", "Gen #411: temp = 0.000081, best score = 0.00282555, cur score = 0.00302449, worse accepted = 24.44%\n", "Gen #412: temp = 0.000080, best score = 0.00282555, cur score = 0.00322166, worse accepted = 23.40%\n", "Gen #413: temp = 0.000080, best score = 0.00282555, cur score = 0.00328646, worse accepted = 22.94%\n", "Gen #414: temp = 0.000079, best score = 0.00282555, cur score = 0.00310057, worse accepted = 22.25%\n", "Gen #415: temp = 0.000078, best score = 0.00282555, cur score = 0.00290986, worse accepted = 22.46%\n", "Gen #416: temp = 0.000077, best score = 0.00282555, cur score = 0.00298779, worse accepted = 22.56%\n", "Gen #417: temp = 0.000076, best score = 0.00282555, cur score = 0.00313503, worse accepted = 22.41%\n", "Gen #418: temp = 0.000076, best score = 0.00282555, cur score = 0.00316589, worse accepted = 22.76%\n", "Gen #419: temp = 0.000075, best score = 0.00282555, cur score = 0.00307725, worse accepted = 21.89%\n", "Gen #420: temp = 0.000074, best score = 0.00282555, cur score = 0.00305873, worse accepted = 21.14%\n", "Gen #421: temp = 0.000073, best score = 0.00282555, cur score = 0.00300280, worse accepted = 21.05%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #422: temp = 0.000073, best score = 0.00282555, cur score = 0.00291056, worse accepted = 21.32%\n", "Gen #423: temp = 0.000072, best score = 0.00282555, cur score = 0.00295071, worse accepted = 20.85%\n", "Gen #424: temp = 0.000071, best score = 0.00282555, cur score = 0.00296405, worse accepted = 22.03%\n", "Gen #425: temp = 0.000071, best score = 0.00282555, cur score = 0.00300549, worse accepted = 20.72%\n", "Gen #426: temp = 0.000070, best score = 0.00282555, cur score = 0.00302343, worse accepted = 21.10%\n", "Gen #427: temp = 0.000069, best score = 0.00282555, cur score = 0.00302089, worse accepted = 21.37%\n", "Gen #428: temp = 0.000068, best score = 0.00282555, cur score = 0.00332846, worse accepted = 21.18%\n", "Gen #429: temp = 0.000068, best score = 0.00282555, cur score = 0.00292451, worse accepted = 20.85%\n", "Gen #430: temp = 0.000067, best score = 0.00282555, cur score = 0.00305865, worse accepted = 21.47%\n", "Gen #431: temp = 0.000066, best score = 0.00282555, cur score = 0.00304911, worse accepted = 19.60%\n", "Gen #432: temp = 0.000066, best score = 0.00282555, cur score = 0.00331210, worse accepted = 20.35%\n", "Gen #433: temp = 0.000065, best score = 0.00282555, cur score = 0.00314741, worse accepted = 18.95%\n", "Gen #434: temp = 0.000064, best score = 0.00282555, cur score = 0.00295685, worse accepted = 19.32%\n", "Gen #435: temp = 0.000064, best score = 0.00282555, cur score = 0.00290092, worse accepted = 19.62%\n", "Gen #436: temp = 0.000063, best score = 0.00282555, cur score = 0.00301174, worse accepted = 19.51%\n", "Gen #437: temp = 0.000063, best score = 0.00282555, cur score = 0.00283851, worse accepted = 19.59%\n", "Gen #438: temp = 0.000062, best score = 0.00282399, cur score = 0.00298867, worse accepted = 19.53%\n", "Gen #439: temp = 0.000061, best score = 0.00282399, cur score = 0.00306217, worse accepted = 19.12%\n", "Gen #440: temp = 0.000061, best score = 0.00282399, cur score = 0.00306440, worse accepted = 17.71%\n", "Gen #441: temp = 0.000060, best score = 0.00282399, cur score = 0.00290866, worse accepted = 19.29%\n", "Gen #442: temp = 0.000059, best score = 0.00282399, cur score = 0.00293445, worse accepted = 17.88%\n", "Gen #443: temp = 0.000059, best score = 0.00282399, cur score = 0.00306438, worse accepted = 18.34%\n", "Gen #444: temp = 0.000058, best score = 0.00282399, cur score = 0.00304648, worse accepted = 17.78%\n", "Gen #445: temp = 0.000058, best score = 0.00282399, cur score = 0.00297655, worse accepted = 17.52%\n", "Gen #446: temp = 0.000057, best score = 0.00282399, cur score = 0.00302305, worse accepted = 16.76%\n", "Gen #447: temp = 0.000057, best score = 0.00282399, cur score = 0.00310094, worse accepted = 17.41%\n", "Gen #448: temp = 0.000056, best score = 0.00282399, cur score = 0.00296720, worse accepted = 17.34%\n", "Gen #449: temp = 0.000055, best score = 0.00282399, cur score = 0.00313376, worse accepted = 17.76%\n", "Gen #450: temp = 0.000055, best score = 0.00282399, cur score = 0.00319593, worse accepted = 16.86%\n", "Gen #451: temp = 0.000054, best score = 0.00282352, cur score = 0.00314498, worse accepted = 17.46%\n", "Gen #452: temp = 0.000054, best score = 0.00282352, cur score = 0.00327085, worse accepted = 16.94%\n", "Gen #453: temp = 0.000053, best score = 0.00282352, cur score = 0.00321885, worse accepted = 17.19%\n", "Gen #454: temp = 0.000053, best score = 0.00282352, cur score = 0.00291994, worse accepted = 16.88%\n", "Gen #455: temp = 0.000052, best score = 0.00282352, cur score = 0.00284689, worse accepted = 16.24%\n", "Gen #456: temp = 0.000052, best score = 0.00282352, cur score = 0.00307276, worse accepted = 16.15%\n", "Gen #457: temp = 0.000051, best score = 0.00282352, cur score = 0.00297731, worse accepted = 16.23%\n", "Gen #458: temp = 0.000051, best score = 0.00282352, cur score = 0.00300023, worse accepted = 16.25%\n", "Gen #459: temp = 0.000050, best score = 0.00282352, cur score = 0.00315536, worse accepted = 15.59%\n", "Gen #460: temp = 0.000050, best score = 0.00282352, cur score = 0.00296586, worse accepted = 15.85%\n", "Gen #461: temp = 0.000049, best score = 0.00282352, cur score = 0.00302821, worse accepted = 15.82%\n", "Gen #462: temp = 0.000049, best score = 0.00282352, cur score = 0.00312759, worse accepted = 15.18%\n", "Gen #463: temp = 0.000048, best score = 0.00282352, cur score = 0.00294566, worse accepted = 15.18%\n", "Gen #464: temp = 0.000048, best score = 0.00282352, cur score = 0.00285555, worse accepted = 15.44%\n", "Gen #465: temp = 0.000047, best score = 0.00282352, cur score = 0.00293623, worse accepted = 14.70%\n", "Gen #466: temp = 0.000047, best score = 0.00282352, cur score = 0.00289496, worse accepted = 14.32%\n", "Gen #467: temp = 0.000046, best score = 0.00282352, cur score = 0.00301178, worse accepted = 14.90%\n", "Gen #468: temp = 0.000046, best score = 0.00282352, cur score = 0.00289300, worse accepted = 15.05%\n", "Gen #469: temp = 0.000045, best score = 0.00282352, cur score = 0.00299698, worse accepted = 13.86%\n", "Gen #470: temp = 0.000045, best score = 0.00282352, cur score = 0.00302974, worse accepted = 13.95%\n", "Gen #471: temp = 0.000044, best score = 0.00282352, cur score = 0.00309538, worse accepted = 13.90%\n", "Gen #472: temp = 0.000044, best score = 0.00282352, cur score = 0.00299006, worse accepted = 13.45%\n", "Gen #473: temp = 0.000044, best score = 0.00282352, cur score = 0.00295515, worse accepted = 13.19%\n", "Gen #474: temp = 0.000043, best score = 0.00282352, cur score = 0.00295893, worse accepted = 13.03%\n", "Gen #475: temp = 0.000043, best score = 0.00282352, cur score = 0.00291678, worse accepted = 13.15%\n", "Gen #476: temp = 0.000042, best score = 0.00282352, cur score = 0.00293394, worse accepted = 12.99%\n", "Gen #477: temp = 0.000042, best score = 0.00282352, cur score = 0.00289036, worse accepted = 13.23%\n", "Gen #478: temp = 0.000041, best score = 0.00282352, cur score = 0.00288886, worse accepted = 13.32%\n", "Gen #479: temp = 0.000041, best score = 0.00282352, cur score = 0.00301357, worse accepted = 12.52%\n", "Gen #480: temp = 0.000041, best score = 0.00282352, cur score = 0.00295315, worse accepted = 12.01%\n", "Gen #481: temp = 0.000040, best score = 0.00282352, cur score = 0.00292119, worse accepted = 11.33%\n", "Gen #482: temp = 0.000040, best score = 0.00282352, cur score = 0.00285701, worse accepted = 12.28%\n", "Gen #483: temp = 0.000039, best score = 0.00282352, cur score = 0.00298790, worse accepted = 12.65%\n", "Gen #484: temp = 0.000039, best score = 0.00282352, cur score = 0.00287292, worse accepted = 12.20%\n", "Gen #485: temp = 0.000039, best score = 0.00282352, cur score = 0.00298907, worse accepted = 12.63%\n", "Gen #486: temp = 0.000038, best score = 0.00282352, cur score = 0.00298497, worse accepted = 10.76%\n", "Gen #487: temp = 0.000038, best score = 0.00282352, cur score = 0.00284877, worse accepted = 11.88%\n", "Gen #488: temp = 0.000037, best score = 0.00282352, cur score = 0.00311704, worse accepted = 11.48%\n", "Gen #489: temp = 0.000037, best score = 0.00282352, cur score = 0.00293262, worse accepted = 10.58%\n", "Gen #490: temp = 0.000037, best score = 0.00282352, cur score = 0.00290851, worse accepted = 11.83%\n", "Gen #491: temp = 0.000036, best score = 0.00282352, cur score = 0.00293838, worse accepted = 11.09%\n", "Gen #492: temp = 0.000036, best score = 0.00282352, cur score = 0.00290417, worse accepted = 10.85%\n", "Gen #493: temp = 0.000036, best score = 0.00282352, cur score = 0.00286730, worse accepted = 10.64%\n", "Gen #494: temp = 0.000035, best score = 0.00282352, cur score = 0.00285161, worse accepted = 10.31%\n", "Gen #495: temp = 0.000035, best score = 0.00282352, cur score = 0.00287700, worse accepted = 10.20%\n", "Gen #496: temp = 0.000035, best score = 0.00282352, cur score = 0.00285829, worse accepted = 10.68%\n", "Gen #497: temp = 0.000034, best score = 0.00282352, cur score = 0.00297178, worse accepted = 9.42%\n", "Gen #498: temp = 0.000034, best score = 0.00282352, cur score = 0.00291433, worse accepted = 9.33%\n", "Gen #499: temp = 0.000034, best score = 0.00282352, cur score = 0.00294371, worse accepted = 10.19%\n", "Gen #500: temp = 0.000033, best score = 0.00282352, cur score = 0.00295236, worse accepted = 10.08%\n", "Gen #501: temp = 0.000033, best score = 0.00282352, cur score = 0.00292138, worse accepted = 9.52%\n", "Gen #502: temp = 0.000033, best score = 0.00282352, cur score = 0.00288636, worse accepted = 9.13%\n", "Gen #503: temp = 0.000032, best score = 0.00282352, cur score = 0.00291872, worse accepted = 9.80%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #504: temp = 0.000032, best score = 0.00282352, cur score = 0.00301426, worse accepted = 8.89%\n", "Gen #505: temp = 0.000032, best score = 0.00282352, cur score = 0.00293973, worse accepted = 8.46%\n", "Gen #506: temp = 0.000031, best score = 0.00282352, cur score = 0.00284868, worse accepted = 9.16%\n", "Gen #507: temp = 0.000031, best score = 0.00282352, cur score = 0.00298154, worse accepted = 8.11%\n", "Gen #508: temp = 0.000031, best score = 0.00282352, cur score = 0.00292223, worse accepted = 9.14%\n", "Gen #509: temp = 0.000030, best score = 0.00282352, cur score = 0.00290823, worse accepted = 8.20%\n", "Gen #510: temp = 0.000030, best score = 0.00282352, cur score = 0.00292722, worse accepted = 8.79%\n", "Gen #511: temp = 0.000030, best score = 0.00282352, cur score = 0.00296483, worse accepted = 8.35%\n", "Gen #512: temp = 0.000029, best score = 0.00282352, cur score = 0.00289419, worse accepted = 7.84%\n", "Gen #513: temp = 0.000029, best score = 0.00282352, cur score = 0.00302742, worse accepted = 8.68%\n", "Gen #514: temp = 0.000029, best score = 0.00282352, cur score = 0.00303245, worse accepted = 7.98%\n", "Gen #515: temp = 0.000029, best score = 0.00282352, cur score = 0.00288873, worse accepted = 8.00%\n", "Gen #516: temp = 0.000028, best score = 0.00282352, cur score = 0.00292458, worse accepted = 7.22%\n", "Gen #517: temp = 0.000028, best score = 0.00282352, cur score = 0.00289006, worse accepted = 7.58%\n", "Gen #518: temp = 0.000028, best score = 0.00282352, cur score = 0.00287522, worse accepted = 7.61%\n", "Gen #519: temp = 0.000027, best score = 0.00282352, cur score = 0.00292310, worse accepted = 7.82%\n", "Gen #520: temp = 0.000027, best score = 0.00282352, cur score = 0.00296005, worse accepted = 7.25%\n", "Gen #521: temp = 0.000027, best score = 0.00282352, cur score = 0.00295419, worse accepted = 7.45%\n", "Gen #522: temp = 0.000027, best score = 0.00282352, cur score = 0.00295981, worse accepted = 6.81%\n", "Gen #523: temp = 0.000026, best score = 0.00282352, cur score = 0.00287189, worse accepted = 7.09%\n", "Gen #524: temp = 0.000026, best score = 0.00282352, cur score = 0.00287052, worse accepted = 6.79%\n", "Gen #525: temp = 0.000026, best score = 0.00282352, cur score = 0.00304255, worse accepted = 6.88%\n", "Gen #526: temp = 0.000026, best score = 0.00282352, cur score = 0.00288374, worse accepted = 6.27%\n", "Gen #527: temp = 0.000025, best score = 0.00282352, cur score = 0.00287917, worse accepted = 6.26%\n", "Gen #528: temp = 0.000025, best score = 0.00282352, cur score = 0.00286129, worse accepted = 6.45%\n", "Gen #529: temp = 0.000025, best score = 0.00282352, cur score = 0.00292327, worse accepted = 6.98%\n", "Gen #530: temp = 0.000025, best score = 0.00282352, cur score = 0.00295775, worse accepted = 6.82%\n", "Gen #531: temp = 0.000024, best score = 0.00282352, cur score = 0.00283543, worse accepted = 5.88%\n", "Gen #532: temp = 0.000024, best score = 0.00282352, cur score = 0.00285778, worse accepted = 6.05%\n", "Gen #533: temp = 0.000024, best score = 0.00282352, cur score = 0.00290149, worse accepted = 5.82%\n", "Gen #534: temp = 0.000024, best score = 0.00282352, cur score = 0.00285279, worse accepted = 5.90%\n", "Gen #535: temp = 0.000023, best score = 0.00282228, cur score = 0.00287213, worse accepted = 5.53%\n", "Gen #536: temp = 0.000023, best score = 0.00282228, cur score = 0.00291727, worse accepted = 5.75%\n", "Gen #537: temp = 0.000023, best score = 0.00282228, cur score = 0.00285556, worse accepted = 4.91%\n", "Gen #538: temp = 0.000023, best score = 0.00282228, cur score = 0.00286917, worse accepted = 5.63%\n", "Gen #539: temp = 0.000022, best score = 0.00282228, cur score = 0.00283897, worse accepted = 4.97%\n", "Gen #540: temp = 0.000022, best score = 0.00282228, cur score = 0.00286789, worse accepted = 5.24%\n", "Gen #541: temp = 0.000022, best score = 0.00282228, cur score = 0.00284637, worse accepted = 4.80%\n", "Gen #542: temp = 0.000022, best score = 0.00282228, cur score = 0.00289058, worse accepted = 5.44%\n", "Gen #543: temp = 0.000022, best score = 0.00282228, cur score = 0.00283374, worse accepted = 5.41%\n", "Gen #544: temp = 0.000021, best score = 0.00282228, cur score = 0.00287185, worse accepted = 4.49%\n", "Gen #545: temp = 0.000021, best score = 0.00282228, cur score = 0.00314620, worse accepted = 4.57%\n", "Gen #546: temp = 0.000021, best score = 0.00282228, cur score = 0.00288022, worse accepted = 4.46%\n", "Gen #547: temp = 0.000021, best score = 0.00282228, cur score = 0.00285219, worse accepted = 4.80%\n", "Gen #548: temp = 0.000020, best score = 0.00282228, cur score = 0.00285762, worse accepted = 4.70%\n", "Gen #549: temp = 0.000020, best score = 0.00282228, cur score = 0.00292280, worse accepted = 4.65%\n", "Gen #550: temp = 0.000020, best score = 0.00282228, cur score = 0.00289580, worse accepted = 4.82%\n", "Gen #551: temp = 0.000020, best score = 0.00282228, cur score = 0.00288486, worse accepted = 4.50%\n", "Gen #552: temp = 0.000020, best score = 0.00282228, cur score = 0.00296735, worse accepted = 4.18%\n", "Gen #553: temp = 0.000019, best score = 0.00282228, cur score = 0.00285546, worse accepted = 4.48%\n", "Gen #554: temp = 0.000019, best score = 0.00282228, cur score = 0.00294619, worse accepted = 3.98%\n", "Gen #555: temp = 0.000019, best score = 0.00282228, cur score = 0.00300395, worse accepted = 3.85%\n", "Gen #556: temp = 0.000019, best score = 0.00282228, cur score = 0.00292518, worse accepted = 4.14%\n", "Gen #557: temp = 0.000019, best score = 0.00282228, cur score = 0.00294393, worse accepted = 4.04%\n", "Gen #558: temp = 0.000019, best score = 0.00282228, cur score = 0.00284439, worse accepted = 3.49%\n", "Gen #559: temp = 0.000018, best score = 0.00282228, cur score = 0.00289565, worse accepted = 4.50%\n", "Gen #560: temp = 0.000018, best score = 0.00282228, cur score = 0.00295498, worse accepted = 3.86%\n", "Gen #561: temp = 0.000018, best score = 0.00282228, cur score = 0.00288367, worse accepted = 4.01%\n", "Gen #562: temp = 0.000018, best score = 0.00282228, cur score = 0.00287532, worse accepted = 3.49%\n", "Gen #563: temp = 0.000018, best score = 0.00282228, cur score = 0.00284416, worse accepted = 3.38%\n", "Gen #564: temp = 0.000017, best score = 0.00282228, cur score = 0.00291985, worse accepted = 3.67%\n", "Gen #565: temp = 0.000017, best score = 0.00282228, cur score = 0.00286841, worse accepted = 3.23%\n", "Gen #566: temp = 0.000017, best score = 0.00282228, cur score = 0.00287563, worse accepted = 3.35%\n", "Gen #567: temp = 0.000017, best score = 0.00282228, cur score = 0.00283407, worse accepted = 3.31%\n", "Gen #568: temp = 0.000017, best score = 0.00282228, cur score = 0.00293062, worse accepted = 3.78%\n", "Gen #569: temp = 0.000017, best score = 0.00282228, cur score = 0.00289726, worse accepted = 3.18%\n", "Gen #570: temp = 0.000016, best score = 0.00282228, cur score = 0.00289810, worse accepted = 3.61%\n", "Gen #571: temp = 0.000016, best score = 0.00282228, cur score = 0.00289357, worse accepted = 2.90%\n", "Gen #572: temp = 0.000016, best score = 0.00282228, cur score = 0.00286447, worse accepted = 3.11%\n", "Gen #573: temp = 0.000016, best score = 0.00282228, cur score = 0.00285546, worse accepted = 2.64%\n", "Gen #574: temp = 0.000016, best score = 0.00282213, cur score = 0.00295729, worse accepted = 3.14%\n", "Gen #575: temp = 0.000016, best score = 0.00282213, cur score = 0.00287079, worse accepted = 2.65%\n", "Gen #576: temp = 0.000015, best score = 0.00282213, cur score = 0.00286120, worse accepted = 2.99%\n", "Gen #577: temp = 0.000015, best score = 0.00282213, cur score = 0.00286934, worse accepted = 2.88%\n", "Gen #578: temp = 0.000015, best score = 0.00282213, cur score = 0.00284686, worse accepted = 2.33%\n", "Gen #579: temp = 0.000015, best score = 0.00282213, cur score = 0.00287839, worse accepted = 2.28%\n", "Gen #580: temp = 0.000015, best score = 0.00282213, cur score = 0.00287673, worse accepted = 2.51%\n", "Gen #581: temp = 0.000015, best score = 0.00282213, cur score = 0.00288645, worse accepted = 2.39%\n", "Gen #582: temp = 0.000015, best score = 0.00282213, cur score = 0.00287310, worse accepted = 2.84%\n", "Gen #583: temp = 0.000014, best score = 0.00282213, cur score = 0.00287084, worse accepted = 2.66%\n", "Gen #584: temp = 0.000014, best score = 0.00282213, cur score = 0.00289550, worse accepted = 2.66%\n", "Gen #585: temp = 0.000014, best score = 0.00282213, cur score = 0.00286293, worse accepted = 2.09%\n", "Gen #586: temp = 0.000014, best score = 0.00282213, cur score = 0.00283775, worse accepted = 2.57%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #587: temp = 0.000014, best score = 0.00282213, cur score = 0.00285262, worse accepted = 2.12%\n", "Gen #588: temp = 0.000014, best score = 0.00282213, cur score = 0.00286377, worse accepted = 2.28%\n", "Gen #589: temp = 0.000014, best score = 0.00282213, cur score = 0.00284990, worse accepted = 2.23%\n", "Gen #590: temp = 0.000013, best score = 0.00282213, cur score = 0.00286943, worse accepted = 2.00%\n", "Gen #591: temp = 0.000013, best score = 0.00282213, cur score = 0.00283590, worse accepted = 1.65%\n", "Gen #592: temp = 0.000013, best score = 0.00282213, cur score = 0.00285802, worse accepted = 2.55%\n", "Gen #593: temp = 0.000013, best score = 0.00282213, cur score = 0.00285805, worse accepted = 1.66%\n", "Gen #594: temp = 0.000013, best score = 0.00282213, cur score = 0.00286691, worse accepted = 2.09%\n", "Gen #595: temp = 0.000013, best score = 0.00282213, cur score = 0.00285692, worse accepted = 1.88%\n", "Gen #596: temp = 0.000013, best score = 0.00282213, cur score = 0.00287001, worse accepted = 1.62%\n", "Gen #597: temp = 0.000013, best score = 0.00282213, cur score = 0.00287644, worse accepted = 1.78%\n", "Gen #598: temp = 0.000012, best score = 0.00282213, cur score = 0.00291116, worse accepted = 1.50%\n", "Gen #599: temp = 0.000012, best score = 0.00282213, cur score = 0.00285400, worse accepted = 1.25%\n", "Gen #600: temp = 0.000012, best score = 0.00282213, cur score = 0.00284121, worse accepted = 1.87%\n", "Gen #601: temp = 0.000012, best score = 0.00282213, cur score = 0.00283374, worse accepted = 1.55%\n", "Gen #602: temp = 0.000012, best score = 0.00282213, cur score = 0.00284996, worse accepted = 1.86%\n", "Gen #603: temp = 0.000012, best score = 0.00282213, cur score = 0.00283635, worse accepted = 1.54%\n", "Gen #604: temp = 0.000012, best score = 0.00282213, cur score = 0.00289696, worse accepted = 1.54%\n", "Gen #605: temp = 0.000012, best score = 0.00282213, cur score = 0.00287550, worse accepted = 1.85%\n", "Gen #606: temp = 0.000011, best score = 0.00282213, cur score = 0.00284614, worse accepted = 1.42%\n", "Gen #607: temp = 0.000011, best score = 0.00282213, cur score = 0.00288276, worse accepted = 1.55%\n", "Gen #608: temp = 0.000011, best score = 0.00282213, cur score = 0.00285940, worse accepted = 1.65%\n", "Gen #609: temp = 0.000011, best score = 0.00282213, cur score = 0.00283521, worse accepted = 1.69%\n", "Gen #610: temp = 0.000011, best score = 0.00282213, cur score = 0.00284637, worse accepted = 1.93%\n", "Gen #611: temp = 0.000011, best score = 0.00282213, cur score = 0.00283507, worse accepted = 1.47%\n", "Gen #612: temp = 0.000011, best score = 0.00282213, cur score = 0.00283644, worse accepted = 1.13%\n", "Gen #613: temp = 0.000011, best score = 0.00282213, cur score = 0.00284413, worse accepted = 1.55%\n", "Gen #614: temp = 0.000011, best score = 0.00282213, cur score = 0.00285173, worse accepted = 1.51%\n", "Gen #615: temp = 0.000010, best score = 0.00282213, cur score = 0.00283636, worse accepted = 1.35%\n", "Gen #616: temp = 0.000010, best score = 0.00282213, cur score = 0.00283197, worse accepted = 1.26%\n", "Gen #617: temp = 0.000010, best score = 0.00282213, cur score = 0.00283751, worse accepted = 1.26%\n", "Gen #618: temp = 0.000010, best score = 0.00282213, cur score = 0.00287413, worse accepted = 1.14%\n", "Gen #619: temp = 0.000010, best score = 0.00282213, cur score = 0.00284253, worse accepted = 1.24%\n", "Gen #620: temp = 0.000010, best score = 0.00282213, cur score = 0.00286056, worse accepted = 1.04%\n", "Gen #621: temp = 0.000010, best score = 0.00282213, cur score = 0.00285402, worse accepted = 1.18%\n", "Gen #622: temp = 0.000010, best score = 0.00282213, cur score = 0.00283536, worse accepted = 0.99%\n", "Gen #623: temp = 0.000010, best score = 0.00282213, cur score = 0.00283917, worse accepted = 0.99%\n", "Gen #624: temp = 0.000010, best score = 0.00282213, cur score = 0.00287334, worse accepted = 1.00%\n", "Gen #625: temp = 0.000009, best score = 0.00282213, cur score = 0.00284224, worse accepted = 1.28%\n", "Gen #626: temp = 0.000009, best score = 0.00282213, cur score = 0.00286115, worse accepted = 0.98%\n", "Gen #627: temp = 0.000009, best score = 0.00282213, cur score = 0.00284192, worse accepted = 0.91%\n", "Gen #628: temp = 0.000009, best score = 0.00282213, cur score = 0.00284660, worse accepted = 0.62%\n", "Gen #629: temp = 0.000009, best score = 0.00282213, cur score = 0.00286651, worse accepted = 0.89%\n", "Gen #630: temp = 0.000009, best score = 0.00282213, cur score = 0.00283778, worse accepted = 0.94%\n", "Gen #631: temp = 0.000009, best score = 0.00282213, cur score = 0.00286499, worse accepted = 0.87%\n", "Gen #632: temp = 0.000009, best score = 0.00282213, cur score = 0.00284826, worse accepted = 1.20%\n", "Gen #633: temp = 0.000009, best score = 0.00282213, cur score = 0.00283451, worse accepted = 0.66%\n", "Gen #634: temp = 0.000009, best score = 0.00282213, cur score = 0.00287254, worse accepted = 0.81%\n", "Gen #635: temp = 0.000009, best score = 0.00282213, cur score = 0.00285026, worse accepted = 0.76%\n", "Gen #636: temp = 0.000008, best score = 0.00282213, cur score = 0.00283857, worse accepted = 0.88%\n", "Gen #637: temp = 0.000008, best score = 0.00282213, cur score = 0.00283599, worse accepted = 0.65%\n", "Gen #638: temp = 0.000008, best score = 0.00282213, cur score = 0.00284501, worse accepted = 0.90%\n", "Gen #639: temp = 0.000008, best score = 0.00282213, cur score = 0.00284703, worse accepted = 1.10%\n", "Gen #640: temp = 0.000008, best score = 0.00282213, cur score = 0.00283691, worse accepted = 0.62%\n", "Gen #641: temp = 0.000008, best score = 0.00282213, cur score = 0.00283782, worse accepted = 0.78%\n", "Gen #642: temp = 0.000008, best score = 0.00282213, cur score = 0.00283647, worse accepted = 0.81%\n", "Gen #643: temp = 0.000008, best score = 0.00282213, cur score = 0.00283355, worse accepted = 0.64%\n", "Gen #644: temp = 0.000008, best score = 0.00282213, cur score = 0.00284414, worse accepted = 0.90%\n", "Gen #645: temp = 0.000008, best score = 0.00282213, cur score = 0.00286192, worse accepted = 0.53%\n", "Gen #646: temp = 0.000008, best score = 0.00282213, cur score = 0.00284996, worse accepted = 0.80%\n", "Gen #647: temp = 0.000008, best score = 0.00282213, cur score = 0.00284152, worse accepted = 0.77%\n", "Gen #648: temp = 0.000007, best score = 0.00282213, cur score = 0.00283080, worse accepted = 0.61%\n", "Gen #649: temp = 0.000007, best score = 0.00282213, cur score = 0.00286130, worse accepted = 0.27%\n", "Gen #650: temp = 0.000007, best score = 0.00282213, cur score = 0.00283760, worse accepted = 0.64%\n", "Gen #651: temp = 0.000007, best score = 0.00282213, cur score = 0.00284091, worse accepted = 0.47%\n", "Gen #652: temp = 0.000007, best score = 0.00282213, cur score = 0.00283603, worse accepted = 0.61%\n", "Gen #653: temp = 0.000007, best score = 0.00282213, cur score = 0.00284544, worse accepted = 0.67%\n", "Gen #654: temp = 0.000007, best score = 0.00282213, cur score = 0.00283064, worse accepted = 0.65%\n", "Gen #655: temp = 0.000007, best score = 0.00282213, cur score = 0.00283663, worse accepted = 0.63%\n", "Gen #656: temp = 0.000007, best score = 0.00282213, cur score = 0.00283858, worse accepted = 0.59%\n", "Gen #657: temp = 0.000007, best score = 0.00282213, cur score = 0.00284080, worse accepted = 0.38%\n", "Gen #658: temp = 0.000007, best score = 0.00282213, cur score = 0.00284713, worse accepted = 0.48%\n", "Gen #659: temp = 0.000007, best score = 0.00282213, cur score = 0.00282800, worse accepted = 0.45%\n", "Gen #660: temp = 0.000007, best score = 0.00282213, cur score = 0.00283579, worse accepted = 0.31%\n", "Gen #661: temp = 0.000007, best score = 0.00282213, cur score = 0.00285730, worse accepted = 0.49%\n", "Gen #662: temp = 0.000007, best score = 0.00282213, cur score = 0.00284452, worse accepted = 0.55%\n", "Gen #663: temp = 0.000006, best score = 0.00282213, cur score = 0.00283635, worse accepted = 0.28%\n", "Gen #664: temp = 0.000006, best score = 0.00282213, cur score = 0.00284187, worse accepted = 0.27%\n", "Gen #665: temp = 0.000006, best score = 0.00282213, cur score = 0.00286378, worse accepted = 0.44%\n", "Gen #666: temp = 0.000006, best score = 0.00282213, cur score = 0.00283448, worse accepted = 0.41%\n", "Gen #667: temp = 0.000006, best score = 0.00282213, cur score = 0.00284076, worse accepted = 0.47%\n", "Gen #668: temp = 0.000006, best score = 0.00282213, cur score = 0.00284470, worse accepted = 0.30%\n", "Gen #669: temp = 0.000006, best score = 0.00282213, cur score = 0.00286877, worse accepted = 0.38%\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gen #670: temp = 0.000006, best score = 0.00282213, cur score = 0.00284297, worse accepted = 0.25%\n", "Gen #671: temp = 0.000006, best score = 0.00282213, cur score = 0.00283721, worse accepted = 0.35%\n", "Gen #672: temp = 0.000006, best score = 0.00282213, cur score = 0.00282848, worse accepted = 0.31%\n", "Gen #673: temp = 0.000006, best score = 0.00282213, cur score = 0.00283085, worse accepted = 0.20%\n", "Gen #674: temp = 0.000006, best score = 0.00282213, cur score = 0.00283281, worse accepted = 0.31%\n", "Gen #675: temp = 0.000006, best score = 0.00282213, cur score = 0.00284350, worse accepted = 0.27%\n", "Gen #676: temp = 0.000006, best score = 0.00282213, cur score = 0.00283141, worse accepted = 0.21%\n", "Gen #677: temp = 0.000006, best score = 0.00282213, cur score = 0.00283856, worse accepted = 0.29%\n", "Gen #678: temp = 0.000006, best score = 0.00282213, cur score = 0.00283061, worse accepted = 0.34%\n", "Gen #679: temp = 0.000005, best score = 0.00282213, cur score = 0.00283833, worse accepted = 0.28%\n", "Gen #680: temp = 0.000005, best score = 0.00282213, cur score = 0.00282741, worse accepted = 0.19%\n", "Gen #681: temp = 0.000005, best score = 0.00282213, cur score = 0.00284160, worse accepted = 0.19%\n", "Gen #682: temp = 0.000005, best score = 0.00282213, cur score = 0.00283221, worse accepted = 0.18%\n", "Gen #683: temp = 0.000005, best score = 0.00282213, cur score = 0.00284166, worse accepted = 0.31%\n", "Gen #684: temp = 0.000005, best score = 0.00282213, cur score = 0.00283857, worse accepted = 0.29%\n", "Gen #685: temp = 0.000005, best score = 0.00282213, cur score = 0.00282455, worse accepted = 0.21%\n", "Gen #686: temp = 0.000005, best score = 0.00282213, cur score = 0.00283520, worse accepted = 0.25%\n", "Gen #687: temp = 0.000005, best score = 0.00282213, cur score = 0.00283705, worse accepted = 0.23%\n", "Gen #688: temp = 0.000005, best score = 0.00282213, cur score = 0.00282739, worse accepted = 0.15%\n" ] } ], "source": [ "temp = initial_temp\n", "generation = 0\n", "best_sol = None\n", "best_score = None\n", "\n", "while temp >= final_temp:\n", " generation += 1\n", " accepted_worse = 0\n", " total_worse = 0\n", " for i in range(trials_per_temp):\n", " new_sol = tweak(*sol)\n", " while not satisfies_constraints(*new_sol):\n", " new_sol = tweak(*sol)\n", "\n", " new_value = score(*new_sol)\n", " \n", " delta = new_value - value\n", " delta *= -1\n", " if delta >= 0:\n", " sol = new_sol\n", " value = new_value\n", " if best_score is None or value < best_score:\n", " best_sol = sol\n", " best_score = value\n", " else:\n", " total_worse += 1\n", " p = math.exp(delta/temp)\n", " r = random.random()\n", " if r <= p:\n", " accepted_worse += 1\n", " sol = new_sol\n", " value = new_value\n", "\n", " print(\n", " f\"Gen #{generation}: temp = {temp:.6f}, \"\n", " f\"best score = {best_score:.8f}, \"\n", " f\"cur score = {value:.8f}, \"\n", " f\"worse accepted = {round(accepted_worse/total_worse*100,2):.2f}%\"\n", " )\n", " temp = temp * alpha\n", " \n" ] }, { "cell_type": "code", "execution_count": null, "id": "fleet-textbook", "metadata": {}, "outputs": [], "source": [ "best_sol" ] }, { "cell_type": "code", "execution_count": null, "id": "718dc410", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "38a0fddd", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "d25f9e94", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "suspended-supplier", "metadata": { "scrolled": true }, "outputs": [], "source": [ "sol = best_sol\n", "print(g1(*sol), g2(*sol), g3(*sol), g4(*sol))" ] }, { "cell_type": "code", "execution_count": null, "id": "right-hydrogen", "metadata": {}, "outputs": [], "source": [ "score(*sol)" ] }, { "cell_type": "code", "execution_count": null, "id": "backed-florence", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "4ae4edaa", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "2342003d", "metadata": { "scrolled": true }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "b81ddddc", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "831e4b89", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "561d0440", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "bc646c3d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.2" } }, "nbformat": 4, "nbformat_minor": 5 }