Copy Link
Add to Bookmark
Report

AIList Digest Volume 5 Issue 018

eZine's profile picture
Published in 
AIList Digest
 · 1 year ago

AIList Digest           Wednesday, 28 Jan 1987     Volume 5 : Issue 18 

Today's Topics:
Code - AI Expert Magazine Sources (Part 1 of 22)

----------------------------------------------------------------------

Date: 19 Jan 87 03:36:40 GMT
From: imagen!turner@ucbvax.Berkeley.EDU (D'arc Angel)
Subject: AI Expert Magazine Sources (Part 1 of 22)


here it is and rather lengthly, cat all nine parts together and shar
it, don't forget to remove my .signature at the end of the file.

[I had to reformat this. The file lengths may have been
altered, and I stripped out initial tabs. -- KIL]


#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
# AIAPP.JAN
# CONTNT.JAN
# EXPERT.JAN
# FILES.JAN
# OPSNET.JAN
# PERCEP.JAN
# This archive created: Sun Jan 18 19:24:39 1987
# By: D'arc Angel (The Houses of the Holy)
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'AIAPP.JAN'" '(29884 characters)'
if test -f 'AIAPP.JAN'
then
echo shar: "will not over-write existing file 'AIAPP.JAN'"
else
sed 's/^X//' << \SHAR_EOF > 'AIAPP.JAN'
X
X
X AI Apprentice
X by Bill Thompson and Bev Thompson
X "Creating Expert Systems from Examples"
X January 1987 AI EXPERT
X
X
X
XFigure 1.
X
X batch# part# power symptom Problem
X
X b 312 ac no power powersupply
X a 312 ac weak gear bad
X c 412 dc sparking powersupply
X d 412 ac no power wiring
X c 212 dc sparking powersupply
X c 412 ac weak wiring
X a 212 ac no power gear bad
X b 412 dc weak wiring
X b 212 ac weak gear bad
X
X
X
XFigure 2 - A decision tree produced from the data in Table 1.
X
X
X batch# part# power symptom Result
X
X b 412 ac weak gear bad
X a 212 dc weak powersupply
X d 212 dc sparking wiring
X d 412 ac no power powersupply
X
X
X
XTable 1 - A training set of data for a repair problem.
X
X If batch# is a
X then result is gear bad.
X
X If batch# is b
X and part# is 212
X then result is gear bad.
X
X If batch# is b
X and part# is 312
X then result is powersupply.
X
X If batch# is b
X and part# is 412
X then result is wiring.
X
X If batch# is c
and power is ac
X then result is wiring.
X
X If batch# is c
X and power is dc
X then result is powersupply.
X
X If batch# is d
X then result is wiring.
X
X
X batch# ?
X a: ---------------------------------------------gear bad
X b:part# ?
X 212: ---------------------------------------- gear bad
X 312: ---------------------------------------- powersupply
X 412: ---------------------------------------- wiring
X c:power??
X ac: ----------------------------------------- wiring
X dc: ----------------------------------------- powersupply
X d: --------------------------------------------- wiring
X
X
X
XTable 2 - A new set of data collected for the repair problem. This data
X is used for validation of the solution.
X
X
Xclinical descript distribution group Result
X
Xfever upper resp. epidemic respiratory parainfluenza
Xchills lower resp. local enteric adenovirus
Xrash mid resp. children exanthems mumps
Xswelling hospital latent rhinovirus
Xmalaise youngadults echo
Xheadache universal coxasackie
Xcough varicella
X
X
X rubella
X
XTable 3 - Definitions of results and attributes for identifying viruses.
X
Xlevel type of subject programming cover type basic Author
X software matter covered language
Xintro/adv gen/spec gen/spec no/yes soft/hard no/yes
X1. 1. 4. 3. soft 5. Jones
X2. 5. 5. 4. soft 1. Smith
X1. 1. 1. 3. soft 1. Fisher
X1. 1. 1. 3. hard 5. Mitchell
X1. 1. 1. 1. soft 1. Argyle
X5. 1. 5. 5. hard 1. Chang
X
X
X
Table 4 - An example set for selecting a textbook. This set was produced
X using the Flexigrid program.
X
Xsubject matter ? (gen/spec)
X < 2.50: programming covered ? (no/yes)
X < 2.00: ---------------------------------- Concepts
X >=2.00: cover ?
X hard: -------------------------- Today's
X soft: -------------------------- Information
X >=2.50: level ? (intro/adv)
X < 1.50: -------------------------------- Society
X >=1.50: level ? (intro/adv)
X < 3.50: ------------------------ Applications
X >=3.50: ------------------------ Data_structures
X
X
Xupply of serotinous cones
X.
X
Xprompt 10/acre adequate
XAre 10 trees per acre adequate to seed the area ?
X.
X
Xtrans 10/acre adequate
X10 per acre is /not/ adequate
X.
X
Xprompt burning planned
XHas a prescribed burning been planned ?
X.
X
Xtrans burning planned
Xburning is /not/ planned
X.
X
Xtrans use seed tree
XYou should /not/ use seed trees to seed the area
X.
X
15
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is yes
Xand desirable seed is yes
Xand serotinous cones is yes
Xand 10/acre adequate is yes
Xand burning planned is no
Xthen silviculture method is clearcut
Xand branch 17 is yes .
X
Xtrans silvaculture method
Xthe best silviculture method to use
X.
X
X16
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is yes
Xand desirable seed is yes
Xand serotinous cones is yes
Xand 10/acre adequate is no
Xthen silviculture method is clearcut
Xand branch 17 is yes .
X
X17
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is yes
Xand desirable seed is yes
Xand serotinous cones is no
Xand two harvests wanted is yes
Xand two harvests possible is yes
Xthen silviculture method is shelterwood
Xand branch 17 is yes .
X
Xprompt two harvests wanted
XDo you want to do two commercial harvests on this area ?
X.
X
Xtrans two harvests wanted
Xtwo commercial harvests are /not/ wanted
X.
X
Xprompt two harvests possible
XIs it possible to get two harvests from this area ?
X.
X
Xtrans two harvests possible
Xtwo harvests can /not/ be done on this area
X.
X
X18
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is yes
Xand desirable seed is yes
Xand serotinous cones is no
Xand two harvests wanted is yes
Xand two harvests possible is no
then silviculture method is clearcut
Xand branch 17 is yes .
X
X19
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is yes
Xand desirable seed is yes
Xand serotinous cones is no
Xand two harvests wanted is no
Xthen silviculture method is clearcut
Xand branch 17 is yes .
X
X20
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is yes
Xand desirable seed is no
Xthen silviculture method is clearcut
Xand branch 17 is yes .
X
X21
Xif branch 11 is yes
Xand pine desired is yes
Xand pine suited is no
Xthen convert is yes
Xand recommend is convert .
X
Xtrans convert
Xyou should /not/ convert the area to some more desirable kind of tree
X.
X
X22
Xif branch 11 is yes
Xand pine desired is no
Xthen convert is yes
Xand recommend is convert .
X
X
X26
Xif branch 17 is yes
Xand adequate seedbed is yes
Xthen branch 18 is yes .
X
Xprompt adequate seedbed
XIs there an adequate seedbed for planting ?
X.
X
Xtrans adequate seedbed
Xthere is /not/ an adequate seedbed for planting
X.
X
X27
Xif branch 17 is yes
Xand adequate seedbed is no
Xthen prepare site is yes
Xand branch 18 is yes .
X
trans prepare site
Xthe site should /not/ be prepared before planting
X.
X
X28
Xif branch 18 is yes
Xand silviculture method is shelterwood
Xthen use natural seeding is yes
Xand recommend is use natural seeding .
X
Xtrans use natural seeding
Xnatural seeding techniques should /not/ be used
X.
X
X29
Xif branch 18 is yes
Xand silviculture method is clearcut
Xand improved stock is yes
Xthen plant is yes
Xand recommend is plant .
X
Xprompt improved stock
XIs there improved planting stock available ?
X.
X
Xtrans improved stock
Xthere is /not/ improved stock available
X.
X
Xtrans plant
Xsince there is better stock available you can /not/ plant using that stock
X.
X
X30
Xif branch 18 is yes
Xand silviculture method is clearcut
Xand improved stock is no
Xand good cone supply is yes
Xthen scatter cones is yes
Xand recommend is scatter cones .
X
Xprompt good cone supply
XIs there a good supply of serotinous cones on the area ?
X.
X
Xtrans good cone supply
Xthere is /not/ a good cone supply
X.
X
Xtrans scatter cones
Xyou should /not/ scatter the supply of serotinous cones over the area
X.
X
X31
Xif branch 18 is yes
Xand silviculture method is clearcut
Xand improved stock is no
Xand good cone supply is no
Xthen direct seed is yes
Xand recommend is direct seed .
X
Xtrans direct seed
XSince the cone supply is inadequate, you should /not/ directly seed the
area
X.
X
X
X-------------------------------------------------------------------------
X
XThe following comments are not a part of the knowledge base. If you
Xtry to run the knowledge base this part of the file should be removed
X
X
XAbbreviated KEY
X
X1. stocking good is yes ............................. 2
X1. stocking good is no ............................. 10
X 2. avg < 5 is yes ................................ 3
X 2. avg < 5 is no ................................. 4
X3. 2000 + per acre is yes ..........WEED OR CLEAN.... 8
X3. 2000 + per acre is no ............................ 8
X 4. age is mature ................................. 11
X 4. age is immature ............................... 5
X5. site index > 60 is yes ........................... 6
X5. site index > 60 is no ............................ 9
X 6. product size is large ......................... 7
X 6. product size is small ......................... 9
X7. 120 + basal area is yes .........THIN............. 9
X7. 120 + basal area is no ........................... 9
X 8. severe competition is yes ....RELEASE.......... 9
X 8. severe competition is no ...................... 9
X9. high risk is yes ................................. CONTROL IF FEASIBLE
X9. high risk is no .................................. WAIT
X 10. other resources is yes ....................... MAINTAIN
X 10. other resources is no ........................ 11
X11. pine suitable is yes ............................. 12
X11. pine suitable is no .............................. CONVERT
X 12. desirable seed is yes ........................ 13
X 12. desirable seed is no ........USE CLEARCUT..... 17
X13. serotinous cones is yes .......................... 14
X13. serotinous cones is no ........................... 16
X 14. 10/acre adequate is yes ...................... 15
X 14. 10/acre adequate is no ......USE CLEARCUT..... 17
X15. burning planned is yes ........................... USE SEED TREE
X15. burning planned is no ...........USE CLEARCUT..... 17
X 16. two harvests wanted is yes ..USE SHELTERWOOD.. 17
X 16. two harvests wanted is no ...USE CLEARCUT..... 17
X17. adequate seedbeds is yes ......................... 18
X17. adequate seedbeds is no .........PREPARE SITE..... 18
X 18. silviculture method is shelterwood ........... USE NATURAL SEEDING
X 18. silviculture method is clearcut .............. 19
X19. improved stock is yes ............................ PLANT
X19. improved stock is no ............................. 20
X 20. good cone supply is yes ...................... SCATTER CONES
X 20. good cone supply is no ....................... DIRECT SEED
X
X
X
XThe purpose of this exercise is to show how a knowledge base can be
designed to directly follow a key. There are several places where the
XKB could have been made more efficient, but this would have meant
Xdeparting from the order of the key. You might find it an interesting
Xexercise to explore other ways this same information could have been
Xrepresented in the KB.
X
XThe key appears in the Managers Handbood for Jack Pine in the North Central
XStates. The Handbook was produced by the North Central Forest Experiment
XStation of the Forest Service of the U.S. Dept. of Agriculture. Our
Xintention in writing this knowledge base is to show the structure of a
Xknowledge base written for a backward chaining inference engine directly
Xfrom an existing document. If this KB were to be actually used, it would
Xneed to have clearer questions and more explanations to the user. These
Xexplanations are provided in the handbook and could be easily incorporated
Xinto the knowledge base.
X
XThe knowledge base will run on the expert system shell MicroExpert which is
Xan example of a backward chaining inference engine. MicroExpert is
Xavailable from McGraw-Hill for $49.95 and can be ordered by calling 1-800-
X628-0004 or, in NY, 212-512-2999 . The knowledge base is described in the
Xcolumn AI Apprentice which appears in the November issue of AI Expert
Xmagazine. The design details of the inference engine which runs the KB is
Xdescribed in the article "Inside an Expert System" in the April 1985
Xisuue of BYTE magazine.
X
XMicroExpert, AI Apprentice and "Inside an Expert System" are all written
Xby Bev and Bill Thompson . We're always happy to hear about your thoughts
Xand comments, good or bad on any of our work. Contact us at the address
Xbelow, on Compuserve or BIX. Our Compuserve id is 76703,4324 and we can be
Xreached by Easyplex or in the AI Expert Forum. Our BIX id is bbt and we
Xmay be contacted via BIXmail or by leaving comments in the MicroExpert
Xconference.
X
XBill and Bev Thompson
XR.D. 2 Box 430
XNassau, N.Y. 12123
X
X
X TREES.PRO
X PROLOG program
X
X
X/* This PDPROLOG program implements a knowledge base based upon the
X following key:
X
X To run the program type "go."
X Caution - This program can be very S L O W.
X
XAbbreviated KEY
X
X1. stocking good is yes ............................. 2
X1. stocking good is no ............................. 10
X 2. avg < 5 is yes ................................ 3
X 2. avg < 5 is no ................................. 4
X3. 2000 + per acre is yes ..........WEED OR CLEAN.... 8
3. 2000 + per acre is no ............................ 8
X 4. age is mature ................................. 11
X 4. age is immature ............................... 5
X5. site index > 60 is yes ........................... 6
X5. site index > 60 is no ............................ 9
X 6. product size is large ......................... 7
X 6. product size is small ......................... 9
X7. 120 + basal area is yes .........THIN............. 9
X7. 120 + basal area is no ........................... 9
X 8. severe competition is yes ....RELEASE.......... 9
X 8. severe competition is no ...................... 9
X9. high risk is yes ................................. CONTROL IF FEASIBLE
X9. high risk is no .................................. WAIT
X 10. other resources is yes ....................... MAINTAIN
X 10. other resources is no ........................ 11
X11. pine suitable is yes ............................. 12
X11. pine suitable is no .............................. CONVERT
X 12. desirable seed is yes ........................ 13
X 12. desirable seed is no ........USE CLEARCUT..... 17
X13. serotinous cones is yes .......................... 14
X13. serotinous cones is no ........................... 16
X 14. 10/acre adequate is yes ...................... 15
X 14. 10/acre adequate is no ......USE CLEARCUT..... 17
X15. burning planned is yes ........................... USE SEED TREE
X15. burning planned is no ...........USE CLEARCUT..... 17
X 16. two harvests wanted is yes ..USE SHELTERWOOD.. 17
X 16. two harvests wanted is no ...USE CLEARCUT..... 17
X17. adequate seedbeds is yes ......................... 18
X17. adequate seedbeds is no .........PREPARE SITE..... 18
X 18. silviculture method is shelterwood ........... USE NATURAL SEEDING
X 18. silviculture method is clearcut .............. 19
X19. improved stock is yes ............................ PLANT
X19. improved stock is no ............................. 20
X 20. good cone supply is yes ...................... SCATTER CONES
X 20. good cone supply is no ....................... DIRECT SEED
X
X
X
XThe purpose of this exercise is to show how an expert system can be
Xdesigned to directly follow a key. There are several places where the
Xprogram could have been made more efficient, but this would have meant
Xdeparting from the order of the key. You might find it an interesting
Xexercise to explore other ways this same information could have been
Xrepresented in the program.
X
XThe key appears in the Managers Handbood for Jack Pine in the North Central
XStates. The Handbook was produced by the North Central Forest Experiment
XStation of the Forest Service of the U.S. Dept. of Agriculture. Our
Xintention in writing this knowledge base is to show the structure of a
Xknowledge base written for a backward chaining inference engine directly
Xfrom an existing document. If this KB were to be actually used, it would
Xneed to have clearer questions and more explanations to the user. These
Xexplanations are provided in the handbook and could be easily incorporated
Xinto the knowledge base.
X
This program is similar to the KB for the expert system shell
XMicroExpert which is an example of a backward chaining inference engine.
XMicroExpert is available from McGraw-Hill for $49.95 and can be ordered
Xby calling 1-800-628-0004 or, in NY, 212-512-2999 .
XThe knowledge base is described in the AI Apprentice column which appears
Xin the November issue of AI Expert magazine.
XThe design details of the inference engine which runs the KB is
Xdescribed in the article "Inside an Expert System" in the April 1985
Xisuue of BYTE magazine.
X
XMicroExpert, AI Apprentice and "Inside an Expert System" are all written
Xby Bev and Bill Thompson . We're always happy to hear about your thoughts
Xand comments, good or bad on any of our work. Contact us at the address
Xbelow, on Compuserve or BIX. Our Compuserve id is 76703,4324 and we can be
Xreached by Easyplex or in the AI Expert Forum. Our BIX id is bbt and we
Xmay be contacted via BIXmail or by leaving comments in the MicroExpert
Xconference.
X
XBill and Bev Thompson
XR.D. 2 Box 430
XNassau, N.Y. 12123 */
X
X/* Control - In MicroExpert terms, the goal of the consultation is
X recommendation */
X
Xgo :- clear_kb,
X give_advice.
Xgive_advice :- recommendation(X),
X fail.
Xgive_advice :- print_advice.

------------------------------

End of AIList Digest
********************

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT