#26 need a special way to get at the inference engine object

release 0.7
closed-fixed
5
2009-02-15
2009-02-11
Anonymous
No

Since many PyKE API calls derive from the current inference engine object, there needs to be a way to get this programmatically, so it can be called from a python statement inside rules.

For now, I just assert fb.infeng($eng) initially and then match as needed.

-Randy

Discussion

  • There is a variable available called 'engine' within all rules (both forward-chaining and backward-chaining) for this purpose.

    But this wasn't documented, so I've added mention of this in the documentation in svn rev 184.

    Thanks for pointing this out.

     
    • labels: 1028958 --> documentation
    • status: open --> closed-fixed