Deutsch English Français Italiano |
<2025Jan5.094909@mips.complang.tuwien.ac.at> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Re: Expert systems in forth Date: Sun, 05 Jan 2025 08:49:09 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 88 Message-ID: <2025Jan5.094909@mips.complang.tuwien.ac.at> References: <069d1724f6056b4c36d9e1ffaa3d606d@www.novabbs.com> <a489c8f27620718e4eb53a7fd349040e@www.novabbs.com> <b535bfcb55635df60139b1842074ebc4@www.novabbs.com> <d30f7d0abe74cbfd703742036441c630@www.novabbs.com> Injection-Date: Sun, 05 Jan 2025 10:47:26 +0100 (CET) Injection-Info: dont-email.me; posting-host="f49e48ee6e609beb7f510050b181a33b"; logging-data="1034467"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186MhjiuXyEUWHCUGu9Ct2w" Cancel-Lock: sha1:6UO/Fs6t8L7P++678+uzh1N2ruA= X-newsreader: xrn 10.11 Bytes: 4113 minforth@gmx.net (minforth) writes: >Thank you for sharing your outstanding work here! > >I don't think I understand the details of your program >but it seems to me way simpler than the famous Warren >Abstract Machine. That would not surprise me, because Ahmed Melahi is implementing an expert system framework, not Prolog (the progamming language for which the WAM was designed). Like for all other expert system examples I have seen (several, but no production expert systems), the examples do not include any logic variables, and I guess that his system does not support them; the majority of the complexity of implementing Prolog and of the WAM comes from dealing with logic variables, which can contain structures that themselves contain logic variables. OTOH, Ahmed Melahi's expert system framework supports forward chaining, while Prolog does not. Another difference is that Prolog uses the closed-world-assumption (if there is no fact for <something>, <something> is false), while Ahmed Melahi's framework (and expert systems in general) asks the user for input when it does not have a fact about <something>. Unlike expert systems examples I have seen earlier, where the rules led to a decision tree, trying some example leads to asking apparently-redundant questions (not answering "yes" is the same as answering "no"), e.g.: 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, final result: ------------- finally, ok It seems that these additional questions are from having alternative rules for the same thing, e.g.: s" bird :- feathers .;" >rules s" bird :- wings , lay-eggs .;" >rules However, given that I answered "" (i.e., "no") to wings, there is no reason for the system to ask me "lay-eggs". So I think that the redundant questions are not just due to alternative rules, but also a shortcoming of the system. Finally, the system could have found out earlier (and printed more clearly that it knows of no animal that has the properties that I answered with "yes". As for the animal database, the Platypus would be an interesting addition. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/ EuroForth 2024: https://euro.theforth.net