From: Mart Lubbers Date: Tue, 6 Oct 2015 11:27:08 +0000 (+0200) Subject: up X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=fc05454fefe82d6565742bf2d9283f2bed494573;p=master.git up --- diff --git a/ar/assignments/4.py b/ar/assignments/4.py deleted file mode 100644 index ae1fb4b..0000000 --- a/ar/assignments/4.py +++ /dev/null @@ -1,23 +0,0 @@ - -if __name__ == '__main__': - frontier = [(0, [], range(1, 8))] - oldlen = 0 - iterations = 0 - - while frontier: - it, moves, a = frontier.pop(0) - iterations += 1 - - if len(moves) > oldlen: - oldlen = len(moves) - print oldlen - h50 = [x for x in a if x > 50 and a.count(x) > 1] - if h50: - break - for i in range(1, len(a)-1): - aa = a[:] - aa[i] = a[i-1]+a[i+1] - moves2 = moves[:] - frontier.append((it+1, moves2 + [i], aa)) - - print it, iterations, moves, a