module MonteCarlo abstract type Proposer end struct GaussianProposer σ::Float64 end function (prop::GaussianProposer)(x::Vector{Float64}) for i in length(x) x += prop.σ * randn() end end abstract type Distribution end struct MarkovChain dist::Distribution prop!::Proposer x::Vector{Float64} logp::Float64 x′::Vector{Float64} end function step!(mc::MarkovChain)::Bool x′ .= x mc.prop!(x′) logp′ = mc.dist(x′) # TODO distribution end function calibrate!(mc::MarkovChain) while true for s in 1:100 acc += step!(mc) end if acc < 30 # TODO elseif acc > 50 # TODO else break end end end struct HamiltonianMonteCarlo end end