Rules Engine in C or Python [closed]

2024/10/18 15:19:34

I am looking for a rules engine in C or Python, but if you know a rules engine that is implemented in another language I would be glad to know about it.

The engine will be used as way to automate a house, like turning the light off when somebody leaves a room etc. So no "office" rules there (aka do you rules in Excel or such).

I have looked into Jess and Drools which are in Java and do a perfect job. I would like to know of others and possibly using less memory than Java does. I have heard of RuleCore in Python but couldn't really find any documentation on it (version 1.0 is available at SourceForge but it looks like they are selling v. 2.0).

EDIT: By rules engine (inference engine), I mean an implementation of RETE or equivalent.

Answer

In your search for RETE based rules engine in Python either Pyke or PyCLIPS could be the one you would want to use.

PS: I had left a comment to S.Lott's answer about Pyke. I have posted a separate answer as per his suggestion and also to let other readers readily know that the rules engine mentioned in this answer could be a probable choice if they are searching for one.

https://en.xdnf.cn/q/73144.html

Related Q&A

Draw arrows between 3 points

I am trying to draw arrows between three points in matplotlib.Lets assume we have 3 arbitrary points (A1,A2,A3) in 2d and we want to draw arrows from A1 to A2 and from A2 to A3.Some code to make it cle…

Make an animated wave with drawPolyline in PySide/PyQt

Im trying to animate a polyline (it have to act like a wave). Ive tried this way:from PySide.QtCore import * from PySide.QtGui import * import sys, timeclass Test(QMainWindow):def __init__(self, parent…

dateutil.tz package apparently missing when using Pandas?

My python 2.7 code is as follows:import pandas as pd from pandas import DataFrameDF_rando = DataFrame([1,2,3])...and then when I execute, I get a strange error regarding dateutil.tz./Library/Frameworks…

Importing SPSS dataset into Python

Is there any way to import SPSS dataset into Python, preferably NumPy recarray format? I have looked around but could not find any answer.Joon

Given a set of points defined in (X, Y, Z) coordinates, interpolate Z-value at arbitrary (X, Y)

Given a set of points in (X, Y, Z) coordinates that are points on a surface, I would like to be able to interpolate Z-values at arbitrary (X, Y) coordinates. Ive found some success using mlab.griddata …

Python multiprocessing speed

I wrote this bit of code to test out Pythons multiprocessing on my computer:from multiprocessing import Poolvar = range(5000000) def test_func(i):return i+1if __name__ == __main__:p = Pool()var = p.map…

Using os.forkpty() to create a pseudo-terminal to ssh to a remote server and communicate with it

Im trying to write a python script that can ssh into remote server and can execute simple commands like ls,cd from the python client. However, Im not able to read the output from the pseudo-terminal af…

Calculating the sum of a series?

This is my assignment and for the life of me i cant seem to think of a way to do it. This is the code I have so far:sum = 0 k = 1 while k <= 0.0001:if k % 2 == 1:sum = sum + 1.0/kelse:sum = sum - 1.…

get all the partitions of the set python with itertools

How to get all partitions of a set? For example, I have array [1, 2, 3]. I need to get [[1], [2], [3]], [[1], [2, 3]], [[2], [1,3]], [[3], [1, 2]], [[1, 2, 3]]. Now, I wrote this code:def neclusters(S…

Installing Python binary modules to a custom location in Windows

Suppose that I want to install a binary module for Python on Windows. Suppose that the module is distributed as a pre-built installer xxx-n.n.n.win32-py2.7.exe, prepared using distutils.My problem is t…