Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #132746

Re: Expert systems in forth

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Expert systems in forth
Date 2025-01-05 08:49 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2025Jan5.094909@mips.complang.tuwien.ac.at> (permalink)
References <069d1724f6056b4c36d9e1ffaa3d606d@www.novabbs.com> <a489c8f27620718e4eb53a7fd349040e@www.novabbs.com> <b535bfcb55635df60139b1842074ebc4@www.novabbs.com> <d30f7d0abe74cbfd703742036441c630@www.novabbs.com>

Show all headers | View raw


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

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-04 11:32 +0000
  Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-04 11:41 +0000
    Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-04 11:42 +0000
      Re: Expert systems in forth minforth@gmx.net (minforth) - 2025-01-04 17:46 +0000
        Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-04 19:08 +0000
          Re: Expert systems in forth mhx@iae.nl (mhx) - 2025-01-04 23:24 +0000
            Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-05 05:52 +0000
              Re: Expert systems in forth mhx@iae.nl (mhx) - 2025-01-06 14:53 +0000
                Re: Expert systems in forth dxf <dxforth@gmail.com> - 2025-01-07 13:17 +1100
                Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-07 06:28 +0000
              Re: Expert systems in forth marcel hendrix <mhx@iae.nl> - 2026-07-12 19:58 +0200
                Re: Expert systems in forth dxf <dxforth@gmail.com> - 2026-07-19 15:37 +1000
                Re: Expert systems in forth marcel hendrix <mhx@iae.nl> - 2026-07-19 18:01 +0200
                Re: Expert systems in forth dxf <dxforth@gmail.com> - 2026-07-20 15:30 +1000
        Re: Expert systems in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-01-05 08:49 +0000
          Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-05 11:39 +0000
            Re: Expert systems in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-01-05 15:09 +0000
              Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-05 16:38 +0000
                Re: Expert systems in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-01-05 17:31 +0000
                Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-05 18:47 +0000
              Re: Expert systems in forth albert@spenarnc.xs4all.nl - 2025-01-05 18:51 +0100
                Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-05 19:01 +0000
                Re: Expert systems in forth melahi_ahmed@yahoo.fr (ahmed) - 2025-01-06 00:56 +0000
                Re: Expert systems in forth dxf <dxforth@gmail.com> - 2025-01-06 10:44 +1100

csiph-web