Chunks: numerical comparisons

In today’s call we talked about numerical comparisons, as used in the demo on whether the weather is conducive to playing golf, see:

 https://www.w3.org/Data/demos/chunks/decision-tree/

golf {state humidity; humidity ?num; @gt ?num, 75} =>
 golf {state done},
 console {@do show; value "don't play"}

Where the @gt test succeeds if the value of ?num is greater than 75.

golf {state humidity; humidity ?num; @lteq ?num, 75} =>
 golf {state done},
 console {@do show; value "play"}

Where the @lteq test succeeds if ?num is less than or equal to 75.  There is no need for an @eq test, as you can simply put the literal value where you want to test for an exact match.

The @gt and @lteq operators are defined for convenience, and applications can easily define their own operations as @do actions, noting that the result that has been placed in a module buffer will then need to be tested in a follow on rule.

The chunks graph data and rules specification is flexible and designed for programming convenience.  By contrast, a minimalist specification for chunks would restrict chunks to a typed set of properties whose values are names that reference other chunks. In other words we dispense with numbers, booleans, string literals, dates and lists as built-in data types for values. All of these can be instead modelled as chunks. See:

 https://github.com/w3c/cogai/blob/master/minimalist.md

As such, @gt and @lteq can’t be used with minimalist chunks. This doesn’t restrict the expressive power of the rule language as you can instead use @do operations with multiple parameters/

Minimalist chunks is likely to be a closer match to the neural circuitry in the brain, but given that we aren’t consciously aware of the rules, we can’t directly introspect on this.  In principle, cognitive experiments could be designed that look at speed predictions as a probe for cognitive design.

When it comes to machine learning, further work is needed to ascertain whether minimalist chunks is better for machine learning than chunks with richer kinds of property values.

Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
W3C Data Activity Lead & W3C champion for the Web of things 

Received on Monday, 19 October 2020 13:32:12 UTC