Back to search
DarwinCode
SkillGitHub
𧬠Ultra-Fast Neuro-Symbolic Evolutionary Engine (>300,000 evals/s) for Mathematical Discovery, Symbolic Regression, and Algorithmic Pruning in pure Rust
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/miguelguerra200022-sudo--darwincode)HTML
<a href="/listings/miguelguerra200022-sudo--darwincode"><img src="/api/listings/miguelguerra200022-sudo--darwincode/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Prerequisites
- [Rust 1.75+](https://rustup.rs/) (Cargo & rustc)
1. Installation & Build
git clone https://github.com/miguelguerra200022-sudo/DarwinCode.git cd DarwinCode cargo build --release
2. Launch the Engine & Web Cockpit
./target/release/darwin_cli
Open **`http://localhost:8080`** in any web browser to observe the live evolutionary stream, topology graphs, and Hall of Fame!
3. Run MCP Server for AI Coding Agents
./target/release/darwin_cli --mcp
4. Direct CLI Synthesis
./target/release/darwin_cli synthesize --inputs x --output float --dataset "[-2, 5], [-1, 2], [0, 1], [1, 2], [2, 5]"
---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md Β· README Β· 274 lines
- <p align="center">
- <img src="assets/banner.jpg" alt="DarwinCode Banner" width="100%">
- </p>
- <p align="center">
- <img src="assets/logo.jpg" alt="DarwinCode Logo" width="180px">
- </p>
- <h1 align="center">𧬠DarwinCode</h1>
- <p align="center">
- <strong>Ultra-Fast Neuro-Symbolic Evolutionary Engine (>300,000 evals/s) for Symbolic Regression, Algorithmic Pruning, and Mathematical Discovery</strong>
- </p>
- <p align="center">
- <a href="https://www.rust-lang.org"><img src="https://img.shields.io/badge/Language-Rust%202021-orange.svg?style=for-the-badge&logo=rust" alt="Rust 2021"></a>
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-Dual%20(PolyForm%20%2B%20Commercial)-blue.svg?style=for-the-badge" alt="License"></a>
- <a href="#benchmarks"><img src="https://img.shields.io/badge/Speed-%3E300%2C000%20evals%2Fs-brightgreen.svg?style=for-the-badge" alt="Evaluations"></a>
- <a href="#mcp-co-processor"><img src="https://img.shields.io/badge/MCP-12%20Native%20Tools-purple.svg?style=for-the-badge" alt="MCP Compatible"></a>
- <a href="#tests"><img src="https://img.shields.io/badge/Tests-66%2F66%20Passing-success.svg?style=for-the-badge" alt="Tests Passing"></a>
- </p>
- ---
- ## π What is DarwinCode?
- **DarwinCode** is a state-of-the-art open-ended neuro-symbolic evolutionary computation engine engineered in pure Rust. It autonomously synthesizes mathematical formulas, algorithms, and computational graphs from empirical datasets using typed grammar-guided genetic programming (GGGP), formal invariant verification, and Occam's razor parsimony pressure.
- Unlike deep learning models that hallucinate or require high-end GPU clusters, DarwinCode operates with **zero hallucination**, **deterministic gas-metered execution**, and an **$O(1)$ memory footprint**. Thousands of candidate programs compete in a continuous digital ecosystem, mutating safe Abstract Syntax Tree (AST) subtrees, calibrating constants, and eliminating bloat without ever leaking memory or stalling.
- ```
- DARWINCODE ARCHITECTURE
- [ TARGET DATASET / ENIGMA ] (e.g. Physics law, elliptic curve, fluid dynamics)
- β
- βΌ
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β 1. TYPED COMPUTATION DAGs (Genotype Space) β
- β Strict type-safety: Float, Int, Boolean, Vec3D ports β
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β
- βΌ
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β 2. SMT-LITE FORMAL VERIFIER β
- β Mathematical guarantees: Zero syntax errors, cycle-free DAGs β
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β
- βΌ
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β 3. DETERMINISTIC GAS-METERED VIRTUAL MACHINE β
- β Halting guarantees: Gas-exhaustion bounds, safe math (no NaNs) β
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β
- βΌ
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β 4. NATURAL SELECTION & O(1) DOUBLE-BUFFERED ARENA POOL β
- β Continuous evolution over 1,000,000+ generations with flat memory β
- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β
- βΌ
- [ 60 FPS REAL-TIME WEB COCKPIT ] (SSE Live Stream at http://localhost:8080)
- ```
- ---
- ## β‘ Key Highlights
- - **β‘ Blazing Native Performance:** Evaluates over **300,000 candidate formulas per second** on standard multi-core hardware.
- - **π‘οΈ Formally Verified Execution:** Zero division-by-zero panics, zero negative square roots, and gas-metered execution that mathematically prevents infinite loops.
- - **βοΈ Occam's Razor Parsimony Pressure:** Automatically identifies and prunes dead nodes (introns), favoring the shortest, most elegant closed-form expressions.
- - **π Autonomous Continuous Learning:** Dynamically adapts to local plateaus, automatically cycling through challenges once laws reach $>99.5\%$ precision or after evolutionary timeouts.
- - **π€ Universal MCP Co-Processor:** Exposes 15 high-throughput tools for AI Agents (**Google Antigravity**, **Claude Code**, **OpenAI Codex**, **Cursor**, **LibreChat**).
- - **π Embedded Cyberpunk 3D Cockpit:** Built-in zero-dependency HTTP/SSE dashboard rendering DAG graphs, real-time Pareto frontiers, and 3D voxel representations at 60 FPS.
- ---
- ## π Proven Discovery Benchmarks (Hall of Fame)
- DarwinCode has autonomously recovered canonical physics and mathematical laws with **100.0% precision**:
- | Domain | Target Law | Discovered Closed-Form Expression | Accuracy | Status |
- | :--- | :--- | :--- | :---: | :---: |
- | **Quadratic Parabola** | $f(x) = x^2 + 1$ | `(abs((x * x)) + 1.00)` | **100.0%** | Conquered |
- | **Galilean Free Fall** | $y = 5 \cdot t^2$ | `((Max(Modulo(2.31, t), 5.00) * t) * t)` | **100.0%** | Conquered |
- | **Harmonic Wave** | $f(x) = 3\sin(x)$ | `((sin(x) + sin(x)) + sin(x))` | **100.0%** | Conquered |
- | **3D Paraboloid** | $f(x, y) = x^2 + y^2$ | `((y * y) + (x * x))` | **100.0%** | Conquered |
- | **Conditional Switch** | $\text{if } a > b \Rightarrow a - b \text{ else } a + b$ | `Max((a - b), ((b - (a - b)) - 1.00))` | **100.0%** | Conquered |
- ---
- ## π¬ Advanced Research Engines
- ### 1. Elliptic Curves & Birch-Swinnerton-Dyer (BSD) Invariants
- Located in `core/src/elliptic_bsd.rs`:
- - High-performance arithmetic point counting on $\mathbb{F}_p$ for curves $y^2 = x^3 + Ax + B$.
- - Fourier trace computation $a_p = p + 1 - |E(\mathbb{F}_p)|$ with Hasse bounds $|a_p| \le 2\sqrt{p}$.
- - Sato-Tate angle distribution mapping: $\theta_p = \arccos\left(\frac{a_p}{2\sqrt{p}}\right)$.
- - Goldfeld-Mestre logarithmic heuristics for analytic root number $W(E)$ parity prediction.
- - Benchmarked against verified LMFDB (*L-functions and Modular Forms Database*) curves.
- ### 2. Fluid Dynamics & Navier-Stokes Blow-Up Simulation
- Located in `core/src/navier_stokes.rs`:
- - Hou-Luo / De Gregorio 1D vorticity model with solid boundary effects.
- - Periodic discrete Hilbert transform via exact cotangent kernel.
- - Beale-Kato-Majda (BKM) singularity detection: $\int_0^T \|\omega\|_{L^\infty} dt$.
- - Genetic evolution of self-similar blow-up profiles:
- $$\Omega(\xi) = \frac{c_0 \xi}{(1+\xi^2)^\gamma}$$
- ### 3. Ramanujan Continued Fraction Engine & OEIS Miner
- Located in `core/src/ramanujan.rs` & `core/src/oeis.rs`:
- - Generates generalized continued fractions:
- $$a_0 + \frac{b_1}{a_1 + \frac{b_2}{a_2 + \dots}}$$
- converging to fundamental constants ($\pi$, $e$, Catalan's $G$, Apery's $\zeta(3)$).
- - Automated sequence synthesis against OEIS integer sequences.
- ### 4. The Unprecedented Pi Discovery Triad
- Located in `core/src/pi_continued_fractions.rs`, `core/src/pi_galperin_billiards.rs`, and `core/src/pi_bbp_spigot.rs`:
- - **Recurrent Non-Polynomial Continued Fractions:** Stabilized Euler-Wallis forward recurrence scaling convergent fractions to eliminate floating-point overflow across arbitrary search depths.
- - **Galperin Chaotic Billiards Symplectic Engine:** Exact 1D elastic collision dynamics between two blocks ($M/m = 100^N$) and a wall, yielding exactly $\lfloor \pi \cdot 10^N \rfloor$ collisions ($N=1 \to 31$, $N=2 \to 314$, $N=3 \to 3141$, etc.) with machine-epsilon symplectic energy conservation ($|\Delta E / E_0| < 10^{-10}$).
- - **Modular BBP Spigot Extractor:** High-performance discrete modular extraction engine $d_n = \Phi(n) \pmod{10}$ providing canonical verification datasets for discrete evolutionary circuits.
- ---
- ## π Quick Start
- ### Prerequisites
- - [Rust 1.75+](https://rustup.rs/) (Cargo & rustc)
- ### 1. Installation & Build
- ```bash
- git clone https://github.com/miguelguerra200022-sudo/DarwinCode.git
- cd DarwinCode
- cargo build --release
- ```
- ### 2. Launch the Engine & Web Cockpit
- ```bash
- ./target/release/darwin_cli
- ```
- Open **`http://localhost:8080`** in any web browser to observe the live evolutionary stream, topology graphs, and Hall of Fame!
- ### 3. Run MCP Server for AI Coding Agents
- ```bash
- ./target/release/darwin_cli --mcp
- ```
- ### 4. Direct CLI Synthesis
- ```bash
- ./target/release/darwin_cli synthesize --inputs x --output float --dataset "[-2, 5], [-1, 2], [0, 1], [1, 2], [2, 5]"
- ```
- ---
- ## π§ͺ Testing & Verification
- Run the entire suite of 76 comprehensive unit, integration, and property tests:
- ```bash
- cargo test --all
- ```
- Result:
- ```
- test result: ok. 54 passed (darwin_core); 22 passed (darwin_cli); 0 failed; 0 ignored
- ```
- ---
- ## π€ Model Context Protocol (MCP) Integration
- DarwinCode implements the official **Model Context Protocol (stdio)**. Add it to your AI agent configuration:
- ### Claude Desktop (`claude_desktop_config.json`)
- ```json
- {
- "mcpServers": {
- "darwin-code": {
- "command": "/absolute/path/to/DarwinCode/target/release/darwin_cli",
- "args": ["--mcp"]
- }
- }
- }
- ```
- ### Cursor / Codex / Antigravity (`~/.gemini/antigravity-cli/mcp/darwin-code.json`)
- ```json
- {
- "command": "darwin_cli",
- "args": ["--mcp"]
- }
- ```
- ### Available MCP Tools:
- 1. `darwin_synthesize`: Symbolic regression and law discovery from dataset points.
- 2. `darwin_optimize_code`: Prunes dead AST branches and bloat using parsimony.
- 3. `darwin_evolve_voxels`: Evolves verified 3D structural voxel matrices.
- 4. `darwin_evolve_cppn`: Continuous compositional pattern producing networks for 3D topologies.
- 5. `darwin_generate_city`: Generates procedural cyberpunk architectural districts.
- 6. `darwin_ramanujan_solve`: Discovers continued fraction representations for mathematical constants.
- 7. `darwin_srsd_hard_solve`: High-dimensional symbolic discovery for physics laws.
- 8. `darwin_oeis_discover`: Reverse-engineers integer sequences from OEIS with holonomic checks.
- 9. `darwin_bsd_analysis`: Analyzes elliptic curves, Frobenius traces, and BSD rank parity.
- 10. `darwin_navier_stokes_blowup`: Simulates Hou-Luo fluid vorticity and self-similar singularities.
- 11. `darwin_safe_eval`: Deterministic gas-metered evaluation sandbox.
- 12. `darwin_get_status`: Returns engine telemetry, generation count, and Hall of Fame records.
- 13. `darwin_pi_continued_fraction`: Evaluates generalized non-polynomial Pi continued fractions via Euler-Wallis.
- 14. `darwin_pi_billiards_simulate`: Simulates Galperin chaotic billiards collision dynamics for Pi.
- 15. `darwin_pi_spigot_extract`: Canonical discrete decimal Pi digit extractor for evolutionary circuits.
- ---
- ## π Repository Structure
- ```
- DarwinCode/
- βββ assets/ # High-res logos and banners
- β βββ logo.jpg # Emblem logo
- β βββ banner.jpg # Hero banner
- β
- βββ core/ # Core Evolutionary Engine (darwin_core)
- β βββ src/
- β β βββ types.rs # Type system, safe math, OpCodes
- β β βββ genome/ # Computation DAGs, topological sorting
- β β βββ vm/ # Gas-metered deterministic virtual machine
- β β βββ mutation/ # Grammar-guided mutation, crossover
- β β βββ verifier/ # SMT-lite cycle detection and type checking
- β β βββ engine.rs # Evolutionary engine with double buffering
- β β βββ elliptic_bsd.rs# Elliptic curves & BSD invariant engine
- β β βββ navier_stokes.rs # Hou-Luo vorticity & fluid blowup solver
- β β βββ ramanujan.rs # Continued fraction discovery
- β β βββ oeis.rs # Integer sequence synthesis
- β β βββ pi_continued_fractions.rs # Euler-Wallis recurrence for Pi
- β β βββ pi_galperin_billiards.rs # Galperin elastic collision dynamics
- β β βββ pi_bbp_spigot.rs # Decimal digit table and extractor
- β βββ tests/ # Unit and integration test suites
- β
- βββ cli/ # Runner, MCP Server & Embedded Web (darwin_cli)
- β βββ src/
- β βββ main.rs # Evolution coordinator and CLI entrypoint
- β βββ mcp.rs # Model Context Protocol stdio server
- β βββ mcp_tools.rs # MCP tool definitions and executors
- β βββ server.rs # Embedded HTTP/SSE live streaming server
- β
- βββ skills/ # Agent Skills
- β βββ darwin-code/ # Antigravity & Claude Code skill definitions
- β
- βββ web/ # Embedded Web Cockpit (http://localhost:8080)
- β βββ index.html # Cyberpunk dashboard interface
- β βββ style.css # Visual styling
- β βββ app.js # Real-time SSE client and 3D visualizer
- β
- βββ OEIS_SUBMISSIONS.md # Formal OEIS submissions guide (A161330 / A006459)
- βββ LICENSE # Dual License (PolyForm Noncommercial + Commercial)
- βββ README.md # Project documentation
- ```
- ---
- ## π License
- DarwinCode is dual-licensed:
- - **Free for Individuals, Independents & Academic Research:** Licensed under the [PolyForm Noncommercial License 1.0.0](LICENSE). You are free to study, experiment, publish papers, and build non-commercial tools.
- - **Commercial Enterprise License:** Required for commercial companies, proprietary hedge funds, and institutions with over **$1,000,000 USD** in cumulative capital, funding, or annual revenue.
- For commercial licensing and enterprise support:
- - Author: **Miguel Guerra** ([@miguelguerra200022-sudo](https://github.com/miguelguerra200022-sudo))
- - Inquiries: Open a confidential inquiry via repository issues or GitHub profile.
- ---
- <p align="center">
- <sub>Built with mathematical passion and pure Rust. Engineered for open-ended discovery.</sub>
- </p>
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If itβs helped, pass it on.