Venturecxx icon indicating copy to clipboard operation
Venturecxx copied to clipboard

Downstream random choices screw case

Open axch opened this issue 9 years ago • 1 comments

The following program fails with "Cannot make random choices downstream of a node that gets constrained during regen" (even though it does no explicit inference):

(assume x (flip))
(force x true)
(assume y (normal 0 1))
(assume z (normal 0 2))
(assume w (if x y z))
(observe w 0)
(assume y2 (normal y 1))
(assume z2 (normal z 2))
(observe x false)

Why? The last observe is implemented by a detach-regen cycle setting x to false. That causes the observation propagation from w to change which random choice it hits -- z is the "node that gets constrained during regen". z2 is the downstream random choice. Venture crashes because Lite's original implementers' brains exploded when thinking about what the right thing to do in that case is.

One way to make progress on this is to figure out what the weight of the particle this program is executed in should end up being, and how we are going to make that happen.

axch avatar Feb 03 '16 04:02 axch

Users have occasionally come across the "Cannot make random choices downstream of a node that gets constrained during regen" error message (and its twin "Cannot make requests downstream of a node that gets constrained during regen"), and invariably get confused by it. Not sure whether that qualifies this particular example as "User reported", though, since Vlad and I constructed it.

axch avatar Feb 03 '16 04:02 axch