mod accept

module accept

The acceptance-rule trait: (delta_e, T) -> p. The acceptance-rule trait of the IISE manuscript: Accept : R x R_>0 -> [0, 1].

Traits

trait AcceptRule<T: Float>

A (delta_e, T) -> p acceptance rule.

IISE manuscript laws:

  • L3: downhill moves are accepted with probability one.

  • L4: for a fixed uphill move, the acceptance probability is non-decreasing in temperature.

Implementors are responsible for satisfying these contracts; proptest sweeps in tests/laws_proptest.rs witness them at runtime.

Functions

fn accept_prob(&self, delta_e: T, temp: T) -> T

Returns p in [0, 1], the acceptance probability for an uphill move of size delta_e at temperature temp.

Structs and Unions

struct Metropolis

Metropolis acceptance: probability one for downhill moves, otherwise exp(-delta_e / T).

Traits implemented

impl<T: Float + Send + Sync> AcceptRule<T> for Metropolis
impl sealed::Acceptance for Metropolis
impl<T: Float + Send + Sync> CertifiedAcceptance<T> for Metropolis
struct TsallisAccept<T: Float>

Tsallis-Stariolo 1996 generalised acceptance with index q_a (doi:10.1016/S0378-4371(96)00271-3).

p = [1 + (q_a - 1) * delta_e / T]^(1 / (1 - q_a)) for uphill moves. Equivalently, p = exp_q(-delta_e / T) where exp_q is the Tsallis q-exponential. The case q_a == 1 is the Metropolis limit (exp(-delta_e / T)) and is dispatched explicitly.

For q_a greater than one the acceptance is heavy-tailed: at large delta_e / T it decays as a power law instead of exponentially, which is why GSA outperforms classical SA on multimodal landscapes – more uphill acceptance at high T enables basin escape. Xiang/Sun/Fan/Gong 1997 use the default q_a = 2.7 (doi:10.1016/S0375-9601(97)00474-X). At fixed T and positive delta_e, larger q_a gives larger p.

For q_a less than one the base can go negative when delta_e / T > 1 / (1 - q_a); this is the compact-support regime of the Tsallis q-exponential and is clamped to zero acceptance, matching Tsallis 1988 Eq.(7) (doi:10.1007/BF01016429).

q_a: T

Tsallis acceptance index. q_a == 1 is the Metropolis limit; q_a > 1 is heavy-tailed (accepts more uphill than Metropolis at fixed T); q_a < 1 is compact-support.

Implementations

impl<T: Float> TsallisAccept<T>

Functions

fn new(q_a: T) -> Self

Constructs a Tsallis acceptance rule.

Traits implemented

impl<T: Float + Send + Sync> AcceptRule<T> for TsallisAccept<T>
impl<T: Float> sealed::Acceptance for TsallisAccept<T>
impl<T: Float + Send + Sync> CertifiedAcceptance<T> for TsallisAccept<T>