expert-ceylon


Nameexpert-ceylon JSON
Version 2.0.0a2 PyPI version JSON
download
home_pagehttps://github.com/ceylonai/experta-cylon
SummaryExpert Systems for Python Maintained by Ceylon AI
upload_time2024-07-03 18:44:38
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseLGPLv3
keywords knowledge-based inference engine
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =========
|Experta|  
=========

|pypi| |version| |tests| |docs| |coverage|

Experta is a Python library for building expert systems strongly inspired
by CLIPS_.

.. code-block:: python

   from random import choice
   from experta import *


   class Light(Fact):
       """Info about the traffic light."""
       pass


   class RobotCrossStreet(KnowledgeEngine):
       @Rule(Light(color='green'))
       def green_light(self):
           print("Walk")

       @Rule(Light(color='red'))
       def red_light(self):
           print("Don't walk")

       @Rule(AS.light << Light(color=L('yellow') | L('blinking-yellow')))
       def cautious(self, light):
           print("Be cautious because light is", light["color"])


.. code-block:: python

   >>> engine = RobotCrossStreet()
   >>> engine.reset()
   >>> engine.declare(Light(color=choice(['green', 'yellow', 'blinking-yellow', 'red'])))
   >>> engine.run()
   Be cautious because light is blinking-yellow


Migrating from Pyknow
---------------------

Experta is a Pyknow fork. Just replace any `pyknow` references in your
code/examples to `experta` and everything should work the same.


Examples
--------

You can find some more examples on GitHub_.

.. _CLIPS: http://clipsrules.sourceforge.net
.. _GitHub: https://github.com/nilp0inter/experta/tree/develop/docs
.. |Experta| image:: https://raw.githubusercontent.com/nilp0inter/experta/develop/docs/static/expertalogo_small.png
.. |pypi| image:: https://img.shields.io/pypi/v/experta.svg
    :target: https://pypi.python.org/pypi/experta

.. |version| image:: https://img.shields.io/pypi/pyversions/experta.svg
    :target: https://pypi.python.org/pypi/experta

.. |tests| image:: https://travis-ci.org/nilp0inter/experta.svg?branch=master
    :target: https://travis-ci.org/nilp0inter/experta

.. |docs| image:: https://readthedocs.org/projects/experta/badge/?version=stable
    :target: https://experta.readthedocs.io/en/stable/
    :alt: Documentation Status

.. |coverage| image:: https://codecov.io/gh/nilp0inter/experta/branch/develop/graph/badge.svg
    :target: https://codecov.io/gh/nilp0inter/experta
    :alt: codecov.io


TODO
----


CHANGELOG
---------

1.9.4
~~~~~

* Resolved #10. Corner case in DepthStrategy in which the first
  activation of the agenda didn't get removed.


1.9.3
~~~~~

* Resolved #11 that was introduced with #7, that caused the same
  behavior under different conditions.


1.9.2
~~~~~

* Resolved #7. In some situations last activation was removed right
  after entering the agenda.


1.9.1
~~~~~

* Resolved #3. Rules should not be called with already retracted facts.


1.9.0
~~~~~

* Drop Python 3.4 support.
* Use setup.cfg to save all package metadata.


1.8.0-1.8.2
~~~~~~~~~~~

* Rebranded to Experta.


1.7.0
~~~~~

* Implemented the template system.
* Replaced warnings by watchers messages.
* Fixed freeze() with frozen objects.
* Fixed unfreeze() with unfrozen objects.
* Parametrized DefFacts via reset() kwargs.


1.6.0
~~~~~

* Improved overall performance.


1.5.0
~~~~~

* Added Python version 3.7 to tox.ini.
* Monkey and bananas example.
* Fixed bug, numeric index args gets repeated in a weird way introduced in `1.4.0`.
* Pass only the defined args in absence of kwargs.


1.4.0
~~~~~

* Order integer facts keys after making a copy.
* as_dict method for Fact.
* freeze and unfreeze method documentation.
* unfreeze method in pyknow.utils.
* Zebra example from Clips.


1.3.0
~~~~~

* `pyknow.operator` module.
* Nested matching.
* Added Talk 'Sistemas Expertos en Python con PyKnow - PyConES 2017' to docs
  folder.


1.2.0
~~~~~

* Freeze fact values as the default behavior to address Issue #9.
* Added `pyknow.utils.anyof` to mitigate Issue #7.
* Raise RuntimeError if a fact value is modified after declare().
* Added MATCH and AS objects.


