Bessere Verteilung: Strafen/Mutation, plus Abstammungsbaum mit Id-Herkunft

Weniger vermeidbare Gruppentrennungen:
- strafen.cfg: Tischbesetzung bestraft jetzt gestaffelt nach freien
  Plaetzen (teilbelegte Tische am teuersten, mit Fallback auf den
  naechstkleineren Eintrag), Trennungsstrafen deutlich erhoeht - so
  werden Gruppen nicht mehr getrennt, obwohl leere Tische danebenstehen
- gibPunkte('Tischbesetzung') mit Naechst-kleiner-Fallback
- mutieren() setzt geraeumte Gruppen groesste-zuerst neu
  (GruppenSetzen(GrosseZuerst=True)), damit grosse Gruppen die frei
  gewordenen ganzen Tische bekommen und wieder zusammenkommen
  (uebrig bleiben nur physisch unvermeidbare Trennungen, Gruppe > Tisch)

Abstammungsbaum (neuer Schalter --show-lineage -> Abstammung.svg):
- neue Klasse ga.Abstammung zeichnet den vollen Mutationsbaum aller
  Loesungen; der Ast der finalen besten Loesung ist hervorgehoben und
  mit ihrer Id beschriftet
- hierarchische Loesungs-Ids (Farm._WurzelId/_KindId): Wurzel '7',
  Mutationskind '7.2', dessen Kind '7.2.1' - die ganze Abstammung ist
  direkt aus der Id ablesbar

Tests (15 gruen), README und CLAUDE.md aktualisiert; Beispiele mit den
neuen Strafen und beiden Grafiken neu berechnet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Michael Stangl
2026-07-11 22:38:43 +02:00
parent 644f61ef6b
commit 6710d4f06a
28 changed files with 3908 additions and 1468 deletions
+8 -8
View File
@@ -5,21 +5,21 @@
<line x1="60" y1="60" x2="60" y2="390.0" stroke="#333" stroke-width="1.5"/>
<line x1="60" y1="390.0" x2="840" y2="390.0" stroke="#333" stroke-width="1.5"/>
<line x1="60" y1="390.0" x2="840" y2="390.0" stroke="#eee" stroke-width="1"/>
<text x="52" y="394.0" text-anchor="end" font-size="11" fill="#666">-187</text>
<text x="52" y="394.0" text-anchor="end" font-size="11" fill="#666">-197</text>
<line x1="60" y1="324.0" x2="840" y2="324.0" stroke="#eee" stroke-width="1"/>
<text x="52" y="328.0" text-anchor="end" font-size="11" fill="#666">-152</text>
<text x="52" y="328.0" text-anchor="end" font-size="11" fill="#666">-162</text>
<line x1="60" y1="258.0" x2="840" y2="258.0" stroke="#eee" stroke-width="1"/>
<text x="52" y="262.0" text-anchor="end" font-size="11" fill="#666">-117</text>
<text x="52" y="262.0" text-anchor="end" font-size="11" fill="#666">-126</text>
<line x1="60" y1="192.0" x2="840" y2="192.0" stroke="#eee" stroke-width="1"/>
<text x="52" y="196.0" text-anchor="end" font-size="11" fill="#666">-82</text>
<text x="52" y="196.0" text-anchor="end" font-size="11" fill="#666">-91</text>
<line x1="60" y1="126.0" x2="840" y2="126.0" stroke="#eee" stroke-width="1"/>
<text x="52" y="130.0" text-anchor="end" font-size="11" fill="#666">-47</text>
<text x="52" y="130.0" text-anchor="end" font-size="11" fill="#666">-55</text>
<line x1="60" y1="60.0" x2="840" y2="60.0" stroke="#eee" stroke-width="1"/>
<text x="52" y="64.0" text-anchor="end" font-size="11" fill="#666">-12</text>
<text x="52" y="64.0" text-anchor="end" font-size="11" fill="#666">-20</text>
<text x="18" y="225.0" text-anchor="middle" font-size="12" fill="#333" transform="rotate(-90 18 225.0)">Wertigkeit (hoeher = besser)</text>
<polyline points="60.0,60.0 146.7,60.0 233.3,60.0 320.0,60.0 406.7,60.0 493.3,60.0 580.0,60.0 666.7,60.0 753.3,60.0 840.0,60.0" fill="none" stroke="#2f6f4f" stroke-width="2"/>
<polyline points="60.0,115.1 146.7,136.4 233.3,129.3 320.0,60.0 406.7,104.2 493.3,89.5 580.0,60.0 666.7,113.5 753.3,95.7 840.0,60.0" fill="none" stroke="#c08a2d" stroke-width="2"/>
<polyline points="60.0,377.5 146.7,390.0 233.3,390.0 320.0,60.0 406.7,377.5 493.3,377.5 580.0,60.0 666.7,390.0 753.3,390.0 840.0,60.0" fill="none" stroke="#a03030" stroke-width="2"/>
<polyline points="60.0,120.3 146.7,166.2 233.3,150.9 320.0,60.0 406.7,157.7 493.3,125.1 580.0,60.0 666.7,164.4 753.3,129.6 840.0,60.0" fill="none" stroke="#c08a2d" stroke-width="2"/>
<polyline points="60.0,351.5 146.7,390.0 233.3,390.0 320.0,60.0 406.7,390.0 493.3,390.0 580.0,60.0 666.7,390.0 753.3,390.0 840.0,60.0" fill="none" stroke="#a03030" stroke-width="2"/>
<line x1="680" y1="70" x2="704" y2="70" stroke="#2f6f4f" stroke-width="2"/>
<text x="710" y="74" font-size="11" fill="#333">beste Loesung</text>
<line x1="680" y1="88" x2="704" y2="88" stroke="#c08a2d" stroke-width="2"/>

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB