minga-swarm 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -160,20 +160,35 @@ const MESSAGES = [
160
160
  "checked small cases", "rewrite with decidable equality",
161
161
  ];
162
162
 
163
- const AREA_TITLES = [
164
- "Circuit lower bounds", "Formula size and switching", "Reductions library", "Barrier desk",
165
- "Combinatorial core", "Oracle constructions", "Proof infrastructure", "Lean tooling",
166
- "Resolution and width", "Communication games", "Set systems", "Complexity separations",
163
+ // Each area owns a distinct pool of sub-areas, so no two branches share a label.
164
+ const AREAS = [
165
+ { name: "Circuit lower bounds", subs: ["Switching lemmas", "Monotone circuits", "Depth hierarchy", "Gate elimination"] },
166
+ { name: "Proof complexity", subs: ["Resolution width", "Cutting planes", "Nullstellensatz", "Proof size separations"] },
167
+ { name: "Barriers", subs: ["Relativization", "Natural proofs", "Algebrization", "Entropy obstructions"] },
168
+ { name: "Algebraic methods", subs: ["Polynomial method", "Approximating polynomials", "Rank arguments", "Combinatorial Nullstellensatz"] },
169
+ { name: "Communication complexity", subs: ["Discrepancy bounds", "Information complexity", "Protocol compression", "Lower bound templates"] },
170
+ { name: "Derandomization", subs: ["Pseudorandom generators", "Hardness versus randomness", "Extractor constructions", "Hitting sets"] },
167
171
  ] as const;
168
172
 
169
- const LEAF_TITLES = [
170
- "Razborov approximation step", "Sunflower lemma (Erdos-Rado)", "Hastad switching lemma",
171
- "Karchmer-Wigderson depth game", "SAT <=p 3-SAT", "3-SAT <=p CLIQUE",
172
- "Andreev function bound", "Resolution width gap", "Monotone circuit bound",
173
- "Shrinkage exponent", "Backdoor set search", "CLIQUE <=p VERTEX-COVER",
174
- "Oracle B with P^B != NP^B", "Relativization check", "Contractions and minors",
175
- "Entropy bound on set families", "Decision tree to formula", "Polynomial method step",
176
- ] as const;
173
+ // Templates take a parameter, so every generated leaf title is unique without a "(variant N)" suffix.
174
+ const LEAF_TEMPLATES: ReadonlyArray<(n: number) => string> = [
175
+ n => `Formalize Håstad's switching lemma for depth-${3 + ((n - 1) % 3)} width ${n + 2}`,
176
+ n => `Bound Razborov approximators for CLIQUE_${n + 2}`,
177
+ n => `Prove the sunflower lemma for ${n + 3}-uniform families`,
178
+ n => `Separate monotone circuits for CLIQUE_${n + 2}`,
179
+ n => `Establish a resolution width lower bound of ${n + 4}`,
180
+ n => `Derive shrinkage exponent ${(n % 5) + 1} for depth-3 formulas`,
181
+ n => `Reduce SAT to 3-SAT on ${n + 6} variables`,
182
+ n => `Construct oracle B separating P^B from NP^B at length ${n + 4}`,
183
+ n => `Verify natural-proofs barrier instance ${n + 1} in Lean`,
184
+ n => `Bound Andreev's function on ${n + 7} inputs`,
185
+ n => `Prove backdoor set detection for width ${n + 2}`,
186
+ n => `Refine the Karchmer–Wigderson game for depth ${n + 3}`,
187
+ ];
188
+ const leafTitle = (index: number): string => {
189
+ const t = LEAF_TEMPLATES[index % LEAF_TEMPLATES.length]!;
190
+ return t(Math.floor(index / LEAF_TEMPLATES.length) + 1);
191
+ };
177
192
 
178
193
  // ---------------------------------------------------------------- seeding
179
194
 
@@ -305,23 +320,26 @@ function seed(): void {
305
320
  }
306
321
 
307
322
  const total = Math.max(4, FLAGS.tasks);
308
- const areaCount = Math.max(2, Math.min(AREA_TITLES.length, Math.round(Math.sqrt(total) / 2)));
309
- const subCount = Math.min(Math.max(2, total - areaCount - 1), areaCount * 3);
323
+ // Three to six named top-level areas, each with one shallow layer of named sub-areas.
324
+ const areaCount = Math.max(3, Math.min(6, Math.round(Math.sqrt(total) / 4)));
325
+ const subPerArea = Math.max(2, Math.min(4, Math.round(total / (areaCount * 40))));
326
+ const subCount = Math.min(areaCount * subPerArea, Math.max(0, total - areaCount - 1));
310
327
  const areas: TaskState[] = [];
311
328
  for (let i = 0; i < areaCount; i += 1) {
312
- const a = addTask(AREA_TITLES[i] ?? "Area " + (i + 1), "Branch point. Leaves below carry the work.", null, "open", 0, int(120, 400));
329
+ const a = addTask(AREAS[i]?.name ?? "Area " + (i + 1), "Branch point. Leaves below carry the work.", null, "open", 0, int(120, 400));
313
330
  areas.push(a);
314
331
  }
315
332
  const subs: TaskState[] = [];
316
333
  for (let i = 0; i < subCount; i += 1) {
317
- const area = areas[i % areas.length]!;
318
- subs.push(addTask("Subarea " + (i + 1), "Grouping of related leaves.", area.id, "open", 0, int(90, 320)));
334
+ const slot = i % areas.length;
335
+ const area = areas[slot]!;
336
+ const name = AREAS[slot]?.subs[Math.floor(i / areas.length)] ?? "Subarea";
337
+ subs.push(addTask(name, "Grouping of related leaves.", area.id, "open", 0, int(90, 320)));
319
338
  }
320
339
  const leaves = total - areaCount - subCount;
321
340
  for (let i = 0; i < leaves; i += 1) {
322
- const parent = subs[i % subs.length]!;
323
- const base = LEAF_TITLES[i % LEAF_TITLES.length] ?? "Lemma " + (i + 1);
324
- const title = i < LEAF_TITLES.length ? base : base + " (variant " + (1 + Math.floor(i / LEAF_TITLES.length)) + ")";
341
+ const parent = subs.length ? subs[i % subs.length]! : areas[i % areas.length]!;
342
+ const title = leafTitle(i);
325
343
  const roll = rnd();
326
344
  const status: TaskStatus = roll < 0.06 ? "solved" : roll < 0.1 ? "refuted" : roll < 0.13 ? "impossible" : roll < 0.16 ? "withdrawn" : "open";
327
345
  const t = addTask(title, "Prove or refute the statement with machine-checked steps in Proofs/**.", parent.id, status, int(10, 80), int(10, 300));
@@ -786,7 +804,7 @@ function actionJoin(): boolean {
786
804
 
787
805
  function actionPost(): boolean {
788
806
  const parent = pick(Object.values(db.tasks));
789
- const title = "Refinement of " + (pick(LEAF_TITLES) ?? "lemma");
807
+ const title = "New task: " + leafTitle(int(0, 500));
790
808
  const t = addTask(title, "Posted from the dev fixture.", parent ? parent.id : null, "open", rules.defaultPoints, 0);
791
809
  emit("task.posted", HEAD, { task: t.id, title: t.title, body: t.body, parent: t.parent, points: t.points, by: "head" });
792
810
  return true;