:OR
Purpose
Creates a disjunctive reasoning branch that succeeds if either branch succeeds.
Parameters
- path*
- Paths to be evaluated.
Examples
(:OR ((Color MyHouse Green) (Color NeighborsHouse Yellow))
((Color myHouse Yellow) (Color NeighborsHouse Green)))
Success criteria
Succeeds if any of the given paths succeed.
Failure criteria
Fails if all of the given paths fail.
Notes
- Only one path succeeds, so only one binding set is returned. This means that
you can use the same variable names in both paths without fear of conflict.
Each path is run in an independent subroutine.
- Side effects from partially-executed paths will not be removed
from the KB if the path fails.
Related commands
Back to...
Algernon commands
Algernon Documentation Central
Algernon home page