• Home
  • News
  • Blog
  • Releases
  • LLM history
  • Compare LLMs
  • Library
  • About
⌘K
Sign in

A blog and notes on development. The easiest way to reach me is via the social links below.

Contacts
talalaev.misha@gmail.com
Documents
Personal data processing policyPersonal data processing consent

Laplace's Demon in Code: Six Reasons Why a Perfect Forecast Is Impossible

Sh0ny
Sh0ny
26 июля 2026
  1. Home
  2. Blog
  3. Laplace's Demon in Code: Six Reasons Why a Perfect Forecast Is Impossible
3 min read

In short

A project written in Python and Go transforms Laplace's thought experiment into a runnable model—and shows exactly where determinism breaks down: from the cost of memory erasure to quantum uncertainty.

A perfect prediction of the future is a dream not only of 19th-century physicists, but also of AI engineers: if we know the state of a system and the law governing its evolution, the prediction should be accurate. A project on Habr takes this intuition literally and turns Laplace’s demon into an executable model written in Python and Go to show where and why the concept ceases to scale to real-world physics.

Formally speaking: given complete knowledge of the initial conditions and the law of evolution, the conditional entropy of any event converges to zero. The author constructs a finite deterministic system—a one-dimensional ring of w binary cells with an elementary cellular automaton—and computes everything using an exact brute-force search, without statistical estimates. For such a system, given a precisely specified initial state, any event has a probability of exactly 0 or 1. The demon works.

But then the limitations begin—six types, ranging from practical to fundamental.

Retrodiction and Irreversibility. For most cellular automaton rules, the evolution mapping is not a bijection. A single state may have multiple preimages or none at all (Garden of Eden). Knowledge of the current state does not distinguish between preimages beyond the a priori distribution—information is lost. In fundamental physics, the situation is different: Liouville’s theorem and the unitarity of quantum evolution preserve information at the microstate level; the increase in thermodynamic entropy is the result of a coarsening of the description, not of destruction. Distinguishing between these two cases is fundamental.

Computational Irreducibility. Eight of the 256 rules are additive over GF(2), and for them, a transition of n steps reduces to binary exponentiation—O(log n) instead of O(n). For Rule 90, a transition of 10^18 steps requires a logarithmic number of operations. For Rule 30, no general algorithm for a fast transition is known—this is an open problem (Rule 30 Prize Problems). The program honestly fails to perform accelerated computation and illustrates the problem rather than solving it.

Chaotic Dynamics and the Predictability Horizon. For the double pendulum, the leading Lyapunov exponent is estimated using the Benettin method rather than being set manually. The prediction reliability horizon is: T_pred = (1/λ) ln(δ_tol/δ_0). Beyond this horizon, the law remains deterministic, but the prediction loses its practical value exponentially fast. A telling example: in an early version, λ was set manually, and a single measurement reversed the conclusion regarding whether the horizon belonged to the region of reliability.

Quantum uncertainty. This is a constraint of a different nature: the result of a single measurement cannot be predicted from the state known prior to the measurement. For an entangled pair of qubits (a Bell state), given knowledge of the full wave function, the conditional entropy of the result of a local measurement remains at its maximum—1 bit. This is not a computational discovery of the program, but a direct consequence of Born’s rule embedded in the model. A complete classical description of the state does not transform a probabilistic outcome into a predetermined value.

The thermodynamic cost of information. Landauer’s principle sets a lower bound on the energy cost of logically irreversible erasure of a single bit: at least kT ln 2. Possessing knowledge is energy-free; the cost arises when the demon’s memory must be cleared for the next observation. The program finds the minimum sufficient knowledge by brute force and calculates the cost of clearing the memory as the number of bits stored multiplied by kT ln 2.

The project’s main conclusion: randomness turns out to be a property of the pair (event, observer), rather than of the event itself. An identical physical event acquires a different degree of uncertainty depending solely on the observer’s knowledge. We implement Laplace’s demon literally in a finite deterministic system—but the six constraints show where determinism ceases to scale to real physics, and each of them is classified by status: what has been proven, what is an open question, and what depends on interpretation.

Source: All Articles in a Row / Artificial Intelligence / Habr

новостиaiнаукатехнологии
More AI-tool write-ups on the Telegram channel — short and to the point
Subscribe on Telegram

Comments

(0)
​