From 1e59b55f5e7a4257e4fb71a966d264efcac9294b Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Wed, 26 Nov 2025 19:13:57 +1100 Subject: [PATCH] Works "better" now but it's finding 17 wacky disjoint sets instead of 7 --- explore_120cell.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/explore_120cell.js b/explore_120cell.js index 056556b..e2a508f 100644 --- a/explore_120cell.js +++ b/explore_120cell.js @@ -112,7 +112,7 @@ function overlap(c1, c2) { return true; } } - return overlap; + return false; } @@ -146,21 +146,20 @@ export function gather_5cells() { cells.push(cell); } } + //console.log(`From ${n.id}`); + //console.log(cells); for( const cell of cells ) { let binned = false; for( const bin of bins ) { const overlaps = bin.filter((b) => overlap(b, cell)); - console.log(bin); - console.log(cell); - console.log(overlaps); - if( overlaps.length === 0 ) { + if( overlaps.length === 0 ) { bin.push(cell); binned = true; - console.log("binned"); - break; + break; } } if( !binned ) { + console.log(`new bin for ${JSON.stringify(cell)}`); bins.push([ cell ]); } }