Any projects base on PyKE?

2,412 views
Skip to first unread message

zhijun wu

unread,
Oct 17, 2011, 10:21:35 AM10/17/11
to py...@googlegroups.com
Hi, everyone.
I'm new to PyKE, and want to use PyKE in my project.
Are there any successful projects that base on PyKE? I think it's a
good idea to refer to some successful projects before using it.
Any suggestion (and URL) will be appreciated.
Thank you.

Elisiano Petrini

unread,
Nov 25, 2011, 10:37:38 AM11/25/11
to py...@googlegroups.com
Hi pinot and all,
   I'm in the same situation and it would be really useful to see a real life example.

I also saw your other post (about the bad documentation) and I have to admit that I kinda agree with you, even if not fully.
Actually the documentation is there and is also quite advanced, the only thing is that it is lacking an introduction for beginners.

So hereby I'm asking to the experts, which are the prerequisites in order to fully understand PyKE and to use it at its best?

I'm now doing a project which needs some sort of knowledge base and I think that PyKE would be the right choice to my case, if only I knew how to use it.

Probably I'm still missing something theoretical here, that's why I'm asking for some pointers. 
Any help is greatly appreciated.

Best Regards,
   Elisiano Petrini

zhijun wu

unread,
Dec 1, 2011, 5:30:51 AM12/1/11
to py...@googlegroups.com
I can not find any project to study until now. PyKE is great, I think
it's the best way to study PyKE is starting using it.

Maybe I chose some wrong words in my post that you mention before, for
example the word "ugly". I agree with you, it will be very helpful if
there is some documentations such as "Tutorial", "*** for beginners"
and so on.

But as we all know, saying is much easier that doing.

I'm trying to build a real project with PyKE. If I can make it, I
really want to write some docs for beginners. Maybe I will have the
sufficient knowledge to do that at that time. But my native language
is not English, that's a big problem.

2011/11/25 Elisiano Petrini <elis...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "PyKE" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pyke/-/0m5UIacsDGgJ.
> To post to this group, send email to py...@googlegroups.com.
> To unsubscribe from this group, send email to
> pyke+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pyke?hl=en.

Bruce Frederiksen

unread,
Dec 1, 2011, 9:57:00 AM12/1/11
to py...@googlegroups.com
Zhijun,

Thank you for your offer of help!  I wouldn't worry about your English skills.  The hard part is figuring out what needs to be said, how it should be organized and what examples to use.  If you can do this, there are many people who can help with the English.  You might just write it the best you can (I would suggest not spending too long on the English to keep the flow going smoothly) and then somebody else can clean up the language; or you could prepare an outline with a bullet list of things that need to be said and prepare examples.  Then somebody else could write the English.

I wrote the PyKE documentation before Sphinx was available.  I am open to either moving to sphinx or to some other documentation tool.  I am also willing to make you a committer to the project so that you can commit directly.  Just let me know how I can help.

I am wondering if you've looked at the examples provided in the examples source code directory?

Also, PyKE uses a very different computational model than standard procedural programming languages.  So the learning curve is much greater than, say, moving from Java to Python.  But it is based on prolog (though with different syntax).  So maybe some prolog tutorials would be useful?

