Posts: 45
Threads: 9
Joined: Mar 2005
I'm probably asking a really vague question or just being silly, but does anyone have an idea of how somone might do fuzzy logic in QB. I'm sorry, i don't have any code to post because while the book I bought on AI spends an entire chapter on fuzzy logic it doesn't give any examples of how to do it.
Jack
Posts: 45
Threads: 9
Joined: Mar 2005
Thanks, what i was really wandering was how you define for example. 'cool' for the computer. The book has a whole bunch of graphs with over lapping lines to define this kind of thing, how do you get the computer to decide if it's medium temerature or cool when they both overlap?
i figured 'cool' would be a reading from a sensor (like a thermo coupling)that was 'lower' than whatever floor youd set for allowable operational ranges. when that 'state' is achieved, the machine would then carry out instructions to heat up the machine.
thats how im reading it. seems like an ordinary FSM with weird... labeling, if you will
Posts: 1,774
Threads: 62
Joined: Aug 2003
That's pretty much what I was thinking too.
just something like this...
Code:
Temp = Temp+ TempDir
CoolingQuickly = TempDir<=-30
AlmostStable = ABS(TempDir)<=3
HeatingQuickly = TempDir>=30
Cool = Temp<500
Warm = Temp>=500 and Temp<=1000
Hot = Temp>1000
If Cool Then
If CoolingQuickly then TempDir = TempDir + 5
If AlmostStable then TempDir = TempDir*.5
End If
If Warm Then Bleh
If Hot then Blarg
Posts: 1,025
Threads: 44
Joined: May 2005
isn't it called fuzzy logic because there aren't exact numbers? so wouldn't a random number be good to put in there as well?