Suppose you had some sort of creepy crawly wriggling around in a petri dish on the laboratory bench. You want to know what it is, and a knowledge key is one way of doing it.
It comes in the form of a series of rules, like this:
| Rule 1 (Start here) : |
How many legs does the animal have?
Six legs : GO TO Rule 2 Eight legs : GO TO Rule 3 Lots of legs : GO TO Rule 4 No legs at all : GO TO Rule 17 |
| Rule 2 |
The animal is an insect
Does the animal have wings? Yes : GO TO Rule 10 No : GO TO Rule 27 |
| Rule 3 |
The animal is an arachnid
Is the animal about the size of a pin-head? Yes : Found it! The animal is a FLEA! No : GO TO Rule 13 |
etc.
You make your way through all these rules until you come to a Found It statement, (or a "I can't identify it" statement). Those of you with a computer programming background will recognise it as a simple Expert System.
It should be fairly straight forward to translate these rules into HTML ready to be put up on a web site. Here's a typical rule:
<HR>
<A NAME=Rule7><H2> Rule 7 </H2></A>
<P>
Does the animal have several body segments?
<P>
<A HREF=#Rule12>Click here if the answer is "Yes"</A>
<P>
<A HREF=#Rule19>Click here if the answer is "No"</A>
<HR>
I'll go through this step by step.
The rule that you see above looks like this on the actual web site:
Does the animal have several body segments?
Click here if the answer is "Yes"
Click here if the answer is "No"
When the biological key has actually identified an organism, you should really put it in its own particular rule. You might like to include a photograph. In this example rule below, I have used a table in order to align the text (on the left) and the picture (on the right). I have also included a hyperlink that takes the user back to the top of the knowledge key, ready to start again.
<HR>
<A NAME=Rule103><H2> Rule 103 </H2></A>
<P>
<TABLE WIDTH=100%>
<TR>
<TD WIDTH=70%> Found it! It's a ladybird, isn't it! </TD>
<TD> <CENTER> <IMG SRC=ladybird.gif> </CENTER> </TD>
</TR>
</TABLE>
<P>
<A HREF=#Rule1>Click here to return to the beginning</A>
<HR>
Rule 103
| Found it! It's a ladybird, isn't it! | ![]() |
Click here to return to the beginning
It is possible that the user may make a mistake and say that the creepy crawly has eight legs when, in fact, it has fourteen. In this case, it would be useful to add a hyperlink which takes the user back to the previous rule so that he/she can "undo" the last answer. In this way, the user could chain all the way back to the original rule. However, most web browsers already have a "Back" button that does exactly the same thing.
One feature that sets Expert Systems apart from simple biological keys is that they allow the user to ask Why are you asking me this? The Expert System then prints out a couple of lines justifying the question. This feature can be added simply to the rules that we have above:
<HR>
<CENTER>
<P>
<A NAME=Rule7><H2> Rule 7 </H2></A>
<P>
Does the animal have several body segments?
<P>
<A HREF=#Rule12>Click here if the answer is "Yes"</A>
<P>
<A HREF=#Rule19>Click here if the answer is "No"</A>
<P>
<A HREF=#Justify7>Click here if you want to know why I am asking this.</A>
</CENTER>
<HR>
There is an extra link which jumps to a section called Justify7. I have also taken the liberty of adding a command to centre everything on the screen. The section Justify7 might look like this:
<HR>
<H3>Justification for Rule 7</H3>
Creepy Crawlies can be classified as to how many body segments they have.
Insects always have three basic body segments (head, thorax and abdomen).
Arachnids (such as spiders) always have two. Arthropods, such as centipedes
and millipedes, always have a large number of body segments.
<P ALIGN=CENTER>
<A HREF=#Rule7>Click here to return to Rule 7</A>
<HR>
You see that there is a hyperlink taking you back to the rule itself.
This technique can be used to make knowledge keys for any subject, of course, not just biology. With a bit of imagination, more features can be added, for instance, presenting the user with several thumbnail sketches of animals or whatever and getting him/her to click on the one that most closely matches the specimen.
Real expert systems use complicated methods for storing and manipulating knowledge, which are far beyond anything that can be created using basic HTML techniques.
Finally, here is a link to an example knowledge key which I created using the techniques listed above. Once you see the key up on the screen, choose the View Document Source (or whatever the option is called on your browser) from the View menu in order to see the HTML code that defines it.
Back to the Main Menu