Currently, still working on my fuzzy module. I don't have the faintest clue if this is going to sound coherent, but I'll try.
You have one set of rules defining a set of input ranges. You have another set of rules defining a set of output ranges. A third set of rules links the inputs to the outputs. If an input is contained within a single input range, it is measured according to where it is contained within that single range and proportionally translates to a single value in the output range that corresponds to that input.
If it is inside two inputs, the degree to which it is contained within both is measured, and then both outputs are used to proportionally produce a single value that corresponds to both output ranges.
This is a relatively simple concept that I think people would like to be able to plug into their Perl. (It's meant to provide an interface to any two things that are meant to be a feedback loop, like the temperature in a room and the speed of your air conditioner motor, or the dirtiness of your clothes and the amount of soap your washing machine uses.) I mean, I could see this kind of thing performing code optimization for you on the fly (say, rating incoming datasets on sortedness and then picking a good sorting algorithm) if it's fast enough.
Key: IF it's fast enough.
Right now the code is a damn mess, like worse than most things I've recently written. I'm trying to get it down as quickly as I can, which is probably part of the issue -- most of my design was on the interface, and that went smooth as silk. The guts, well, I thought I had a nice clear math model to work with, but it turns out I didn't understand it correctly.
The second I figured that out, I should have stopped, ripped everything out but the interface, and started over after a few days of rereading the details.
Instead, I plugged along, and now I'm determined to make this thing work, dammit.
Anyway, today is hopefully the last day of writing new code. The rest of my time with this thing will be documentation and refactoring (not necessarily in that order).
I have almost everything. I have the dataset describing the points that describe the "curve" needed in this model. Today I write the part that determines the average height of that curve and then determines the point of average height in the curve. (I keep hoping that some insight will make me realize that I have some sort of simple algebraic model, but I can't find it, so I'm going to forge ahead with this monstrosity of math.)
I'm not really a programmer yet. I'm not really a mathematician. If I were either, this would be going so much easier.
Anybody who knows how to implement Bart Kosko's SAM off the top of their head, please, let me know.