As noted in [Angelopoulos CussensAngelopoulos Cussens2001], a query over an SLP defines a stochastic SLD-tree. Each leaf of the tree corresponds to a model. The MCMC can then be viewed as a walk between leaves of the tree. The method by which a proposed model is reached from the current model defines a proposal distribution. A wide variety of proposals are supported, provided that some weak conditions are met. In the MCMC used here, we have experimented with a number of proposal distributions. Because all proposals over the SLD-tree are concerned with finding a backtrack point on the path of the current model, and then sampling forward from that point, we call these backtracking proposals. To make the process clearer consider the general scenario in Fig. 21.
Given that the process is at
In [Angelopoulos CussensAngelopoulos Cussens2001] a cyclic probability (CP) backtracking
strategy was followed.
The algorithm is parametrised by the expected depth
and its formulated as follows:
One of the shortcomings of CP is that is dependant on
. For
deterministic strategies, strategies that do not depend on
, the
calculation of
, the acceptance probability,
can be simplified. We have therefore also implemented a cyclic
deterministic (CD) strategy. It is again parametrised by a number; the
expected
. The algorithm is much simpler. It simply cycles
from
to
, increasing by one at each MCMC iteration.
Backtracking chooses
, the choice point
levels up from the
leaf
, at each proposal.
A third scheme (UC, for uniform choice) randomly picks with a uniform
distribution between all choice points between
and the root.
Each of the three backtracking proposals can be chosen by selecting
the appropriate term for the second argument of run_data/11(see
Appendix B) which controls the corresponding
experiment. is the backtracking probabilistically proposal
with backtracking probability equal to
,
is the cyclic probabilistic backtracking with
,
is the deterministic strategy with
and
for the uniform choice strategy. We have tried
to make the backtracking proposal as modular as possible. If you wish
to implement a different proposal you should see file src/bp.pl.