[CM] pval in markov
Rick Taube
taube at uiuc.edu
Wed Mar 16 07:47:12 PST 2005
> Was wondering if perhaps I am misunderstanding something about pval.
assuming that you are trying to get dynamic weights, ie weights that
change as the pattern evolves, then no you are not misunderstanding
anything -- this is a long standing
misfeature of the markov pattern. actually im going over all the
pattern stuff (and rewriting/updating the pattern documentation) right
now, ill see if i can do something about this while im at it.
> Now, the following does work:
>
> (setf x (new markov :of `((50 -> (51 ,(funcall (pval-thunk (pval
> (between .2 1.0))))) (50 .1))
> (51 -> (50 ,(funcall (pval-thunk (pval (between .2 1.0))))) (51
> .1)))))
this wont do what you want -- the value of your funcall is a constant,
not a pval.
if you want a workaround for now, since you are doing 1st order markov
you can use the graph pattern instead:
(new graph :of `((50 :to ,(new random :of `((51 :weight ,(pval (between
.2 1.0))) (50 :weight .1))))
(51 :to ,(new random :of `((50 :weight
,(pval (between .2 1.0))) (51 :weight .1))))))
More information about the Cmdist
mailing list