Python Knowledge Engine (PyKE) / News: Recent posts

Announcing PyKE Sprint at PyCon.

It's official!

All PyKE enthusiasts are invited to participate in a sprint session at this year's PyCon conference in Atlanta. Go here to sign up: (to sign up, sign in to the PyCon site, then edit the page).

Posted by Bruce Frederiksen 2011-02-28

Any interest in a Pyke sprint at PyCon 2011?

I've been thinking about doing a Pyke sprint at PyCon 2011. I'm wondering what the interest level for this is.

Please either email me, or post a reply to my discussion on



Posted by Bruce Frederiksen 2010-11-19

Announcing Pyke 1.1.1 Release

This release has several bug fixes, including fixing problems running on Windows and on Python 2.5.

Posted by Bruce Frederiksen 2010-04-26

New Pyke Release 1.1

This release cleans up the interface from your Python program into Pyke.

You can now generally just create an engine with "knowledge_engine.engine(__file__)" without having to worry about your PYTHONPATH.

There are also new engine.prove methods that allow a much easier, and fully general, interface without having to create patterns yourself.

Check out the new "Using Pyke" section of the documentation!

Posted by Bruce Frederiksen 2010-03-12

Announcing Pyke 1.0.4 Release

The big changes for Pyke are:

1. The project was moved from subversion to mercurial to make it easier to contribute. (This was actually done in the 1.0.3 release that was never announced).

2. The release packaging was redone to simplify things. There is only one zip file now that contains everything, including the HTML documentation and the examples.

3. There is now also a release package for a version of Pyke that runs on Python 3.... read more

Posted by Bruce Frederiksen 2009-11-04

FYI: new FAQ page

I have started a new FAQ page on the project wiki site.

This is at

Feel free to contribute your tips and tricks to the wiki!

Posted by Bruce Frederiksen 2009-04-28

Announcing Pyke 1.0.2 Release

Fixed a few more bugs, and made several very minor enhancements.


Posted by Bruce Frederiksen 2009-04-21

Pyke: 1.0.1 Release

Both forward-chaining and backward-chaining rules (which may include python code) are compiled into python. Can also automatically assemble python programs out of python functions which are attached to backward-chaining rules. See Summary => Web Site.

Fixed a few more bugs and cleaned up the error reporting for the web_framework test script.

Posted by Bruce Frederiksen 2009-04-03

Pyke now has a Python3.0 branch in svn

If you would like to run Pyke with Python3.0, good news! There is a branch in subversion that supports this.

The bad news is that the branch is not packaged as a separate release yet and you have to run 2to3 on this branch.

See for how to use this.

Posted by Bruce Frederiksen 2009-04-03

Announcing Pyke 1.0 Release

This release fixes two bugs and is Pyke's first Production/Stable release!

Posted by Bruce Frederiksen 2009-03-18

Announcing Pyke 0.7 Release

This fixes a reported bug in Pyke. It also now requires that all of your Pyke source files reside under a Python package directory (either directly or indirectly). Corresponding to this change, the parameters to knowledge_engine.engine have change and it no longer defaults to the program's current working directory.

You must now enter the Python package name of the directory containing your Pyke source files. See the new "Using Pyke" web page.

Posted by Bruce Frederiksen 2009-01-17

Announcing Pyke 0.6 Release

This fixes a reported bug in Pyke and also sets up the examples to be easier to run by not requiring that they be run from a certain directory. This makes them easier to run from Windows. The sqlgen and web_framework examples were also changed to use the Sqlite3 database rather than MySQL, again, to make the examples easier to run.

Pyke's use of the PLY lex and yacc modules has been changed to avoid compiling the scanner and parsers each time Pyke is run. These changes should also help when running Pyke on IronPython as PLY has some incompatibilities with IronPython.... read more

Posted by Bruce Frederiksen 2008-12-31

Announcing Pyke 0.5 Release

With this release, Pyke moves to a beta status!

You will need to delete all compiled_krb directories and change the calls to engine.prove_n, engine.prove and engine.lookup (engine.prove_1 is not affected). See the release notes.

Posted by Bruce Frederiksen 2008-11-10

Announcing Pyke 0.4 Release

This release includes new capabilities to run programs from rules and check their output (in the 'special' knowledge_base), new question bases and .kqb files, a new .kfb file format for universal facts and extensive updates to the documentation.

The documentation includes a new "About Pyke" section and a new "Logic Programming" section that now targets the developer who is new to logic programming.... read more

Posted by Bruce Frederiksen 2008-08-31

Announcing Pyke 0.3 Release

There are several new premises:

forall/require: tests, or gathers, all solutions to a set of goals (such as all elements of a tuple).

notany: verifies that no solution exists for a set of goals.

python: allows adding arbitrary python statements, which can set python variables.

first: only produces the first solution for a set of goals, then fails on backtracking to prevent other solutions from being considered.... read more

Posted by Bruce Frederiksen 2008-06-09

Announcing Pyke 0.2 Release

There has been much work on the examples.

The family_relations example now has several examples of solving the same problem (forward-chaining only, backward-chaining only, and a combination including simple plan generation). You'll want to revisit this!

There are now two additional examples: sqlgen and web_framework. These are better examples of the use of plans. The web_framework example uses the sqlgen example, so it also demonstrates multiple rule bases.... read more

Posted by Bruce Frederiksen 2008-03-06

Announcing Pyke Alpha2 Release

This fixes all outstanding bugs and implements two new features:

1. The entire inference engine is now an object so that you can have several of them at the same time.

2. There is a new krb_traceback module that produces tracebacks translated back to .krb files, lines and line numbers.

These are both explained in the new "Using Pyke" page on the project web site!

Posted by Bruce Frederiksen 2008-02-13

Pyke scheduled talk at Pycon 2008

If you are attending PyCon 2008, please drop in for the scheduled talk "Applying expert system technology to code reuse with Pyke"!


Posted by Bruce Frederiksen 2008-01-04