Post Reply 
Challenge: sum of squares. Let's break 299
02-01-2018, 03:38 AM
Post: #56
RE: Challenge: sum of squares. Let's break 299
Finalizing my code for this puzzle. I made some modifications to make it run from the command line, and also slow it down.. The super-fast version I had earlier could not guarantee a solution. Takes 3 inputs:

 N  number of nodes on graph
min_clip - minimum candidates for each generation
max_clip - maximum candidates for each generation

I had a version that adjusted the results adaptively, but there are SO many possible solutions, it's not necessary.

In my fast version, similar to this one, I only take into account the max-clip during the last few steps. I had many many trial runs on the 10,000 or 20,000 node graph that had only a few numbers remaining (always 100<N<1).

So my improvement (slower but more accurate) is to update the scoring algorithm for each candidate solution so that it's not rewarded based on the centrality of the starting graph, but the centrality of the _remaining choices_. This made a substantial difference in number of solutions, but made the whole thing slower.

So if you want it FAST on the 1000 graph: 1000 1 1000
(not guaranteed to find a solution..) adjust the 1 to 2 or 5 or 10

if you want lots of solutions for N=50: 50 100 100000

( I think there are more than 250,000 unique solutions for N=50)

17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Challenge: sum of squares. Let's break 299 - Allen - 02-01-2018 03:38 AM

User(s) browsing this thread: 1 Guest(s)