From 97a125c104e3d680a5afab94f56ede0a0fe451dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Rustad?= Date: Sun, 9 Dec 2018 22:07:39 +0100 Subject: [PATCH 1/1] Initial commit --- best/10 | 2 + best/11 | 2 + best/12 | 2 + best/13 | 2 + best/14 | 2 + best/15 | 2 + best/16 | 2 + best/17 | 2 + best/18 | 2 + best/19 | 2 + best/20 | 2 + best/21 | 2 + best/22 | 2 + best/23 | 2 + best/24 | 2 + best/25 | 2 + best/26 | 2 + best/27 | 2 + best/3 | 2 + best/4 | 2 + best/5 | 2 + best/6 | 2 + best/7 | 2 + best/8 | 2 + best/9 | 2 + first.py | 239 +++++++++++++++++++++++ hexagonal.cpp | 515 ++++++++++++++++++++++++++++++++++++++++++++++++++ hexagons.sh | 7 + optimize.py | 78 ++++++++ scores.sh | 7 + 30 files changed, 896 insertions(+) create mode 100644 best/10 create mode 100644 best/11 create mode 100644 best/12 create mode 100644 best/13 create mode 100644 best/14 create mode 100644 best/15 create mode 100644 best/16 create mode 100644 best/17 create mode 100644 best/18 create mode 100644 best/19 create mode 100644 best/20 create mode 100644 best/21 create mode 100644 best/22 create mode 100644 best/23 create mode 100644 best/24 create mode 100644 best/25 create mode 100644 best/26 create mode 100644 best/27 create mode 100644 best/3 create mode 100644 best/4 create mode 100644 best/5 create mode 100644 best/6 create mode 100644 best/7 create mode 100644 best/8 create mode 100644 best/9 create mode 100644 first.py create mode 100644 hexagonal.cpp create mode 100755 hexagons.sh create mode 100644 optimize.py create mode 100755 scores.sh diff --git a/best/10 b/best/10 new file mode 100644 index 0000000..f47299f --- /dev/null +++ b/best/10 @@ -0,0 +1,2 @@ +726 +(3,2,1,4,3,1,3,2,1,2), (4,1,3,6,2,7,5,6,1,3,4), (5,2,4,5,1,6,4,2,4,7,6,1), (1,3,7,6,2,5,3,1,3,5,2,5,3), (2,7,5,1,3,4,6,2,6,7,1,4,7,2), (3,6,4,2,7,6,1,7,5,4,2,3,6,1,3), (1,5,1,3,4,5,2,4,3,1,3,4,5,2,4,1), (3,4,2,6,5,1,3,6,5,2,6,7,1,6,7,5,2), (2,7,1,4,7,2,4,7,1,7,4,5,2,4,3,1,3,4), (1,6,5,3,1,3,7,5,2,6,3,1,3,6,5,2,6,7,1), (3,4,2,4,5,6,1,3,5,4,2,4,7,1,7,4,5,2), (2,1,7,6,2,4,7,6,1,6,7,5,2,6,3,1,3), (3,5,3,1,3,5,2,4,5,3,1,3,5,4,2,4), (4,2,7,4,7,1,3,7,2,4,6,7,1,5,1), (1,5,6,2,6,5,6,1,7,5,2,4,7,3), (4,3,1,3,4,2,4,6,3,1,3,6,2), (2,4,7,6,1,3,5,2,4,7,5,1), (1,5,2,5,4,6,1,5,6,2,4), (2,3,1,3,2,1,2,3,1,3) diff --git a/best/11 b/best/11 new file mode 100644 index 0000000..7e7c2b9 --- /dev/null +++ b/best/11 @@ -0,0 +1,2 @@ +896 +(4,2,4,3,1,2,5,1,5,4,1), (1,3,1,5,2,6,4,3,2,3,2,5), (5,4,7,2,6,3,5,1,6,5,1,4,3), (3,2,6,5,4,1,6,2,7,4,2,6,1,2), (5,1,3,1,3,2,7,4,5,3,1,3,5,6,3), (4,2,6,5,4,7,5,3,1,6,2,7,4,2,4,1), (3,1,4,7,2,6,1,4,2,7,4,6,5,1,6,5,3), (5,2,7,3,1,3,5,6,7,5,3,1,3,2,3,7,2,5), (1,4,6,5,2,5,4,2,3,1,4,2,7,5,7,4,1,4,1), (2,6,3,1,4,6,7,1,4,7,6,5,6,4,1,6,2,3,5,2), (3,7,5,2,3,1,3,2,7,5,2,3,1,3,2,3,5,7,6,1,3), (1,4,1,5,7,6,4,6,3,1,4,5,7,6,5,4,1,4,2,4), (3,2,3,4,2,5,1,5,2,6,7,2,4,1,6,2,5,3,5), (4,5,6,1,3,6,7,4,5,3,1,3,5,7,3,7,6,1), (1,7,2,5,4,2,3,1,6,2,4,7,2,4,1,4,2), (3,4,6,7,1,6,5,4,7,5,6,1,7,6,3,5), (2,1,3,2,4,7,2,3,1,3,2,3,5,2,1), (1,4,7,5,3,1,4,5,6,7,5,4,1,3), (2,6,1,6,2,7,6,2,4,1,7,2,4), (3,5,4,7,5,3,1,3,5,6,3,5), (1,2,3,1,4,2,4,1,2,4,1) diff --git a/best/12 b/best/12 new file mode 100644 index 0000000..56d7742 --- /dev/null +++ b/best/12 @@ -0,0 +1,2 @@ +1088 +(4,3,1,3,4,1,2,3,1,3,2,1), (1,2,5,4,2,3,1,6,5,4,5,6,3), (3,4,7,6,1,5,7,4,7,2,6,1,4,2), (2,6,1,3,2,4,6,2,3,1,3,7,5,6,1), (1,7,5,4,5,6,3,1,4,7,6,4,2,3,1,2), (5,4,3,2,7,1,7,2,6,5,2,5,1,5,6,4,5), (3,2,5,1,3,6,4,5,7,3,1,3,6,4,7,2,3,1), (4,1,6,7,4,5,2,3,1,4,2,4,7,2,3,1,7,5,4), (5,2,4,3,2,7,1,7,6,5,6,7,5,1,7,5,4,6,2,3), (1,3,5,6,1,3,6,5,4,2,3,1,3,2,4,6,2,3,1,4,1), (2,6,1,7,2,6,4,2,3,1,4,5,6,7,5,3,1,5,6,7,5,2), (3,4,5,3,4,7,5,1,4,5,7,6,2,4,1,7,2,7,4,2,3,1,3), (1,6,2,7,1,3,2,6,7,2,3,1,3,5,6,4,6,3,1,5,6,4), (3,1,6,5,4,7,5,3,1,6,7,4,6,2,3,1,5,2,4,7,2), (2,4,3,2,6,1,4,2,4,5,2,7,1,7,6,4,7,6,3,1), (5,1,1,3,5,7,6,5,3,1,3,5,4,5,2,3,1,5,2), (3,2,5,4,2,3,1,6,2,6,7,2,3,1,6,5,4,3), (4,6,7,1,6,5,4,7,5,4,1,7,6,4,7,2,1), (1,3,2,4,7,2,3,1,3,2,4,5,2,3,1,3), (4,6,5,3,1,6,5,7,6,5,3,1,5,4,5), (2,1,6,2,7,4,2,4,1,7,2,7,6,2), (1,4,7,5,3,1,3,5,6,4,4,3,1), (2,3,1,4,2,4,1,2,3,1,5,2) diff --git a/best/13 b/best/13 new file mode 100644 index 0000000..a65b03c --- /dev/null +++ b/best/13 @@ -0,0 +1,2 @@ +1288 +(4,2,1,2,5,1,3,2,1,2,3,1,2), (1,3,6,4,3,4,1,5,7,6,5,6,4,5), (5,4,5,7,1,2,7,6,4,3,4,1,2,3,1), (3,2,1,2,3,4,5,3,2,1,2,5,6,7,5,2), (1,4,7,6,5,7,6,1,7,5,7,6,3,4,1,4,5), (2,6,5,3,4,1,2,3,6,4,3,4,1,2,6,7,3,1), (5,3,2,1,2,5,6,7,5,2,1,2,6,5,3,5,2,1,2), (4,1,4,5,7,6,3,4,1,4,5,7,3,7,4,1,4,7,5,3), (2,3,7,6,3,4,1,2,7,5,3,6,4,1,2,6,7,3,6,4,1), (1,6,5,2,1,2,6,5,3,6,2,1,2,7,6,3,5,2,1,2,7,3), (3,4,1,4,5,7,3,7,4,1,4,6,5,3,5,4,1,4,6,3,6,5,2), (1,2,5,6,3,6,4,1,2,5,7,3,7,4,1,2,7,3,7,5,4,1,4,1), (2,5,3,7,2,1,2,6,7,3,6,2,1,2,5,3,5,6,2,1,2,6,3,5,2), (1,4,1,4,5,7,3,5,4,1,4,5,3,7,6,4,1,4,5,3,5,7,2,1), (2,6,7,3,6,4,1,2,7,3,7,6,4,1,2,7,3,7,6,4,1,4,5), (3,5,2,1,2,5,3,6,5,2,1,2,6,3,5,6,2,1,2,6,1,3), (1,4,7,3,6,7,4,1,4,6,3,7,5,4,1,4,7,6,3,5,2), (3,6,5,4,1,2,7,3,7,5,4,1,2,7,6,3,5,4,1,4), (2,1,2,7,3,5,6,2,1,2,7,5,3,5,2,1,2,6,3), (1,4,5,6,4,1,4,6,7,3,6,4,1,4,5,3,5,2), (5,3,1,2,6,7,3,5,4,1,2,7,3,7,6,4,1), (2,5,4,3,5,2,1,2,6,3,5,6,2,1,2,3), (1,6,7,1,4,5,3,7,5,4,1,4,7,3,1), (3,2,5,3,7,6,4,1,2,1,3,6,5,4), (4,1,4,2,1,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1,6,4,6,5,2,6,1), (3,2,5,6,2,3,1,3,2,7,6,2,6,1,3,2,6,7,2,6,1,3,4,6,5,4,3,1,3,4,7,5,2,7,1,3,4), (5,4,3,1,7,4,6,7,4,3,1,3,4,7,6,4,3,1,3,4,6,7,2,3,1,7,2,6,5,2,3,1,3,4,5,2), (1,6,2,6,5,2,5,1,6,2,6,5,2,5,1,7,2,5,7,2,5,1,5,4,5,6,4,7,1,7,4,7,5,2,1), (2,5,4,3,1,3,4,5,7,4,7,1,3,4,6,5,4,6,1,3,4,7,6,2,3,1,3,2,5,6,2,6,1,3), (3,1,5,2,7,6,2,3,1,3,2,7,6,2,3,1,3,2,5,7,2,3,1,5,4,6,7,4,3,1,3,4,5), (4,6,7,4,5,1,5,4,6,7,4,5,1,6,4,5,6,4,6,1,6,4,7,6,2,5,1,7,2,6,7,2), (2,3,1,3,2,6,7,2,5,1,3,2,5,7,2,7,1,3,2,5,7,2,3,1,3,4,5,6,4,5,1), (1,4,5,6,4,3,1,3,4,5,6,4,3,1,3,4,6,7,4,3,1,7,4,7,6,2,3,1,3,2), (1,2,7,1,5,2,5,6,2,7,1,5,2,5,7,2,5,1,7,2,5,6,2,5,1,6,7,4,5), (2,3,4,7,6,4,7,1,3,4,6,7,4,6,1,3,4,5,6,4,3,1,4,3,4,5,2,1), (4,1,2,3,1,3,2,4,1,2,3,1,3,2,4,1,2,3,1,5,2,1,5,2,1,3,4) diff --git a/best/3 b/best/3 new file mode 100644 index 0000000..a9d5871 --- /dev/null +++ b/best/3 @@ -0,0 +1,2 @@ +39 +(4,2,4), (1,3,1,3), (3,2,5,4,2), (4,6,7,1), (1,3,2) diff --git a/best/4 b/best/4 new file mode 100644 index 0000000..d11b688 --- /dev/null +++ b/best/4 @@ -0,0 +1,2 @@ +87 +(3,4,2,3), (2,1,6,1,5), (3,6,5,3,4,2), (4,1,4,2,6,5,1), (2,3,6,1,7,3), (4,5,7,4,2), (1,2,3,1) diff --git a/best/5 b/best/5 new file mode 100644 index 0000000..6e98d05 --- /dev/null +++ b/best/5 @@ -0,0 +1,2 @@ +147 +(3,1,3,2,3), (4,2,4,6,1,5), (1,6,7,5,3,4,2), (2,5,3,1,2,6,5,1), (3,6,4,2,4,1,7,3,2), (1,1,7,5,3,2,4,5), (2,3,6,1,5,7,1), (5,4,2,4,6,3), (1,5,3,1,2) diff --git a/best/6 b/best/6 new file mode 100644 index 0000000..0ab290d --- /dev/null +++ b/best/6 @@ -0,0 +1,2 @@ +227 +(1,2,3,1,3,2), (3,5,4,6,7,4,1), (2,7,1,5,2,5,3,2), (1,6,4,6,3,1,7,4,5), (2,5,3,2,7,5,2,6,1,3), (3,6,4,1,4,1,4,3,5,2,4), (1,2,6,5,3,6,5,1,4,1), (4,3,7,2,1,2,7,3,5), (5,1,4,5,3,4,6,2), (2,3,7,6,1,5,1), (4,1,2,4,3,2) diff --git a/best/7 b/best/7 new file mode 100644 index 0000000..c5129a6 --- /dev/null +++ b/best/7 @@ -0,0 +1,2 @@ +325 +(4,1,2,3,1,4,2), (2,3,5,6,7,5,3,1), (1,2,4,1,4,2,4,5,2), (3,6,5,7,6,3,1,6,7,4), (2,4,1,3,2,5,4,2,3,1,3), (1,5,6,7,4,1,6,7,5,6,2,4), (2,6,3,2,5,3,2,3,1,4,7,5,1), (4,1,6,1,6,7,5,7,2,3,1,3), (3,4,5,2,4,1,4,6,5,6,2), (2,7,3,1,3,2,3,1,4,1), (1,6,4,7,6,4,7,2,3), (2,5,2,5,1,6,5,4), (3,1,4,3,2,3,1) diff --git a/best/8 b/best/8 new file mode 100644 index 0000000..18e0278 --- /dev/null +++ b/best/8 @@ -0,0 +1,2 @@ +442 +(4,1,3,2,4,2,1,3), (3,2,5,4,1,3,6,4,2), (4,1,7,6,2,4,5,1,5,1), (5,2,4,3,1,6,7,2,6,3,5), (1,3,7,6,2,5,3,1,7,4,2,4), (2,4,5,1,5,4,7,2,3,5,1,3,1), (3,6,7,2,6,3,1,6,4,7,2,7,6,4), (1,5,1,3,4,7,2,3,5,1,6,4,5,2,3), (2,4,7,6,1,5,4,7,2,5,3,1,3,1), (3,5,2,5,3,7,1,6,4,2,5,4,5), (1,1,6,4,2,6,5,3,1,6,7,2), (2,3,7,1,3,4,2,6,4,3,1), (4,5,2,6,5,1,7,5,2,4), (1,6,4,7,2,4,3,1,5), (2,3,1,3,1,5,2,3) diff --git a/best/9 b/best/9 new file mode 100644 index 0000000..9ca5fa0 --- /dev/null +++ b/best/9 @@ -0,0 +1,2 @@ +575 +(4,1,3,2,1,4,2,4,1), (3,2,7,4,5,3,1,3,5,3), (1,4,6,5,1,7,2,4,6,2,1), (2,6,1,3,2,4,6,5,7,1,3,5), (1,3,5,6,7,5,3,1,3,2,6,4,2), (2,5,4,2,4,1,7,2,5,4,5,7,1,2), (4,7,6,1,3,5,6,4,6,7,1,3,2,3,4), (3,1,3,2,4,6,2,3,1,3,2,7,4,6,5,1), (4,2,4,7,5,7,1,4,7,6,4,6,5,1,7,2,3), (1,5,6,1,3,2,7,5,2,5,1,3,2,3,4,5), (1,3,2,5,4,6,3,1,3,7,6,4,5,7,1), (5,4,7,6,1,5,2,6,4,2,5,1,6,2), (2,1,3,2,7,4,7,5,1,3,7,4,3), (1,6,5,6,3,1,3,2,4,6,2,1), (2,4,1,4,2,4,6,7,5,1,3), (3,6,5,7,6,5,1,3,2,4), (1,2,3,1,3,2,4,5,1) diff --git a/first.py b/first.py new file mode 100644 index 0000000..0442b4e --- /dev/null +++ b/first.py @@ -0,0 +1,239 @@ +import sys +import numpy as np +import random +import math + +def ones_hexagon(n): + hexagon = [] + row_len = n + for row in range(n * 2 - 1): + hexagon.append([1] * row_len) + if row > n-2: + row_len -= 1 + else: + row_len += 1 + return hexagon + +def inside(hexagon, row, col): + if row >= 0 and row < len(hexagon): + if col >= 0 and col < len(hexagon[row]): + return True + return False + +def memoize(f): + memo = {} + def helper(n, hexagon, row, col): + if (row, col) not in memo: + memo[(row, col)] = f(n, hexagon, row, col) + return memo[(row, col)] + return helper + +@memoize +def get_neighbors_idx(n, hexagon, row, col): + idx = [] + if row - 1 >= 0 and row <= n - 1: + if inside(hexagon, row - 1, col - 1): + idx.append((row-1, col-1)) + if inside(hexagon, row - 1, col): + idx.append((row-1, col)) + elif row - 1 >= 0 and row > n - 1: + if inside(hexagon, row - 1, col): + idx.append((row-1, col)) + if inside(hexagon, row - 1, col + 1): + idx.append((row-1, col+1)) + + if inside(hexagon, row, col - 1): + idx.append((row, col-1)) + if inside(hexagon, row, col + 1): + idx.append((row, col+1)) + + if row + 1 < len(hexagon) and row < n - 1: + if inside(hexagon, row + 1, col): + idx.append((row+1, col)) + if inside(hexagon, row + 1, col + 1): + idx.append((row+1, col+1)) + elif row + 1 < len(hexagon) and row >= n - 1: + if inside(hexagon, row + 1, col - 1): + idx.append((row+1, col-1)) + if inside(hexagon, row + 1, col): + idx.append((row+1, col)) + return idx + +def get_neighbors(n, hexagon, row, col): + idxs = get_neighbors_idx(n, hexagon, row, col) + results = [] + for row, col in idxs: + results.append(hexagon[row][col]) + return results, idxs + +#def get_neighbors(n, hexagon, row, col): +# result = [] +# idx = [] +# if row - 1 >= 0 and row <= n - 1: +# if inside(hexagon, row - 1, col - 1): +# result.append(hexagon[row-1][col-1]) +# idx.append((row-1, col-1)) +# if inside(hexagon, row - 1, col): +# result.append(hexagon[row-1][col]) +# idx.append((row-1, col)) +# elif row - 1 >= 0 and row > n - 1: +# if inside(hexagon, row - 1, col): +# result.append(hexagon[row-1][col]) +# idx.append((row-1, col)) +# if inside(hexagon, row - 1, col + 1): +# result.append(hexagon[row-1][col+1]) +# idx.append((row-1, col+1)) +# +# if inside(hexagon, row, col - 1): +# result.append(hexagon[row][col-1]) +# idx.append((row, col-1)) +# if inside(hexagon, row, col + 1): +# result.append(hexagon[row][col+1]) +# idx.append((row, col+1)) +# +# if row + 1 < len(hexagon) and row < n - 1: +# if inside(hexagon, row + 1, col): +# result.append(hexagon[row+1][col]) +# idx.append((row+1, col)) +# if inside(hexagon, row + 1, col + 1): +# result.append(hexagon[row+1][col+1]) +# idx.append((row+1, col+1)) +# elif row + 1 < len(hexagon) and row >= n - 1: +# if inside(hexagon, row + 1, col - 1): +# result.append(hexagon[row+1][col-1]) +# idx.append((row+1, col-1)) +# if inside(hexagon, row + 1, col): +# result.append(hexagon[row+1][col]) +# idx.append((row+1, col)) +# return result, idx + +def get_score(hexagon): + return sum(map(sum, hexagon)) + +def allowed(value, neighbors): + return set(range(1, value)).issubset(set(neighbors)) + +def allowed_pos(n, hexagon, row, col): + neigh, idx = get_neighbors(n, hexagon, row, col) + return allowed(hexagon[row][col], neigh) + +def rand_idx(n, hexagon): + while True: + row = random.randint(0, n * 2 - 2) + col = random.randint(0, n * 2 - 2) + if inside(hexagon, row, col): + return (row, col) + +def pprint(hexagon): + for row in hexagon: + print("(", end='') + print(",".join(map(str, row)), end='') + print("), ", end='') + print() + +def jiggle(hexagon): + row, col = rand_idx(n, hexagon) + max_val = max(map(max, hexagon)) + for idx, row in enumerate(hexagon): + for idy, val in enumerate(row): + if val == max_val: + hexagon[idx][idy] -= 1 + +def jiggle2(hexagon): + for idx, row in enumerate(hexagon): + for idy, val in enumerate(row): + if val > 1: + hexagon[idx][idy] -= 1 + +def finetune(hexagon): + idxs = [] + for row, r in enumerate(hexagon): + for col, value in enumerate(r): + idxs.append((row, col)) + random.shuffle(idxs) + for row, col in idxs: + hexagon[row][col] += 1 + idx = get_neighbors_idx(n, hexagon, row, col) + ok = True + if not allowed_pos(n, hexagon, row, col): + ok = False + for r, c in idx: + if not ok: + break + if not allowed_pos(n, hexagon, r, c): + ok = False + if not ok: + hexagon[row][col] -= 1 + +def solve(n): + hexagon = ones_hexagon(n) + score = get_score(hexagon) + same_score = 0 + best_score = score + best_hexagon = hexagon + num = 0 + subtractor = 3 * n * n - 3 * n + 1 + while True: + num += 1 + row, col = rand_idx(n, hexagon) + cut = random.randint(0, 9) + if num % 10000000 == 0: + new_score = get_score(hexagon) + if score != new_score: + print("RESET SCORE FROM {} to {}".format(score, + new_score)) + score = new_score + print("raw score {}".format( + score - subtractor)) + if cut <= 1: + if hexagon[row][col] == 1: + continue + hexagon[row][col] -= 1 + score -= 1 + else: + hexagon[row][col] += 1 + score += 1 + idx = get_neighbors_idx(n, hexagon, row, col) + ok = True + if not allowed_pos(n, hexagon, row, col): + ok = False + for r, c in idx: + if not ok: + break + if not allowed_pos(n, hexagon, r, c): + ok = False + if not ok: + if cut <= 1: + hexagon[row][col] += 1 + score += 1 + else: + hexagon[row][col] -= 1 + score -= 1 + same_score += 1 + else: + same_score = 0 + if score - subtractor > int(sys.argv[3]) and random.randint(0, + 10) == 1: + finetune(hexagon) + score = get_score(hexagon) + while score > best_score: + best_score = score + best_hexagon = hexagon + print("NEW BEST: {}".format(best_score - subtractor)) + score = get_score(hexagon) + pprint(hexagon) + if score - subtractor > int(sys.argv[2]): + print("FINETUNING") + finetune(hexagon) + score = get_score(hexagon) + if same_score > 200: + print("JUGGLING") + jiggle2(hexagon) + score = get_score(hexagon) + same_score = 0 + return hexagon + +if __name__ == "__main__": + random.seed() + n = int(sys.argv[1]) + print(solve(n)) diff --git a/hexagonal.cpp b/hexagonal.cpp new file mode 100644 index 0000000..6947834 --- /dev/null +++ b/hexagonal.cpp @@ -0,0 +1,515 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +class Hexagon { +public: + int n; + + vector> data; + std::random_device rd; + std::minstd_rand rng; + vector>>> memory; + vector> indices; + + Hexagon(int n) : n(n), data(n * 2 - 1, vector(0)), rng(rd()) { + init_ones(); + for (int row = 0; row < data.size(); ++row) { + vector>> plo; + for (int col = 0; col < data[row].size(); ++col) { + vector> ple; //this is len 0 + plo.push_back(ple); + indices.push_back(make_pair(row, col)); + } + memory.push_back(plo); + } + } + + void init_ones() { + int row_len = n; + for (int i = 0; i < n * 2 - 1; ++i) { + data[i].resize(row_len); + fill(data[i].begin(), data[i].end(), 1); + if (i > n - 2) row_len -= 1; + else row_len += 1; + } + } + + void read_hexagon(string filename) { + int all_time_best; + fstream file(filename, ios::in); + file >> all_time_best; + char c; + int row = 0; + int col = 0; + bool inrow = false; + while (file >> c) { + if (c == '(') { + inrow = true; + } else if (c >= '1' && c <= '7') { + data[row][col] = c - '0'; + } else if (c == ')') { + inrow = false; + } else if (c == ',') { + if (inrow) col += 1; + else { + row += 1; + col = 0; + } + } + } + file.close(); + } + + void init_nice(int start) { + init_ones(); + for (int i = 0; i < data.size(); ++i) { + int prev = -1; + for (int j = 0; j < data[i].size(); ++j) { + if (i == 0 && j == 0) { + data[i][j] = start; + } else if (prev != -1) { + data[i][j] = prev % 7 + 1; + } else if (prev == -1) { + if (i > n - 1) { + data[i][j] = (data[i-1][j] + 3) % 7 + 1; + } else { + data[i][j] = (data[i-1][j+1] + 3) % 7 + 1; + } + } + prev = data[i][j]; + } + } + } + + bool inside(int row, int col) { + if (row >= 0 && row < data.size()) { + if (col >= 0 && col < data[row].size()) { + return true; + } + } + return false; + } + + void optimize_all() { + // run this after decrementing all 7s? + for (int i = 0; i < data.size(); ++i) { + for (int j = 0; j < data[i].size(); ++j) { + optimize_chunk(i, j); + } + } + } + + void optimize_chunk(int row, int col) { + cout << "Optimizing " << row << ", " << col << endl; + vector> chunk = get_neighbors_idx(row, col); + vector orig_vals; + set> all_test; + for (auto&& p : chunk) { + all_test.insert(p); + vector> these = get_neighbors_idx(p.first, p.second); + for (auto && c : these) { + all_test.insert(c); + } + } + + for (auto&& p : chunk) { + orig_vals.push_back(data[p.first][p.second]); + } + + int old_score = get_score(); + for (int v = 1; v <= 7; ++v) { + int res = try_optimize(chunk, 0, v, get_score(), all_test); + if (res > 0) { + cout << "SUCCESS!! improvement " << get_score() - old_score << endl; + return; + } + } + int idx = 0; + for (auto&& p : chunk) { + data[p.first][p.second] = orig_vals[idx]; + idx += 1; + } + } + + int try_optimize( + vector>& chunk, + int cur, int val, int start_score, + set>& all_test) { + if (cur >= chunk.size()) return -1; + data[chunk[cur].first][chunk[cur].second] = val; + if (get_score() > start_score) { + if (check_all(all_test)) { + return 1; + } + } + for (int v = 1; v <= 7; ++v) { + int res = try_optimize(chunk, cur+1, v, start_score, all_test); + if (res > 0) return res; + } + return -1; + } + + bool check_all(set>& all) { + for (auto&& p : all) { + if (!allowed_pos(p)) return false; + } + return true; + } + + const vector>& get_neighbors_idx(int row, int col) { + return get_neighbors_idx(make_pair(row, col)); + } + + const vector>& get_neighbors_idx(const pair& p) { + if (memory[p.first][p.second].size() != 0) { + return memory[p.first][p.second]; + } + //if (memory.find(p) != memory.end()) { + // return memory[p]; + //} + vector> idxs; + int row = p.first; + int col = p.second; + if (row - 1 >= 0 && row <= n - 1) { + if (inside(row - 1, col - 1)) { + idxs.push_back(make_pair(row-1, col-1)); + } + if (inside(row - 1, col)) { + idxs.push_back(make_pair(row-1, col)); + } + } else if (row - 1 >= 0 && row > n - 1) { + if (inside(row - 1, col)) { + idxs.push_back(make_pair(row-1, col)); + } + if (inside(row - 1, col + 1)) { + idxs.push_back(make_pair(row-1, col+1)); + } + } + + if (inside(row, col - 1)) idxs.push_back(make_pair(row, col-1)); + if (inside(row, col + 1)) idxs.push_back(make_pair(row, col+1)); + + if (row + 1 < data.size() && row < n - 1) { + if (inside(row + 1, col)) { + idxs.push_back(make_pair(row+1, col)); + } + if (inside(row + 1, col + 1)) { + idxs.push_back(make_pair(row+1, col+1)); + } + } else if (row + 1 < data.size() && row >= n - 1) { + if (inside(row + 1, col - 1)) { + idxs.push_back(make_pair(row+1, col-1)); + } + if (inside(row + 1, col)) { + idxs.push_back(make_pair(row+1, col)); + } + } + //memory[make_pair(row, col)] = idxs; + //return memory[make_pair(row, col)]; + memory[row][col] = idxs; + return memory[row][col]; + } + + vector get_values(const vector>& idxs) { + vector ret; + for (auto&& p : idxs) { + ret.push_back(data[p.first][p.second]); + } + return ret; + } + + int get_score() { + int sum = 0; + for (auto&& row : data) { + for (auto&& val : row) { + sum += val; + } + } + return sum; + } + + bool allowed(int value, const vector& neighbors) { + bitset<7> b(0); + for (auto&& v : neighbors) { + if (v < value) { + b[v] = 1; + } + } + return b.count() == value - 1; + } + + bool allowed_pos(int row, int col) { + return allowed_pos(make_pair(row, col)); + } + + bool allowed_pos(const pair& p) { + bitset<7> b(0); + int value = data[p.first][p.second]; + for (auto&& v : get_neighbors_idx(p)) { + if (data[v.first][v.second] < value) { + b[data[v.first][v.second]] = 1; + } + } + return b.count() == value - 1; + + //vector neigh = get_values(get_neighbors_idx(row, col)); + //return allowed(data[row][col], neigh); + } + + pair rand_idx() { + uniform_int_distribution row_dist(0, n * 2 - 1 - 1); + int row = row_dist(rng); + uniform_int_distribution col_dist(0, data[row].size() - 1); + int col = col_dist(rng); + return make_pair(row, col); + } + + void jiggle() { + for (int row = 0; row < data.size(); ++row) { + for (int col = 0; col < data[row].size(); ++col) { + if (data[row][col] > 1) data[row][col] -= 1; + } + } + } + + void fine_tune() { + vector> idxs; + for (int row = 0; row < data.size(); ++row) { + for (int col = 0; col < data[row].size(); ++col) { + idxs.push_back(make_pair(row, col)); + } + } + random_shuffle(idxs.begin(), idxs.end()); + for (auto&& p : idxs) { + data[p.first][p.second] += 1; + bool ok = true; + vector> neighs = get_neighbors_idx(p); + if (!allowed_pos(p)) { + ok = false; + } + for (auto&& n : neighs) { + if (!ok) break; + if (!allowed_pos(n)) ok = false; + } + if (!ok) { + data[p.first][p.second] -= 1; + } + + } + } +}; + +ostream& operator<<(ostream& out, const Hexagon& h) { + int row_idx = 0; + for (auto&& row : h.data) { + out << "("; + int idx = 0; + for (auto&& value : row) { + out << value; + if (idx != row.size() - 1) out << ","; + idx += 1; + } + out << ")"; + if (row_idx != h.data.size() - 1) out << ", "; + row_idx += 1; + } + return out; +} + +void write_hexagon(string filename, int score, Hexagon& hexagon) { + ofstream ofile; + ofile.open(filename, ios::trunc); + cout << "NEW ALL TIME HIGH!!! " << score << endl; + cout << hexagon << endl; + ofile << score << endl; + ofile << hexagon << endl; + ofile.close(); +} + + +int main(int argc, char *argv[]) { + if (argc < 4) { + cout << "Not enough arguments." << endl; + return 1; + } + int n = atoi(argv[1]); + int decrease = floor(0.5 * pow(10, atoi(argv[2]))); + int lowest_cutoff = atoi(argv[3]); + int read_file = atoi(argv[4]); + int cutoff = atoi(argv[5]); + int heatup = atoi(argv[6]); + int cut_max = atoi(argv[7]); + int shutdown = atoi(argv[8]); + long last = 35000000000; + Hexagon hexagon(n); + string filename = "best/" + to_string(n); + + int all_time_best; + fstream file(filename, ios::in); + file >> all_time_best; + cout << "Trying to beat all_time_best of " << all_time_best << endl; + file.close(); + if (read_file > 0) { + cout << "READING HEXAGON" << endl; + hexagon.read_hexagon(filename); + } + + cout << hexagon << endl; + + int score = hexagon.get_score(); + int best_score = score; + int subtractor = 3 * n * n - 3 * n + 1; + long num = 0; + int heatup_mult = 1; + int same_score = 0; + int non_improvement = 0; + uniform_int_distribution add_dist(1, 10); + uniform_int_distribution cut_dist(0, cut_max); + uniform_int_distribution jiggle_dist(0, 500000000); + // Add some code to sample from a list of indices instead of generating randomly... + vector> idxs(hexagon.indices); + random_shuffle(idxs.begin(), idxs.end()); + int iter = 0; + cout << "GET READY" << endl; + //cout << "TO OPTIMIZE " << endl; + //hexagon.optimize_all(); + //cout << "DONE" << endl; + //score = hexagon.get_score(); + //if (score > best_score) { + // best_score = score; + // if (score - subtractor > all_time_best) { + // all_time_best = score - subtractor; + // write_hexagon(filename, score - subtractor, hexagon); + // cout << "WOOO SAVED THIS COOL BEST" << endl; + // } + //} + while (true) { + num += 1; + if (num % 10000000 == 0) { + cout << "N = " << n << " score = " << score - subtractor << " cutoff " << cutoff << endl; + } + if (iter > idxs.size() / 2) { + iter = 0; + random_shuffle(idxs.begin(), idxs.end()); + } + pair p = idxs[iter]; + iter += 1; + int cut = cut_dist(hexagon.rng); + int add = max(add_dist(hexagon.rng) / 4, 1); + if (jiggle_dist(hexagon.rng) == 0 && jiggle_dist(hexagon.rng) == 0) { + cout << "JIGGLING" << endl; + hexagon.jiggle(); + score = hexagon.get_score(); + } + int prev_value = hexagon.data[p.first][p.second]; + if (cut <= cutoff) { + if (hexagon.data[p.first][p.second] - add <= 0) { + continue; + } + hexagon.data[p.first][p.second] -= add; + score -= add; + } else { + if (hexagon.data[p.first][p.second] + add > 7) { + continue; + } + hexagon.data[p.first][p.second] += add; + score += add; + } + int new_value = hexagon.data[p.first][p.second]; + const vector>& idxs = + hexagon.get_neighbors_idx(p); + bool ok = true; + if (!hexagon.allowed_pos(p)) { + ok = false; + } + for (auto&& neighi : idxs) { + if (!ok) break; + if (prev_value > hexagon.data[neighi.first][neighi.second]) continue; + if (!hexagon.allowed_pos(neighi)) ok = false; + } + if (!ok) { + if (cut <= cutoff) { + hexagon.data[p.first][p.second] += add; + score += add; + } else { + hexagon.data[p.first][p.second] -= add; + score -= add; + } + same_score += 1; + non_improvement += 1; + } else { + same_score = 0; + } + if (same_score >= 35000) { + same_score = 0; + cutoff += heatup * heatup_mult; + heatup_mult += 1; + if (heatup_mult > 4) heatup_mult = 1; + score = hexagon.get_score(); + cout << "N = " << n << ", Heating up again! " << cutoff << endl; + return 0; + } + if (same_score >= 36000) { + same_score = 0; + hexagon.jiggle(); + score = hexagon.get_score(); + cout << "Jiggling!" << endl; + } + if (score - subtractor > float(all_time_best) * 0.95 && num % 200000000 == 0) { + hexagon.fine_tune(); + score = hexagon.get_score(); + cout << "Finetuning just because: " << score - subtractor << endl; + } + if (score > best_score) { + non_improvement = 0; + while (score > best_score && score - subtractor > float(all_time_best) * 0.95) { + cout << "Finetuning" << endl; + int before = score; + hexagon.fine_tune(); + score = hexagon.get_score(); + while (score - before > 0) { + cout << "FINETUNING: " << score - before << ": "; + cout << score - subtractor << endl; + before = score; + hexagon.fine_tune(); + score = hexagon.get_score(); + } + best_score = score; + } + best_score = score; + if (score - subtractor > all_time_best) { + int b = score; + cout << "TO OPTIMIZE " << endl; + hexagon.optimize_all(); + score = hexagon.get_score(); + cout << "DONE: " << score - b << endl; + all_time_best = score - subtractor; + write_hexagon(filename, score - subtractor, hexagon); + } else { + cout << "New high: " << best_score - subtractor << endl; + } + cout << "Cutoff now: " << cutoff << endl; + } + if (non_improvement > decrease) { + non_improvement = 0; + //cout << "No improvements, plepp" << endl; + if (cutoff > lowest_cutoff) + cutoff -= 1; + else + cutoff += 1; + } + if (num >= last && shutdown) { + cout << "==== " << endl << best_score - subtractor << endl; + return 0; + } + } +} diff --git a/hexagons.sh b/hexagons.sh new file mode 100755 index 0000000..898b95c --- /dev/null +++ b/hexagons.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for num in `seq 3 27`; do + ple=`tail -n 1 "best/$num"` + echo "$ple;" +done + diff --git a/optimize.py b/optimize.py new file mode 100644 index 0000000..590691b --- /dev/null +++ b/optimize.py @@ -0,0 +1,78 @@ +"""Example of how to use this bayesian optimization package.""" + +import sys +import os +from bayes_opt import BayesianOptimization +from subprocess import Popen, PIPE + + +def run_program(decrease, lowest_cutoff, cutoff, heatup): + cwd = os.path.dirname(os.path.realpath(__file__)) + #print(" ".join(["./a.out", "13", str(decrease), str(lowest_cutoff), "0", + # str(cutoff), str(heatup), str(cut_max)])) + process = Popen(["./a.out", "21", str(decrease), str(lowest_cutoff), "0", + str(cutoff), str(heatup), "500", "1"], stdout=PIPE, cwd=cwd) + (output, err) = process.communicate() + exit_code = process.wait() + output = output.decode() + #print("OUTPUT {}".format(output)) + #print("LAST: {}".format(output.split('\n')[-2])) + best = int(output.split('\n')[-2]) + #print("FOUND BEST {}".format(best)) + return best + +# Lets find the maximum of a simple quadratic function of two variables +# We create the bayes_opt object and pass the function to be maximized +# together with the parameters names and their bounds. +bo = BayesianOptimization(run_program, + { + 'decrease': (1, 10), + 'lowest_cutoff': (0, 50), + 'cutoff': (0, 500), + 'heatup': (0, 50), + }) + +# One of the things we can do with this object is pass points +# which we want the algorithm to probe. A dictionary with the +# parameters names and a list of values to include in the search +# must be given. +#bo.explore({'x': [-1, 3], 'y': [-2, 2]}) + +# Additionally, if we have any prior knowledge of the behaviour of +# the target function (even if not totally accurate) we can also +# tell that to the optimizer. +# Here we pass a dictionary with 'target' and parameter names as keys and a +# list of corresponding values +#bo.initialize( +# { +# 'target': [-1, -1], +# 'x': [1, 1], +# 'y': [0, 2] +# } +#) + +# Once we are satisfied with the initialization conditions +# we let the algorithm do its magic by calling the maximize() +# method. +bo.maximize(init_points=5, n_iter=25, kappa=2) + +# The output values can be accessed with self.res +print(bo.res['max']) + +# If we are not satisfied with the current results we can pickup from +# where we left, maybe pass some more exploration points to the algorithm +# change any parameters we may choose, and the let it run again. +#bo.explore({'x': [0.6], 'y': [-0.23]}) + +# Making changes to the gaussian process can impact the algorithm +# dramatically. +#gp_params = {'kernel': None, +# 'alpha': 1e-5} + +# Run it again with different acquisition function +#bo.maximize(n_iter=5, acq='ei', **gp_params) + +# Finally, we take a look at the final results. +print(bo.res['max']) +print(bo.res['all']) + diff --git a/scores.sh b/scores.sh new file mode 100755 index 0000000..f8ca14e --- /dev/null +++ b/scores.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for num in `seq 3 27`; do + ple=`head -n 1 "best/$num"` + echo "$num $ple" +done + -- 2.47.3