Markov chain example not working
manisabri opened this issue · 4 comments
In this line and after https://github.com/opencog/atomspace/blob/master/examples/pattern-matcher/markov-chain.scm#L36
ERROR: Wrong type to apply: (stv 1 1)
Fixed in pull req #2826
The example suffered from two major defects:
- An out-of-control find-n-replace error that cut out valuable content
- Bug introduced when BindLink was modernized.
Well, it also suffers from a third major defect: its big, klunky and hard to understand. That has more to do with Atomese being like assembly-code for graphs, its low-level and verbose. I think the example could be re-written to use FloatValues, which should simplify it a fair bit. It was written before Values existed, and so it tried to piggy-back on stv's.
Or maybe what I mean to say: if you want to challenge your understanding of what is going on, then see if you can create a simpler example of the same thing, by moving Values, instead of copying and deleting Atoms. This wouldn't be an easy exercise, but I could coach you through it. The design of the AtomSpace was guided by writing examples, and trying to make them work, and then, later, trying to make them work in a simple and easy fashion. This was never easy, but it always offered great insights.
Thanks a lot I'll give it a try soon then