.. Copyright ÂŠ 2007 Bruce Frederiksen
.. Permission is hereby granted, free of charge, to any person obtaining a copy
.. of this software and associated documentation files (the "Software"), to deal
.. in the Software without restriction, including without limitation the rights
.. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
.. copies of the Software, and to permit persons to whom the Software is
.. furnished to do so, subject to the following conditions:
.. The above copyright notice and this permission notice shall be included in
.. all copies or substantial portions of the Software.
.. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
.. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
.. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.. THE SOFTWARE.
crumb: Knowledge Bases
Knowledge is made up of both *facts* and *rules*. These are gathered
into named repositories called *knowledge bases*.
section-pages: , fact_bases, rule_bases, special
Knowledge is made up of both *facts* and *rules*. These are organized
into named repositories called *knowledge bases*. A knowledge base is like
a directory for files on disk, except that knowledge bases may not be
nested. Therefore, facts and goals always have a two-level name.
Here are some examples of facts you might see in a web server application::
Note that three different knowledge bases (all `fact bases`_) are shown here
named ``header``, ``cookie``, and ``request``; each with multiple facts.
There are different types of knowledge bases.
- Those that contain facts are called `fact bases`_.
- Those that contain rules are called `rule bases`_.
- It is also possible to create other kinds of knowledge bases that lookup
facts and prove goals in different ways. The only one of these in pyke
is the special_ knowledge base.
All knowledge bases share the same name space; so that no two of them,
regardless of their type, may have the same name.
.. _fact bases: fact_bases.html
.. _special: special.html
.. _rule bases: rule_bases.html