View source for Wave function collapse (algorithm)