From 62bb2da33f60f81e056d0adc0124c27f45ac8be9 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 15 Nov 2026 22:16:23 +0100 Subject: [PATCH] expansion:: -csolve-fraction, to give the fraction of cells of each type --- expansion.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/expansion.cpp b/expansion.cpp index fa6b25f4..8a90f9c1 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -936,6 +936,29 @@ int expansion_readArgs() { shift(); for(int i=0; i curr; + if(!expansion.N) expansion.preliminary_grouping(), expansion.reduce_grouping(); + + curr[expansion.rootid] = 1; + for(int d=0; d<50; d++) { + ld total = 0; + map curr2; + for(auto iq: curr) { + total += iq.second; + for(auto j: expansion.children[iq.first]) curr2[j] += iq.second; + } + print(hlog, "radius ", d, " : total = ", total); + for(auto iq: curr) { + print(hlog, " [", iq.first, ":", expansion.samples[iq.first]->type, "] = ", iq.second / total); + } + println(hlog); + curr = std::move(curr2); + } + } else if(argis("-csolve")) { PHASEFROM(2); start_game();