The Structured Program Theorem states that all programs can be decomposed into 3 control structure: sequence (do A, then do B), selection (do A or do B based on some condition), and repetition (do A many times).  Perhaps simple examples of how to do each of these in PyKE would be useful?  And then maybe showing how abstraction works (the counterpart to procedural programming's concept of a user-defined function)?

Anyway, welcome aboard!

-Bruce

Dante_Zaupa

unread,
Dec 1, 2011, 11:40:15 AM12/1/11
to py...@googlegroups.com
Hey Zhijun

Here's my 2 cents: try searching for "import pyke" in Google, GitHub
and similar repositories. That ought to find open source projects
using Pyke.

Best regards,
Dante

--
Dante

http://dzaupa.notapipe.org/

"IMPUNIDADE, subst.: Riqueza."
                -- Ambrose Bierce, "The Devil's Dictionary"

Usuário Linux #459228 -- Linux Mint 11 ("Katya")

Bruce Frederiksen

unread,
Dec 1, 2011, 12:05:51 PM12/1/11
to py...@googlegroups.com
Zhijun,

Sounds like an excellent way to get more examples!  I'd be eager to know what you find when you do this!  Maybe you could report interesting examples back here so that others can also benefit from them?

Thanks Dante!

-Bruce

zhijun wu

unread,
Dec 3, 2011, 8:27:09 PM12/3/11
to py...@googlegroups.com
Dante,
Thank you, it's really a good way to get more examples. I will share
anything interesting I find.


Bruce,
Thank you for your advise. You are right, the learning curve is much
greater than some other languages, and the user should be familiar
with expert system theory.
Yes, I read the examples provided in the code tree, but not all of
them, and I'm exploring the other parts of the code tree.

I always benifit from open source projects, so I would like to return
something. Being a committer is an honor, but it requires more
responsibility. I don't think I have the sufficient skills to become a
committer right now (I knew PyKE just less 2 months ago), I don't want
to mess up everything. I said I want to write some docs after my
project, I meant it. After all these, after proving I can do something
useful I will require a committer. If anyone starts the work before me
I'm also grad to offer help.


2011/12/2 Bruce Frederiksen <dang...@gmail.com>:

Gau_Veldt

unread,
Jun 24, 2013, 4:19:37 AM6/24/13
to py...@googlegroups.com
I just managed to get the PyKE code working from within Blender 2.65 (blender uses python 3.3.0).

I'm experimenting now to find the best way to enumerate blender's object tree into suitable fact bases.
So I may wind up making a rule base that forms a plan to "convert blender objects into KFB's" for the KRBs further down the "game compiler"

A constant complaint about Blender's game engine is the overhead in game logic.
PyKE's very design is to eliminate these kinds of problems by making plans dedicated to the use case.
In this case the use case would be defined as the arrangement of blender objects and logic brick connections which then gets compiled by various rule bases to form a plan that is executed by the game's python script, running the game without any overhead due to generalized non-specific game logic handling (blender's current way of doing it).

I'm familiar with the concepts behind inference programming (my numerous early readings into muds and adventure games all went into detail about explaining how predicate calculus forms the backbone of such games and the frame concept utilized in such games are basically abstracted fact bases) but I'm somewhat inexperienced with the application since I've not been part of any such projects in a way that would have obtained me live hands-on experience.

John Woods

unread,
Jun 24, 2013, 10:43:05 AM6/24/13
to py...@googlegroups.com
To unsubscribe from this group and stop receiving emails from it, send an email to pyke+uns...@googlegroups.com.

To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyke.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
In the past one and half years we implemented an project for financial consulting which based on PyKE and Django, and it works very well, fast and stable. At first I doubt if PyKE can run fast enough but the performance of the project dispels my concerns.

Gau_Veldt

unread,
Jun 24, 2013, 6:03:53 PM6/24/13
to py...@googlegroups.com
Well Python itself has performance options (such as Cython and/or PyPy) and PyKE itself will build dedicated plans that don't have generalization overhead.  If you recall the authors' experience with handling HTML templates and SQL generation using PYKE he found a significant performance boost over a general purpose HTML templating library (TurboGears 2).  TurboGears 2 got 75.83 trans/sec where the dedicated template built with PyKE got 791.01 trans/sec.  That's about a 10x performance boost!

If I can get a 10x (or even 2x or 3x) boost over the generalized game logic engine in Blender it would be a considerable boost.
For even more performance it may be possible to use PyKE from PyPy (a Python-to-native JIT).


On Monday, June 24, 2013 7:43:05 AM UTC-7, pinot wrote:
于 2013年06月24日 16:19, Gau_Veldt 写道:
I just managed to get the PyKE code working from within Blender 2.65 (blender uses python 3.3.0).
 
[...]
 
I'm experimenting now to find the best way to enumerate blender's object tree into suitable fact bases.
So I may wind up making a rule base that forms a plan to "convert blender objects into KFB's" for the KRBs further down the "game compiler"
 
In the past one and half years we implemented an project for financial consulting which based on PyKE and Django, and it works very well, fast and stable. At first I doubt if PyKE can run fast enough but the performance of the project dispels my concerns.

Dennis Desmarais

unread,
Aug 16, 2013, 1:53:59 PM8/16/13
to py...@googlegroups.com
Dear Bruce;

I am a neophyte to Pyke, certainly, but I would like to help with writing or organizing documentation, if there is a need.

For example, the URL pointing the origin of the Knapsack Problem is out of date. (These things happen...)

Also - if I could come to grasp it - I think beginners like me would benefit from more information about the workings of the inference engine. I think if I knew more about how the inference engine "traversed" or picked its route the "solution space" - if I can presume to describe the situation that way - it would be clearer how the inference engine handles the variables I pass to it.

I have looked at the source code for the examples.

Is there a way to slow down the inference process in Pyke to step through an example?

Thanks in advance, Dennis
Reply all
Reply to author
Forward
0 new messages