[Lisa-users] rules for previous and next items in a list
Brought to you by:
youngde
From: <kro...@gm...> - 2008-03-06 10:01:09
|
Hi, I'm implementing a rule-based system (using lisa) for harmonic analysis of tonal music based on Harry John Maxwell's "An Artificial Intelligence Approach To Computer-Implemented Analysis Of Harmony In Tonal Music". I have a list of sonorities, which is a collection of notes that may or may not be a chord (one of the jobs of the system is to discover it). Most rules deal with one sonority, so my first thought was to have a loop and run the system independently for each sonority. But there are rules that depend on the analysis of previous and next sonorities. An example is: Rule 37. If the previous chord has not been analyzed, then defer analysis of this chord until the previous chord is done. Is there a rule-based solution to this, or should I put the sonorities in a list and ask the system to analyze the n+1 or n-1 element in the list as usual in imperative code? I'm new to rule-based systems, so I appreciate any pointers. I'm reading "Jess in action" since the syntax is similar to lisa's. Regards, Pedro Kroger |