Re: fuzzy searching of a dictionary or use of word names w/ spaces
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: fuzzy searching of a dictionary or use of word names w/ spaces         

Group: comp.lang.forth · Group Profile
Author: Bruce McFarling
Date: Dec 6, 2006 12:34

John Passaniti wrote:
>> "DUP" and
>> "DUP DROP"
> What you're describing doesn't in any way appear to be "fuzzy" (at least
> in the classic sense). There is no *degree* of true/false here

To bring this into the controller context, if the degree of match to
DUP is "3", and the degree of match to "DUP DROP" is 8, and those are
the only matches, then it should do 3/11 of a DUP and 8/11 of a "DUP
DROP".

In fuzzy control, which I presume is the problem domain where we would
be most likely to be using fuzzy set theory in Forth, what is fuzzy is
*membership*, so that in particular on the BOUNDARY BETWEEN two
*mutually exclusive* categories (stop/slow/medium/fast) there is
partial membership in each neighboring category.

So where in a binary logic boolean mutually exclusive categories you
are either 0 stop or 1 stop, and if you are 1 stop you are 0 slow,
medium or fast, in fuzzy logic each state might be 4 bits with 16
levels of truthiness. And, for example with a washing machine spin
cycle speeding up you could go from:

Reading1: 15.0.0.0
Reading2: 12.3.0.0
Reading3: 7.8.0.0
Reading4: 1.14.0.0
Reading5: 0.15.0.0
Reading6: 0.13.2.0 etc.

And the control response applied is the weighted sum of each state
specific control response.

An application that comes to my mind would be where LRU is not
efficient because there are items used sporadically but regularly. You
could apply a "Least Heavily Used". Usage categories might be Once /
Some / Heavy. Again with 4 bit categories, you have to 16-cell tables,
once>another and some>another, of the transition from one state to the
next when an item is used again:

: USED-AGAIN ( state -- state' )
DUP once-mask AND IF
once-mask AND once>another + @
ELSE
some-mask AND 16/ some>another + @
THEN ;

Then you can tune the performance by the state transitions built into
the 2 tables.

When the LRU has any degree of heavy use (once-mask AND 0=), you
downrate it one category (with the 4 bit wide categories, that can be
as simple as 16/, but obviously you can do that with two more 16 long
state transition tables) and put it back at the front of the queue, so
that items used once drop off much more quickly than items used heavily.
no comments
diggit! del.icio.us! reddit!