| 1 | ================================================================ |
|---|
| 2 | Logtalk - Open source object-oriented logic programming language |
|---|
| 3 | Release 2.35.0 |
|---|
| 4 | |
|---|
| 5 | Copyright (c) 1998-2009 Paulo Moura. All Rights Reserved. |
|---|
| 6 | Logtalk is free software. You can redistribute it and/or modify |
|---|
| 7 | it under the terms of the "Artistic License 2.0" as published by |
|---|
| 8 | The Perl Foundation. Consult the "LICENSE.txt" file for details. |
|---|
| 9 | ================================================================ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | % start by loading the example and the required library files: |
|---|
| 13 | |
|---|
| 14 | | ?- logtalk_load(birds(loader)). |
|---|
| 15 | ... |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | % ask the expert system for help in identifying a bird: |
|---|
| 19 | |
|---|
| 20 | | ?- expert::identify. |
|---|
| 21 | Bird identification expert system |
|---|
| 22 | |
|---|
| 23 | bill:sharp_hooked? (yes or no): yes. |
|---|
| 24 | eats:birds? (yes or no): yes. |
|---|
| 25 | feet:curved_talons? (yes or no): yes. |
|---|
| 26 | head:large? (yes or no): yes. |
|---|
| 27 | |
|---|
| 28 | What is the value for tail? |
|---|
| 29 | 1 : narrow_at_tip |
|---|
| 30 | 2 : forked |
|---|
| 31 | 3 : long_rusty |
|---|
| 32 | 4 : square |
|---|
| 33 | 5 : other |
|---|
| 34 | Enter the number of choice> 1. |
|---|
| 35 | |
|---|
| 36 | wings:long_pointed? (yes or no): yes. |
|---|
| 37 | |
|---|
| 38 | Possible identification : peregrine_falcon |
|---|
| 39 | |
|---|
| 40 | No (more) candidates found. |
|---|
| 41 | |
|---|
| 42 | (16379 ms) yes |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | % identify another bird: |
|---|
| 46 | |
|---|
| 47 | | ?- expert::identify. |
|---|
| 48 | Bird identification expert system |
|---|
| 49 | |
|---|
| 50 | bill:sharp_hooked? (yes or no): no. |
|---|
| 51 | bill:flat? (yes or no): no. |
|---|
| 52 | bill:short? (yes or no): no. |
|---|
| 53 | bill:hooked? (yes or no): yes. |
|---|
| 54 | |
|---|
| 55 | What is the value for flight? |
|---|
| 56 | 1 : ponderous |
|---|
| 57 | 2 : powerful |
|---|
| 58 | 3 : agile |
|---|
| 59 | 4 : flap_glide |
|---|
| 60 | 5 : other |
|---|
| 61 | Enter the number of choice> 2. |
|---|
| 62 | |
|---|
| 63 | color:dark? (yes or no): yes. |
|---|
| 64 | live:at_sea? (yes or no): yes. |
|---|
| 65 | nostrils:external_tubular? (yes or no): yes. |
|---|
| 66 | |
|---|
| 67 | What is the value for size? |
|---|
| 68 | 1 : large |
|---|
| 69 | 2 : plump |
|---|
| 70 | 3 : medium |
|---|
| 71 | 4 : small |
|---|
| 72 | Enter the number of choice> 1. |
|---|
| 73 | |
|---|
| 74 | wings:long_narrow? (yes or no): yes. |
|---|
| 75 | |
|---|
| 76 | Possible identification : black_footed_albatross |
|---|
| 77 | |
|---|
| 78 | No (more) candidates found. |
|---|
| 79 | |
|---|
| 80 | (34624 ms) yes |
|---|
| 81 | | ?- |
|---|