LDFEE (Lossless Discrete Field Evolution Engine) 的前導物理設定
Preliminary Physics Settings of LDFEE (Lossless Discrete Field Evolution Engine)
作者:張榮興(Zhang Rong-Xing, Taiwan)
Author: Zhang Rong-Xing (張榮興), Taiwan
LDFEE(無損離散場演化引擎)不僅是一套極簡的高性能演算法,更是一個建立在「純整數時空觀」之上的數位物理宇宙。它捨棄了傳統物理學繁瑣的微積分與浮點數,僅用不到兩百行的純整數程式碼,就在普通電腦上重現了波動的干涉、折射與能量演化,展現了「大道至簡」的工程與哲學美學。
LDFEE (Lossless Discrete Field Evolution Engine) is not merely a minimalist, high-performance algorithm, but a digital physical universe built upon a "pure-integer view of spacetime." Abandoning the cumbersome calculus and floating-point arithmetic of traditional physics, it reproduces wave interference, refraction, and energy evolution on an ordinary computer using fewer than two hundred lines of pure integer code—embodying the engineering and philosophical aesthetics of "simplicity is the ultimate sophistication."
一、導論:從「連續微積分」走向「離散宇宙時空觀」
I. Introduction: From "Continuous Calculus" to a "Discrete Spacetime View of the Universe"
傳統物理學建立在「時空連續」的假設上,認為空間可以無限分割、時間如流水般連續推進,因此必須依賴複雜的偏微分方程與浮點數去逼近真實世界。
Traditional physics is built on the assumption of "continuous spacetime," positing that space can be infinitely divided and time flows continuously like water. Consequently, it must rely on complex partial differential equations and floating-point numbers to approximate the real world.
然而,LDFEE 採取了截然不同的「數位離散宇宙觀」(類似元胞自動機與數位物理學的視角)。在這個世界觀裡,宇宙的底層並不是平滑的畫布,而是由無數個整數方格組成的晶格(Lattice)。空間有最小的不可分割單位(網格點),時間也有最小的跳動節拍(運算步數 STEPS)。所有的物理現象,本質上都是相鄰方格之間最純粹的資訊交換。
However, LDFEE adopts a radically different "digital discrete worldview" (akin to the perspectives of cellular automata and digital physics). In this worldview, the underlying fabric of the universe is not a smooth canvas, but a lattice composed of countless integer cells. Space has a smallest indivisible unit (grid points), and time has a smallest discrete beat (computational STEPS). All physical phenomena are, in essence, the purest form of information exchange between adjacent cells.
基於這個離散時空觀,LDFEE 將傳統流體力學中龐大的納維-斯托克斯方程(Navier-Stokes Equations)進行了徹底的降維與純化,最終只保留最核心的動量驅動公式:
Rooted in this discrete view of spacetime, LDFEE performs a radical dimensionality reduction and purification on the massive Navier-Stokes equations of traditional fluid dynamics, retaining only the most essential momentum-driving formula:
g = −(1/ρ) ∇p
(加速度 g = − 密度倒數 1/ρ × 空間壓力梯度 ∇p)
(Acceleration g = − Inverse Density 1/ρ × Spatial Pressure Gradient ∇p)
之所以大刀闊斧地剔除傳統公式中的非線性對流項、黏滯擴散項與全域外力,是因為那些複雜項都是建立在「連續數學」與「無限可分流體假設」下的物理產物。在純粹的離散整數晶格中,不存在無限細微的連續渦流與平滑形變;相鄰方格之間最本質的物理互動,就只是由壓力差(∇p)所驅動、受介質慣性密度(ρ)所節制的局部推擠(負號代表能量永遠自發地從高壓方格推向低壓方格)。
The reason for boldly stripping away nonlinear advection terms, viscous diffusion terms, and global external forces from traditional equations is that those complex terms are physical artifacts born out of "continuous mathematics" and the assumption of an infinitely divisible fluid. Within a pure discrete integer lattice, infinitely fine continuous eddies and smooth deformations do not exist; the most fundamental physical interaction between adjacent cells is simply local pushing driven by pressure differences (∇p) and moderated by the medium's inertial density (ρ), where the minus sign signifies that energy always spontaneously pushes from high-pressure to low-pressure cells.
二、迷思澄清:不是「小數點被截斷」,而是「能量的最小量子」
II. Dispelling Myths: Not "Decimal Truncation," but the "Smallest Quantum of Energy"
許多初次接觸這套演算法的人,看到程式碼中使用整數(int32)與位元右移(>>),會誤以為這是「為了追求速度而犧牲小數點精度的近似做法」。若從離散宇宙觀來看,這其實是一個美麗的誤會:
Many who encounter this algorithm for the first time see the use of integers (int32) and bitwise right shifts (>>) in the code and mistakenly assume it is "an approximation that sacrifices decimal precision for speed." Viewed through the discrete worldview, however, this is a profound misunderstanding:
• 以整數 1 為起點向外擴展的最小量子: 傳統物理與量子力學的思維是「由大往小切」——先定出宏觀的單位 1,再不斷往小數點後倒推、尋找比例尺去分割出微小的量子;而 LDFEE 則是徹底反轉這個方向,採取「由內向外擴展」的建構哲學。系統透過放大 2²⁰ 倍(SCALE = 1 << 20)建立整數空間,直接將整數 1(對應基準尺度的 2⁻²⁰)定義為宇宙最底層、不可再分割的「最小能量量子」,並以這個 1 為基本積木向外擴展建構出整個宏觀世界。在這個物理規則下,低於 1 的能量並不是被演算法「錯誤截斷」,而是宇宙底層根本不存在比 1 更小的分割空間——低於最小量子即不存在(或為 0)。
• Expanding Outward from 1 as the Indivisible Minimum Quantum: Traditional physics and quantum mechanics operate "top-down"—starting from a macroscopic unit 1 and working backward into decimals to find proportional scales for subdividing tiny quanta. LDFEE completely reverses this paradigm with an "inside-out, outward-expanding" constructive philosophy. By scaling the integer space by 2²⁰ (SCALE = 1 << 20), the system directly defines the integer 1 (corresponding to 2⁻²⁰ of the reference scale) as the universe's fundamental, indivisible "minimum quantum of energy," expanding outward from this foundational 1 to build the entire macroscopic world. Under these physical laws, energy below 1 is not "erroneously truncated" by the algorithm; rather, no subdivision smaller than 1 exists in the fabric of this universe—anything below the minimum quantum simply does not exist (or is 0).
• 實現絕對的資訊守恆: 傳統浮點數在多執行緒運算時會產生微小的捨入漂移(Floating-point drift),導致每次模擬結果都有細微差異。純整數運算消除了所有隨機雜訊,讓每一次狀態轉移在位元層級都百分之百確定,實現了數位世界最嚴格的「位元級無損」。
• Achieving Absolute Information Conservation: Traditional floating-point numbers suffer from minute rounding drift during multi-threaded computations, causing slight variations in every simulation run. Pure integer arithmetic eliminates all random noise, making every state transition 100% deterministic at the bit level and achieving the strictest "bit-exact losslessness" in the digital realm.
• 網格放大代表「能量舒張」: 當我們把網格解析度從 2970 提升至 16K(14850 × 14850)時,並不是用影像插值去猜測像素,而是為這批固定的能量量子提供更細密的晶格空間。能量在更廣闊的離散方格中充分「舒張」開來,進而交織出極其銳利的晶格干涉紋理。
• Grid Scaling Represents "Energy Expansion": When we increase the grid resolution from 2970 to 16K (14850 × 14850), we are not using image interpolation to guess pixels; instead, we are providing a finer lattice space for this fixed batch of energy quanta. The energy "expands" fully across the broader discrete grid, weaving together razor-sharp lattice interference patterns.
《LDFEE 前導物理設定》

