Skip to content

Commit db513a0

Browse files
Refactor code
1 parent 8c182ab commit db513a0

14 files changed

Lines changed: 1432 additions & 1136 deletions

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Automaginarium is a configurable universe generator for cellular automata. It extends the spirit of [Cellcosmos](https://github.com/multilingualprogramming/cellcosmos): instead of exploring only the 256 elementary Wolfram rules, it opens the rule space itself.
44

5-
The project is designed to demonstrate the expressive power of the Multilingual programming language. The canonical automata concepts are written in French Multilingual source, while JavaScript is kept as a thin browser layer for loading presets and JSON, drawing to canvas, generating optional rule tables, wiring the preset gallery, and handling only the essential interface events.
5+
The project is designed to demonstrate the expressive power of the Multilingual programming language. The canonical automata concepts are written in French Multilingual source, while JavaScript is kept as a thin browser layer for loading presets and JSON, drawing to canvas, wiring the preset gallery, synchronizing form controls, and handling only the essential interface events.
66

77
## Vision
88

@@ -33,6 +33,7 @@ The repository currently includes:
3333

3434
- a canonical French Multilingual core in `src/automate_universel.ml`
3535
- a small JavaScript adapter in `public/automate-core.js` that mirrors the current core until the Multilingual/WASM build pipeline is wired
36+
- canonical rule-table generators, form/config helpers, genetic helpers, and perturbation mutations exposed through the core bridge instead of separate browser-only engine modules
3637
- a canvas UI in `public/app.mjs`
3738
- copied Cellcosmos heritage references in `public/metrics.js` and `src/cellcosmos_primitives_heritage.ml`
3839
- example configurations and a JSON schema in `examples/`
@@ -119,4 +120,4 @@ Where source code is directly adapted, comments identify Cellcosmos as the origi
119120
4. Add more generated rule spaces: totalistic, symmetric, genetic, stochastic, and multi-channel examples.
120121

121122
## Architecture et Création
122-
- John Samuel
123+
- John Samuel

docs/architecture.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ public/app.mjs essential DOM events, canvas drawing, preset loadin
1111

1212
The intended stable boundary is the configuration object. The UI should not know Wolfram-specific details except where it offers a preset shortcut.
1313

14-
The browser layer is intentionally narrow: one module applies configuration objects, delegates evolution to the core bridge, renders the resulting universe, and wires a static preset gallery. Presentation-only concerns such as tab systems, mirrored form state, and client-side gallery choreography are not part of the long-term architecture.
14+
The browser layer is intentionally narrow: one module reads and writes form controls, delegates configuration assembly, evolution, canonical rule-table generation, genetic evaluation, and perturbation mutations to the core bridge, renders the resulting universe, and wires a static preset gallery. Presentation-only concerns such as tab systems, mirrored form state, and client-side gallery choreography are not part of the long-term architecture.
15+
16+
Advanced tools such as the genetic workbench and perturbation toolkit are now lazy browser features. They are loaded only when their panels are opened, so the baseline application path stays focused on the core Multilingual configuration and rendering loop.
1517

1618
Canonical JSON-array rule keys use forms such as `"[0,1,0]"`, rather than concatenated keys such as `"010"`. The browser adapter still accepts older Cellcosmos-style keys as a compatibility fallback.
1719

1820
The packed Multilingual/WASM bridge keeps the full French core as the canonical configuration and evolution model, while `src/automate_packed_wasm.ml` exposes a narrow numeric ABI for browser calls. The browser prefers `window.AutomaginariumPacked` when available and falls back to JavaScript only where rich JSON orchestration is still needed.
1921

22+
Rule-table generation follows the same pattern: canonical helpers live in `src/automate_universel.ml`, narrow deterministic numeric helpers live in `src/automate_packed_wasm.ml`, and `public/automate-core.js` exposes the browser bridge so `public/app.mjs` does not duplicate the rule logic, form-to-config assembly, or configuration summaries.
23+
2024
## Reuse From Cellcosmos
2125

2226
Directly reusable ideas:

public/app.mjs

Lines changed: 107 additions & 818 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)