jueves, 27 de junio de 2019


UNIVERSIDAD POLITÉCNICA SALESIANA.

Names: Jefferson Andres Sagbay, Oscar Xavier Tacuri.
Expert System Based on rules.
This project is about a expert System dedicated to alcohol probles people.

Alcohol consumption is considered a social problem very common in our environment, its consequences in the person are social, physical and psychological, is one of the most common tests in society and most people ignore this problem that affects children, youth and the elderly regardless of sex or race.
For this teste we make a test development on-line.
This test contian 10 questions, the question can take  and add the result of questions
  1. ¿Con qué frecuencia consume alguna bebida alcohólica?
  2. ¿Cuántas consumiciones de bebidas alcohólicas suele realizar en un día de consumo normal?
  3. ¿Con qué frecuencia toma 6 o más bebidas alcohólicas en un solo día?
  4. ¿Con qué frecuencia en el curso del último año ha sido incapaz de parar de beber una vez había empezado?
  5. ¿Con qué frecuencia en el curso del último año no pudo hacer lo que se esperaba de usted porque había bebido?
  6. ¿Con qué frecuencia en el curso del último año ha necesitado beber en ayunas para recuperarse después de haber bebido mucho el día anterior?
  7. ¿Con qué frecuencia en el curso del último año ha tenido remordimientos o sentimientos de culpa después de haber bebido?
  8. ¿Con qué frecuencia en el curso del último año no ha podido recordar lo que sucedió la noche anterior porque había estado bebiendo?
  9. ¿Usted o alguna otra persona ha resultado herido porque usted había bebido?
  10. ¿Algún familiar, amigo, médico o profesional sanitario ha mostrado preocupación por un consumo de bebidas alcohólicas o le ha sugerido que deje de beber?


We defined a template with slot and multisolt, and for the presentation capacity we have developed a application in Java.
Creation of the person template:
For the person template, we have:
  • A slot defined as a string type name.
  • A multislot with a chain type last name.
  • A age slot of an integer type
  • A slot type of a symbol type.
  • A test type multislot, in which we will store the results of the test
  • A slot result of integer type in which we keep the total of the qualification.
  • Finally we have a chain type recommendation slot in which to store the test recommendation. Img1:


Img 1. Person Template.

knowledge base we have defined global variables: a variable response that will allow us to store the total result of the test, a vap variable that will allow us to record the characters of the multislot surnames and the global variable with Test that will give us the credo based on the score obtained. Img2:

Img 2. Global Variables.

For the summation rule we have a for cycle that will allow us fill in the multislot lastname and concate it in a global variable.
Then with another cycle we add the results of each test question and store it in a global variable defined as a response. Img 3:

 Img 3. ADD Rule.

Recommendation rule allows us to calculate the result of what was obtained in the alcoholism test.
If the result is greater than thirty, the person has a problem of alcohol consumption in excess. Img 4:

Img 4. Recomender Rule, First if.

If the result is greater than twenty and less than thirty, the person presents an alcohol problem. Img5 :

Img 5. Recomender Rule, Second if.

If the result is greater than eight and less than or equal to twenty the person has a slight alcohol problem. Img 6:
Img 6. Recomender Rule, Third if.

If the result is less than or equal to eight, the person does not have an alcohol problem. Img 7:

Img 7. Recomender Rule, Fourth if.

We developed a front end in java, for which we have three windows.
A registration window that allows us to fill in several slots of the person template. Img8:

Img 8. Personal Data input.

Two test windows that allow us to fill in the recommendation and punctuation slots. Img 9 -Img 10.

Img 9. Questions test part 1.

Img 10 Questions test part 2.

Test Result : Img 11
Img 11. Test Result.

No hay comentarios:

Publicar un comentario