Skip to content

Demon algorithm

A microcanonical Monte Carlo method that augments a simulated system with a small energy reservoir whose exchanges enforce fixed total energy and reveal temperature.

Version
v2 · 2026-09-19 · History
Domain-specific #
4106
Domain group
Natural Sciences
Origin domain
Physics
Subdomain
Statistical Mechanics Computation → Physics

Core Idea

Proposed state changes give energy to the demon when they lower system energy and draw from it when they raise energy, accepting only when the reservoir can pay; the demon-energy distribution estimates inverse temperature after equilibration. An auxiliary nonnegative degree of freedom conserves total energy locally while allowing the physical subsystem to explore nearby energies, turning reservoir exchanges into an acceptance rule. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

How would you explain it like I'm…

The Energy Piggy Bank Demon

Imagine a game where tiny pieces keep trying to wiggle into new spots, and a little helper, the demon, holds a piggy bank of energy coins. If a wiggle gives off energy, the demon puts the coins in the bank. If a wiggle needs energy, the demon pays for it, but only if the bank has enough, because the bank can never go below zero. By watching how full the bank usually is, scientists can tell how hot the pieces are.

The Energy-Banking Demon

The demon algorithm is a computer method physicists use to simulate things like magnets or gases. The computer keeps proposing small changes to the system. An imaginary helper called the demon carries a store of energy that can never be negative. If a change lowers the system's energy, the demon takes the leftover energy; if a change raises it, the demon has to supply the energy, and the change only happens if the demon can afford it. That way the total energy of system plus demon never changes. After things settle, the amounts of energy the demon tends to hold reveal the system's temperature.

Energy-Reservoir Sampling

The demon algorithm is a Monte Carlo method from statistical mechanics for simulating a system at fixed total energy. Besides the physical system, it adds one extra degree of freedom, the 'demon,' which holds a nonnegative amount of energy. The algorithm proposes a random change to the system: if the change lowers the system's energy, the demon absorbs the difference; if it raises the energy, the demon pays for it, and the change is accepted only if the demon has enough energy. This keeps the total energy of system plus demon constant while letting the system explore nearby energies. After the simulation has equilibrated, the demon's energy follows a distribution from which you can estimate the inverse temperature of the system.

 

The Demon algorithm is a Monte Carlo method for sampling a physical system at approximately fixed total energy. An auxiliary, nonnegative degree of freedom, the demon, acts as a small energy reservoir. For each proposed state change, if the system energy decreases by ΔE, the demon's energy increases by ΔE; if the system energy increases, the demon must supply the difference, and the move is accepted only if the demon's energy would remain nonnegative. Total energy of system plus demon is therefore conserved locally, while the system itself is free to explore nearby energies, so reservoir exchanges become the acceptance rule. After equilibration, the demon's energy follows a distribution from which the inverse temperature can be estimated. A complete specification states the system's microstates and energy function, the demon reservoir and any bounds, the proposal distribution, the conservation of total energy, the acceptance rule, equilibration and sampling checks, and the temperature estimator.

Scope of Application

Demon algorithm belongs to statistical mechanics computation and is useful where the analyst can specify the typed statistical mechanics computation carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, then evaluate the system microstates and energy, demon reservoir and bounds, proposal distribution, total-energy conservation, acceptance rule, equilibration and sampling checks and temperature estimator are explicit. The scope is broad within that domain but bounded by the need for the system microstates and energy, demon reservoir and bounds, proposal distribution, total-energy conservation, acceptance rule, equilibration and sampling checks and temperature estimator are explicit. Conceptual simulation identity only; no experimental thermodynamic or hazardous-system procedure is provided.

Clarity

The abstraction clarifies a crowded vocabulary by making the system microstates and energy, demon reservoir and bounds, proposal distribution, total-energy conservation, acceptance rule, equilibration and sampling checks and temperature estimator are explicit the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test. A bare label is insufficient because the name Demon algorithm can be used for a formal identity, an implementation, or a neighboring result unless carrier and convention are stated.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Demon algorithm. Demon algorithm compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: the typed statistical mechanics computation carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express the system microstates and energy, demon reservoir and bounds, proposal distribution, total-energy conservation, acceptance rule, equilibration and sampling checks and temperature estimator are explicit independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of statistical mechanics computation because they reuse the typed statistical mechanics computation carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, An auxiliary nonnegative degree of freedom conserves total energy locally while allowing the physical subsystem to explore nearby energies, turning reservoir exchanges into an acceptance rule., and type the carrier, state every parameter and convention in the definition, test that the system microstates and energy, demon reservoir and bounds, proposal distribution, total-energy conservation, acceptance rule, equilibration and sampling checks and temperature estimator are explicit, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Demon algorithmParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Demon algorithmDOMAINPrime abstraction: Monte Carlo Simulation — is a kind ofMonte CarloSimulationPRIME

Current abstraction Demon algorithm Domain-specific

Parents (1) — outgoing typed relations

  • Demon algorithm is a kind of Monte Carlo Simulation Prime

    It remains its own entry because its identity is fixed by the system microstates and energy, demon reservoir and bounds, proposal distribution, total-energy conservation, acceptance rule, equilibration and sampling checks and temperature estimator.

Hierarchy paths (3) — routes to 3 parentless roots

Neighborhood in Abstraction Space

Demon algorithm sits in a crowded region of the domain-specific corpus (26th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Stochastic Processes & Markov Dynamics (29 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25