1.1.1
~~~~~

* Removing the borg optimization for P field constraints.
* Use the hash of the check in the sorting of the nodes to always
  generate the same alpha part of the network.


1.1.0
~~~~~

* Allow any kind of callable in Predicate Field Constraints (P()).


1.0.1
~~~~~

* DNF of OR clause inside AND or Rule was implemented wrong.


1.0.0
~~~~~

* RETE matching algorithm.
* Better Rule decorator system.
* Facts are dictionaries.
* Documentation.


<1.0.0
~~~~~~

* Unestable API.
* Wrong matching algorithm.
* Bad performance
* PLEASE DON'T USE THIS.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ceylonai/experta-cylon",
    "name": "expert-ceylon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "knowledge-based, inference, engine",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/99/23/4bd0546511a63fc124f3f89921a765fbaaffa945c51772b719b3df3a56f0/expert_ceylon-2.0.0a2.tar.gz",
    "platform": null,
    "description": "=========\n|Experta|  \n=========\n\n|pypi| |version| |tests| |docs| |coverage|\n\nExperta is a Python library for building expert systems strongly inspired\nby CLIPS_.\n\n.. code-block:: python\n\n   from random import choice\n   from experta import *\n\n\n   class Light(Fact):\n       \"\"\"Info about the traffic light.\"\"\"\n       pass\n\n\n   class RobotCrossStreet(KnowledgeEngine):\n       @Rule(Light(color='green'))\n       def green_light(self):\n           print(\"Walk\")\n\n       @Rule(Light(color='red'))\n       def red_light(self):\n           print(\"Don't walk\")\n\n       @Rule(AS.light << Light(color=L('yellow') | L('blinking-yellow')))\n       def cautious(self, light):\n           print(\"Be cautious because light is\", light[\"color\"])\n\n\n.. code-block:: python\n\n   >>> engine = RobotCrossStreet()\n   >>> engine.reset()\n   >>> engine.declare(Light(color=choice(['green', 'yellow', 'blinking-yellow', 'red'])))\n   >>> engine.run()\n   Be cautious because light is blinking-yellow\n\n\nMigrating from Pyknow\n---------------------\n\nExperta is a Pyknow fork. Just replace any `pyknow` references in your\ncode/examples to `experta` and everything should work the same.\n\n\nExamples\n--------\n\nYou can find some more examples on GitHub_.\n\n.. _CLIPS: http://clipsrules.sourceforge.net\n.. _GitHub: https://github.com/nilp0inter/experta/tree/develop/docs\n.. |Experta| image:: https://raw.githubusercontent.com/nilp0inter/experta/develop/docs/static/expertalogo_small.png\n.. |pypi| image:: https://img.shields.io/pypi/v/experta.svg\n    :target: https://pypi.python.org/pypi/experta\n\n.. |version| image:: https://img.shields.io/pypi/pyversions/experta.svg\n    :target: https://pypi.python.org/pypi/experta\n\n.. |tests| image:: https://travis-ci.org/nilp0inter/experta.svg?branch=master\n    :target: https://travis-ci.org/nilp0inter/experta\n\n.. |docs| image:: https://readthedocs.org/projects/experta/badge/?version=stable\n    :target: https://experta.readthedocs.io/en/stable/\n    :alt: Documentation Status\n\n.. |coverage| image:: https://codecov.io/gh/nilp0inter/experta/branch/develop/graph/badge.svg\n    :target: https://codecov.io/gh/nilp0inter/experta\n    :alt: codecov.io\n\n\nTODO\n----\n\n\nCHANGELOG\n---------\n\n1.9.4\n~~~~~\n\n* Resolved #10. Corner case in DepthStrategy in which the first\n  activation of the agenda didn't get removed.\n\n\n1.9.3\n~~~~~\n\n* Resolved #11 that was introduced with #7, that caused the same\n  behavior under different conditions.\n\n\n1.9.2\n~~~~~\n\n* Resolved #7. In some situations last activation was removed right\n  after entering the agenda.\n\n\n1.9.1\n~~~~~\n\n* Resolved #3. Rules should not be called with already retracted facts.\n\n\n1.9.0\n~~~~~\n\n* Drop Python 3.4 support.\n* Use setup.cfg to save all package metadata.\n\n\n1.8.0-1.8.2\n~~~~~~~~~~~\n\n* Rebranded to Experta.\n\n\n1.7.0\n~~~~~\n\n* Implemented the template system.\n* Replaced warnings by watchers messages.\n* Fixed freeze() with frozen objects.\n* Fixed unfreeze() with unfrozen objects.\n* Parametrized DefFacts via reset() kwargs.\n\n\n1.6.0\n~~~~~\n\n* Improved overall performance.\n\n\n1.5.0\n~~~~~\n\n* Added Python version 3.7 to tox.ini.\n* Monkey and bananas example.\n* Fixed bug, numeric index args gets repeated in a weird way introduced in `1.4.0`.\n* Pass only the defined args in absence of kwargs.\n\n\n1.4.0\n~~~~~\n\n* Order integer facts keys after making a copy.\n* as_dict method for Fact.\n* freeze and unfreeze method documentation.\n* unfreeze method in pyknow.utils.\n* Zebra example from Clips.\n\n\n1.3.0\n~~~~~\n\n* `pyknow.operator` module.\n* Nested matching.\n* Added Talk 'Sistemas Expertos en Python con PyKnow - PyConES 2017' to docs\n  folder.\n\n\n1.2.0\n~~~~~\n\n* Freeze fact values as the default behavior to address Issue #9.\n* Added `pyknow.utils.anyof` to mitigate Issue #7.\n* Raise RuntimeError if a fact value is modified after declare().\n* Added MATCH and AS objects.\n\n\n1.1.1\n~~~~~\n\n* Removing the borg optimization for P field constraints.\n* Use the hash of the check in the sorting of the nodes to always\n  generate the same alpha part of the network.\n\n\n1.1.0\n~~~~~\n\n* Allow any kind of callable in Predicate Field Constraints (P()).\n\n\n1.0.1\n~~~~~\n\n* DNF of OR clause inside AND or Rule was implemented wrong.\n\n\n1.0.0\n~~~~~\n\n* RETE matching algorithm.\n* Better Rule decorator system.\n* Facts are dictionaries.\n* Documentation.\n\n\n<1.0.0\n~~~~~~\n\n* Unestable API.\n* Wrong matching algorithm.\n* Bad performance\n* PLEASE DON'T USE THIS.\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "Expert Systems for Python Maintained by Ceylon AI",
    "version": "2.0.0a2",
    "project_urls": {
        "Homepage": "https://github.com/ceylonai/experta-cylon"
    },
    "split_keywords": [
        "knowledge-based",
        " inference",
        " engine"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bfd976e0f795ac3d4618ee88726bb9989b022b5ab991d2cc6149a3fb435068c3",
                "md5": "8856d8453d71f524f288f3a9a6ee07e7",
                "sha256": "f3794efb293895ead1faf9097fd095493cc4365f91ae64e2b33c18a4f9917d43"
            },
            "downloads": -1,
            "filename": "expert_ceylon-2.0.0a2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8856d8453d71f524f288f3a9a6ee07e7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 36326,
            "upload_time": "2024-07-03T18:44:36",
            "upload_time_iso_8601": "2024-07-03T18:44:36.419465Z",
            "url": "https://files.pythonhosted.org/packages/bf/d9/76e0f795ac3d4618ee88726bb9989b022b5ab991d2cc6149a3fb435068c3/expert_ceylon-2.0.0a2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99234bd0546511a63fc124f3f89921a765fbaaffa945c51772b719b3df3a56f0",
                "md5": "0b84d6e2a3ea80113221334c51cb2132",
                "sha256": "040956a8ec17e6406df67311a35f6a8a296a2e709fe8c208de3a645532895b9a"
            },
            "downloads": -1,
            "filename": "expert_ceylon-2.0.0a2.tar.gz",
            "has_sig": false,
            "md5_digest": "0b84d6e2a3ea80113221334c51cb2132",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29492,
            "upload_time": "2024-07-03T18:44:38",
            "upload_time_iso_8601": "2024-07-03T18:44:38.268100Z",
            "url": "https://files.pythonhosted.org/packages/99/23/4bd0546511a63fc124f3f89921a765fbaaffa945c51772b719b3df3a56f0/expert_ceylon-2.0.0a2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-03 18:44:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ceylonai",
    "github_project": "experta-cylon",
    "github_not_found": true,
    "lcname": "expert-ceylon"
}
        
Elapsed time: 0.85207s