ure icon indicating copy to clipboard operation
ure copied to clipboard

add api to extract inference trace

Open noskill opened this issue 6 years ago • 4 comments
trafficstars

Sometimes it is useful to have graph or tree for inference. Like source -> rule -> rule -> rule -> result

Usecases:

  • theorem proving
  • planning

noskill avatar Nov 20 '19 13:11 noskill

The backward chainer already somewhat supports that, i.e. the user can pass an auxiliary atomspace where the trace is stored. This is for instance used in the inference control meta-learning experiment https://github.com/opencog/opencog/tree/master/examples/pln/inference-control-learning

For more info on how to do that see (help cog-bc).

Regarding the forward chainer, the C++ code does some of that, but they are no scheme bindings for it. It could be added, although keep in mind that I eventually intend to merge the forward chainer into the backward chainer code (but that may far in the future, although I hope not).

ngeiswei avatar Nov 20 '19 14:11 ngeiswei

I found that forward chainer also writes some trace into current atomspace, though it is not possible to find how all premises became satisfied for current rule application.

noskill avatar Nov 21 '19 12:11 noskill

No inference control meta-learning experiments have been attempted with the forward chainer yet, so trace support is lacking.

ngeiswei avatar Nov 21 '19 14:11 ngeiswei

The following constitute a start of an API to extract FC traces

https://github.com/ngeiswei/reasoning-bio-as-xp/blob/6006874a9918b29510080d5ef43ffc5b7fc809e4/bio-as-utils.scm#L348-L479

It just needs some work and being moved to the URE.

ngeiswei avatar Mar 31 '20 09:03 ngeiswei