Re: Expert systems in forth

Liste des GroupesRevenir à cl forth 
Sujet : Re: Expert systems in forth
De : melahi_ahmed (at) *nospam* yahoo.fr (ahmed)
Groupes : comp.lang.forth
Date : 05. Jan 2025, 12:39:19
Autres entêtes
Organisation : novaBBS
Message-ID : <ac7f9bcea25de21c96d8addd6625e803@www.novabbs.com>
References : 1 2 3 4 5
User-Agent : Rocksolid Light
Hi,
thanks for testing.
As already said in my previous post the work is under development.
The system works well taking in consideration:
   - known that the scanning of the rules is linear, it doesn't repeat
the
     same question but can ask for additional inforamtion, for example,
when
     responding to eat-vegetals by no (or empty) it can ask if it is
     herbivore, the `no' reponse doesn't change the truth of a goal fact
but
     the goal fact becomes true if all condtion facts are true.
   - when doing backward chaining, there are some results but they are
not
     displayed, for your example: it says Finally: and nothing displayed
after,
     but there are some results like: carnivore, ungulate and you can
see these
     by executing .facts which displays only the true facts. After
"Finally" the
     system executes the actions associated to the facts that are true
and in
     this case the actions associated to carnivore and ungulate but
these
     actions aren't set before (nothing in the action field of the fcats
     carnivore and ungulate).
I'll see how to change the flow of the inference using the action field
of facts and executing them during the inference, like this we can
choose the next rule to use. I think this can be possible by modifying
the words `,' and `.;'
It is up to the knowledge engineer to define how rules are scanned
(linear, predetermined or with respect to the responses given by the
user when asked to verify a fact) and this is not in expert_systems.fs
file itself but in its data base file (where facts, rules and actions
are defined) (here animal.fs).
Adding the rules for platypus :
s" platypus :- swim , not-fly , eat-meat , hoofs , hair .;" >rules
and defining the action associated to platypus:
: _paltypus_ s"  It is a platypus." ;
s" _platypus_ cr type" platypus action>fact
gives:
<-?
  verify:  feathers <---
  verify:  wings <---
  verify:  lay-eggs <---
  verify:  hair <--- yes
apparently,
apparently,
  verify:  eat-vegetals <---
  verify:  eat-meat <--- yes
apparently,
apparently,
  verify:  hoofs <--- yes
apparently,
apparently,
  verify:  swim <--- yes
  verify:  black&white <---
  verify:  bird <---
  verify:  long-neck <---
  verify:  not-fly <--- yes
  verify:  black-stripes <---
  verify:  tawny-color <---
  verify:  herbivore <---
  verify:  long-legs <---
  verify:  dark-spots <---
  verify:  fly-well <---
  verify:  fly <---
apparently,
 It is a platypus.
apparently,
 It is a platypus.
final result:
-------------
finally,
 It is a platypus. ok
Thanks again.
Ahmed
--

Date Sujet#  Auteur
4 Jan 25 * Expert systems in forth20ahmed
4 Jan 25 `* Re: Expert systems in forth19ahmed
4 Jan 25  `* Re: Expert systems in forth18ahmed
4 Jan 25   `* Re: Expert systems in forth17minforth
4 Jan 25    +* Re: Expert systems in forth6ahmed
5 Jan 25    i`* Re: Expert systems in forth5mhx
5 Jan 25    i `* Re: Expert systems in forth4ahmed
6 Jan 25    i  `* Re: Expert systems in forth3mhx
7 Jan 25    i   `* Re: Expert systems in forth2dxf
7 Jan 25    i    `- Re: Expert systems in forth1ahmed
5 Jan 25    `* Re: Expert systems in forth10Anton Ertl
5 Jan 25     `* Re: Expert systems in forth9ahmed
5 Jan 25      `* Re: Expert systems in forth8Anton Ertl
5 Jan 25       +* Re: Expert systems in forth3ahmed
5 Jan 25       i`* Re: Expert systems in forth2Anton Ertl
5 Jan 25       i `- Re: Expert systems in forth1ahmed
5 Jan 25       `* Re: Expert systems in forth4albert
5 Jan 25        +* Re: Expert systems in forth2ahmed
6 Jan 25        i`- Re: Expert systems in forth1ahmed
6 Jan 25        `- Re: Expert systems in forth1dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal