Include Paulo Moura's Logtalk OO LP system
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@53 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
72
Logtalk/examples/birds/SCRIPT
Normal file
72
Logtalk/examples/birds/SCRIPT
Normal file
@@ -0,0 +1,72 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% ask the expert system for help in identifying a bird:
|
||||
|
||||
| ?- expert::identify.
|
||||
Bird identification expert system
|
||||
|
||||
bill:sharp_hooked? (yes or no): yes.
|
||||
eats:birds? (yes or no): yes.
|
||||
feet:curved_talons? (yes or no): yes.
|
||||
head:large? (yes or no): yes.
|
||||
|
||||
What is the value for tail?
|
||||
1 : narrow_at_tip
|
||||
2 : forked
|
||||
3 : long_rusty
|
||||
4 : square
|
||||
5 : other
|
||||
Enter the number of choice> 1.
|
||||
|
||||
wings:long_pointed? (yes or no): yes.
|
||||
|
||||
Possible identification : peregrine_falcon
|
||||
|
||||
No (more) candidates found.
|
||||
|
||||
(16379 ms) yes
|
||||
|
||||
|
||||
% identify another bird:
|
||||
|
||||
| ?- expert::identify.
|
||||
Bird identification expert system
|
||||
|
||||
bill:sharp_hooked? (yes or no): no.
|
||||
bill:flat? (yes or no): no.
|
||||
bill:short? (yes or no): no.
|
||||
bill:hooked? (yes or no): yes.
|
||||
|
||||
What is the value for flight?
|
||||
1 : ponderous
|
||||
2 : powerful
|
||||
3 : agile
|
||||
4 : flap_glide
|
||||
5 : other
|
||||
Enter the number of choice> 2.
|
||||
|
||||
color:dark? (yes or no): yes.
|
||||
live:at_sea? (yes or no): yes.
|
||||
nostrils:external_tubular? (yes or no): yes.
|
||||
|
||||
What is the value for size?
|
||||
1 : large
|
||||
2 : plump
|
||||
3 : medium
|
||||
4 : small
|
||||
Enter the number of choice> 1.
|
||||
|
||||
wings:long_narrow? (yes or no): yes.
|
||||
|
||||
Possible identification : black_footed_albatross
|
||||
|
||||
No (more) candidates found.
|
||||
|
||||
(34624 ms) yes
|
||||
| ?-
|
Reference in New Issue
Block a user