Currently I am storing it then statements as facts of the following form:
ifA:sun_shine_today ifAthenB thenB:grass_grow_today
I have a process that reviews known facts and creates new facts if the condition in the subject is a known fact. It then removes the condition from further consideration since the resulting fact already exists.
I am interested in how to store if then else conditions in a triple store. Also I am trying to figure out how to store an “AND” condition or an “OR” condition. An Example might be “if sun shine today and grass have water then grass grow today”.
See the folowing output for an example of current functionality. The sentence parsing and mapping to the fact condition needs to be greatly expanded and the think process will be automatic in the future and “hidden”. It currently shows the processing for debugging purposes:
alaric:_> if sun shine today then grass grow today
HARRY:_ Ok. If sun shine today then grass grow today.
alaric:_> if grass grow today then grass need mowing
HARRY:_ Ok. If grass grow today then grass need mowing.
alaric:_> if grass need mowing then alaric has chore
HARRY:_ Ok. If grass need mowing then Alaric has chore.
alaric:_> Does Alaric have chores?
HARRY:_ I don’t know if Alaric has chores.
alaric:_> think
HARRY:_ I think that if sun shine today then grass grow today.
I have reasoned that grass grow today.
I forgot fact: If sun shine today then grass grow today.
I think that if grass grow today then grass need mowing.
I have reasoned that grass need mowing.
I forgot fact: If grass grow today then grass need mowing.
I think that if grass need mowing then Alaric has chore.
I have reasoned that Alaric has chore.
I forgot fact: If grass need mowing then Alaric has chore.
Ok. I have thought awhile.
alaric:_> Does Alaric have chores?
HARRY:_ Yes, Alaric has chores.
How can I link two or more facts together as a set of facts and then erase those facts without affected other personal user stored facts that I want to keep permanently such as “Alaric has son”?