Spaces:
Sleeping
Sleeping
| //! NuWave Lenia Engine — Rust Core | |
| //! | |
| //! Applies Lenia dynamics to transformer weight matrices. | |
| //! The hot path: 196 weight matrices × (conv2d + growth + conservation) per step. | |
| //! Python/PyTorch: ~65s. Rust target: <5s. | |
| //! | |
| //! The growth function IS the learning rule. No backprop. No loss function. | |
| //! Each weight neighborhood evolves based on its neighbors' states | |
| //! and the activation flow through it. | |
| //! | |
| //! PyO3 bindings: Python calls step() with flat f32 arrays. | |
| //! Rust does the math. Returns delta arrays Python applies to tensors. | |
| mod engine; | |
| mod kernel; | |
| use pyo3::prelude::*; | |
| fn nuwave_lenia(m: &Bound<'_, PyModule>) -> PyResult<()> { | |
| m.add_class::<engine::RustLeniaEngine>()?; | |
| m.add_class::<engine::LeniaStepResult>()?; | |
| Ok(()) | |
| } | |