rules for previous and next items in a list

[email protected] (Pedro Kröger) Thu, 06 Mar 2008 06:59:34 -0300
Newsgroups gmane.lisp.lisa.general
Message-ID <[email protected]>
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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/