It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

How to store rules in Knowledge base

Moderator: dafunkymunky

How to store rules in Knowledge base

Postby izah on Fri May 01, 2009 12:13 am

Hi forumers :D ;
i'm currently develop expert system using VB 6.0.
the problem is i don't know how to store all my rules inside database and call it from coding to infer user answer.
all those if..else thing now in my coding.
i don't know how to represent the rule into code and store in database (knowledgebase).

in my user interface i use radio/option button control to get answer from user.
each different answer for every question i set certain weightage.

These are the rules that currently hard-coded in source code. I don't know which want must be put in database and how to put it in database. Pls help me. Thanks in advance.

'R1
If notfresh.Value = True And smelly.Value = True And yellowmescrp.Value = True Then ' the rule
gred.unripe = 0 'the weightage
gred.almostripe = 0 'the weightage
gred.ripen = 0 'the weightage
gred.emptybunch= 0 'the weightage
gred.smelly = 10 'the weightage

'R2
ElseIf notfresh.Value = True And smelly.Value = True And yellworangemescrp.Value = True Then

gred.unripe = 0
gred.almostripe = 0
gred.ripen = 0
gred.emptybunch = 0
gred.smelly = 10

'R3
ElseIf fresh.Value = True And more10.Value = True And darkred.Value = True And orangemescrp.Value = True Then
gred.unripe = 0
gred.almostripe = 0
gred.ripen = 8
gred.emptybunch = 10
gred.smelly = 0

End If
izah
 
Posts: 2
Joined: Thu Apr 30, 2009 11:50 pm

Re: How to store rules in Knowledge base

Postby izah on Sun May 03, 2009 2:42 am

is there anybody can help me to solve tis???
izah
 
Posts: 2
Joined: Thu Apr 30, 2009 11:50 pm


Who is online

Users browsing this forum: No registered users and 5 guests