sum-product from and to projective simulation