// Backtracking-enabled stacks (BStacks) are very useful for AI // computation because they allow inserting a branching point anywhere // in a computation, even deep inside nested function calls and loops. // // BStacks normally operate serially, always exploring the main branch first // and then optionally backtracking afterwards. // // However, the only thing preventing a BStack from backtracking in // parallel to the main computation is the use of external mutable // objects. With sufficient cloning of these objects at a branch point // and/or the use of immutable data structures, there is no obstacle to // parallelizing. // // A further evolution of BStacks are PStacks. In PStacks, at any poin // in time, every ongoing or potential computation is listed with a // probability value p (usually 0 < p <= 1). // // Computations with higher probability are always pursued first.