PredictiveImplicationLink

From OpenCog

A type of Link used to define a predictive implication, for example

PredictiveImplicationLink
  TimeNode "3s"
  PredicateNode "JumpOffCliff"
  PredicateNode "RestInPeace"

Formats

PredictiveImplicationLink
  <time-interval>
  <implicant-predicate>
  <implicand-predicate>

where <time-interval> is a TimeIntervalLink or a TimeNode.

Like with ImplicationLink it has a scope version with a variable declaration at the top

PredictiveImplicationScopeLink
  <variable-declaration>
  <time-interval>
  <implicant-predicate-body>
  <implicand-predicate-body>

Additionally, a version could have no time interval (as the one in example) and could be equivalent to using time interval [1, +inf(, but that remains to be defined.

Semantics

Like for SequentialAndLink there can be two variations of the definition of PredictiveImplicationLink

1. A lookback variant

BackPredictiveImplicationLink
  T
  A
  B
:=
ImplicationLink
  LaggedLink
    A
    T
  B

An equivalent definition, closer to that of the PLN book, using BackSequentialAndLink would be

BackPredictiveImplicationLink
  T
  A
  B
:=
ImplicationLink
  LaggedLink
    A
    T
  BackSequentialAndLink
    T
    A
    B

2. A lookahead variant

ForePredictiveImplicationLink
  T
  A
  B
:=
ImplicationLink
  A
  LaggedLink
    B
    -T

An equivalent definition, closer to that of the PLN book, using ForeSequentialAndLink would be

ForePredictiveImplicationLink
  T
  A
  B
:=
ImplicationLink
  A
  ForeSequentialAndLink
    T
    A
    B

Like for SequentialAndLink, it's unclear to me which variant should be the default, so until some decision is made they are referred as BackPredictiveImplicationLink and ForePredictiveImplicationLink for the lookback and lookahead variants respectively. Obviously the strengths of BackPredictiveImplicationLink and ForePredictiveImplicationLink converge to the same value as their confidences increase, so it shouldn't matter which variant is used. But for now, it might still be preferable to remain clear and unambiguous by explicitly referring to one or another in the implementation and use.

PredictiveImplicationScopeLink

Assuming

<vardecl>

contains a temporal variable, present in

<P-body>
<Q-body>

then

PredictiveImplicationScopeLink
  <vardecl>
  T
  <P-body>
  <Q-body>

is defined as

PredictiveImplicationLink
  T
  LambdaLink
    <vardecl>
    <P-body>
  LambdaLink
    <vardecl>
    <Q-body>

where T is the time lag.

If none of

<vardecl>
<P-body>
<Q-body>

contain a temporal variable, then

PredictiveImplicationScopeLink
  <vardecl>
  T
  <P-body>
  <Q-body>

is defined as

PredictiveImplicationLink
  T
  LambdaLink
    <vardecl + t>
    AtTimeLink
      <P-body>
      t
  LambdaLink
    <vardecl + t>
    AtTimeLink
      <Q-body>
      t

In other words, if the bodies are not explicitly temporal, we temporize them with AtTimeLink.

Lag

The lag T can be a constant like

TimeNode t

an interval

TimeIntervalLink
  TimeNode t1
  TimeNode t2

or generally speaking a distribution although that remains to be precisely defined.

Notations

For more concise notation, we can use ⇝ as an infix operator for PredictiveImplication (lookback or lookahead variants). For instance

PredictiveImplicationLink
  T
  A
  B

can be denoted

A⇝TB

⇝ has been selected as symbol because it is

\leadsto

in LaTeX, which gives a sense of temporal implication.