 |
 |
 |
 |
 |
 |
 |
 |  carlosdesa |
|  |  |  |  |  | posted 5/5/2011 21:34 |      |  |  |  |  |  |  |  |  | Hello, I would like to know if an expert system must have the same inference machine for every possibility.:
example:
If I want to catch rules that have only 1 premisses and 1 conclusion each, would the inference machine only stacking this kind of rules? example:
if sky is blue=yes then raining=no
Or should I make the inference machine be able to stack all kind of possibilities like: and, or
if sky is grey=yes and it's raining=yes then leave home=no
Because on my project all the knowledge base is like this:
if a1=1 and a2=2 and a3=3 then a4=4
if a1=6 and a2=4 and a3=3 then a4=2
if a1=4 and a2=5 and a3=6 then a4=7
if a1=2 and a2=4 and a3=5 then a4=6
So I guess my inference machine would expect every time 3 premisses and one conclusion. Could that be categorized as an expert system?
|  |  |
|  |  |  simnia |
|  |  |  |  |  | posted 8/12/2012 08:55 |      |  |  |  |  |  |  |  |  | I think by "inference machine" maybe you mean "inference engine", but more accurately I think you mean rule format. The idea of an expert system is to code knowledge in a format that is much more user-friendly than the usage of typical computer code variables and values:
"This formulation has the advantage of speaking in everyday language which is very rare in computer science (a classic program is coded)."
http://en.wikipedia.org/wiki/Expert_system
Since the natural way that humans express rules is by an arbitrary number of conjuncted clauses, an expert system shell *should* ideally allow an arbitrary number of clauses. However, personally I would still consider your rigid 4-clause-only rule format to be an expert system, even if you used variables instead of strings as you show. It just wouldn't be a very flexible or readable format; it would be sort of a half expert system, half program format.
It's not clear to me what you're trying to do. Design an expert system shell from scratch? Solve a specific problem and say you used an expert system? If your problem is always laid out as regularly you show, then some other data structure like a matrix might make more sense for holding the values. For example, your entire program could be written with a trivial data structure (an array) and a trivial inference engine (a loop):
knowledge base (a[*,*]) =
[1 2 3 4]
[6 4 3 2]
[4 5 6 7]
[2 4 5 6]
inference engine:
for i = 1 to 4
if a1=a[i,1] and a2=a[i,2] and a[i,3]=a3 then a4=a[i,4];
|  |  |
|
 |
|
 |
 |