{ "info": { "author": "Paul Vicol", "author_email": "pvicol@sfu.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], "description": "Equibel\n=======\n\n``Equibel`` is a Python package for working with consistency-based belief change in a\ngraph-oriented setting.\n\nCurrently Supported Platforms\n-----------------------------\n\n- Mac OS X (tested on OS X 10.10.5) with Python 2.7.x\n- 64-bit Linux (tested on Ubuntu 14.04) with Python 2.7.x\n\nNote that while Equibel is distributed as a Python package, the core of the system is\nimplemented using Answer Set Programming (ASP), and relies on an underlying ASP solver\ncalled ``clingo``, which is part of the \n`Potsdam Answer Set Solving Collection (Potassco) `__.\n\nIn particular, Equibel has two ASP-related dependencies: the \n`Python gringo module `__, which\nprovides an interface to an ASP solver from within Python, and ``asprin.parser``,\nwhich is a component of the ``asprin`` preference-handling framework. ``asprin`` is described\nin more detail `here `__, and can be downloaded\nfrom `here `__.\n\nThe *Python* component of Equibel is highly portable across platforms; however, the ``gringo``\nand ``asprin.parser`` dependencies must be compiled for specific system configurations, \nproducing system-specific binaries. In order to simplify usage for some *common* system \nconfigurations, Equibel includes pre-compiled binaries of these dependencies for \n64-bit Ubuntu Linux and Mac OS.\n\n*If Equibel does not function correctly once it is installed, this is likely due to the fact that the pre-compiled binaries are not compatible with your system.*\nIn this case, you must compile the dependencies manually, by downloading the required \ncomponents directly from `Potassco `__.\nIn order to use your custom binaries with Equibel, it is recommended that you follow the \ninstallation instructions given on the \n`Github project page `__, which involve downloading \nthe source code of Equibel to provide access to directories in which you can overwrite the \nincluded binaries with your own.\n\n\nInstallation\n------------\n\nThe following steps assume that you have the ``pip`` Python package manager\ninstalled. If you don't have ``pip``, you can get it \n`here `__.\n\n#. The pre-compiled ``gringo`` modules included with Equibel for\n either 64-bit Linux or Mac OS require a dependency called \n Threading Building Blocks (``tbb``).\n\n - The easiest way to install the ``tbb`` library on **Mac OS** is to\n use `Homebrew `__:\n\n ::\n\n $ brew install tbb\n\n - On **Ubuntu Linux**, the ``tbb`` library can be installed using\n the ``apt`` package manager:\n\n ::\n\n $ sudo apt-get install libtbb-dev\n\n#. Install Equibel using ``pip``:\n\n ::\n\n $ pip install equibel\n\n\n If you are installing Equibel system-wide, you may need to use ``sudo``:\n\n ::\n\n $ sudo pip install equibel\n\n\nQuickstart\n----------\n\nTo use Equibel within a Python program, you need to import the ``equibel``\npackage. The statement ``import equibel as eb`` imports this package,\nand gives it a shorter alias ``eb``. The following Python script\ncreates a path graph, assigns formulas to nodes, finds the global\ncompletion, and prints the resulting formulas at each node:\n\n.. code:: python\n\n import equibel as eb\n\n if __name__ == '__main__':\n # Create an EquibelGraph object, which represents a graph and \n # associated scenario.\n G = eb.EquibelGraph()\n\n # Create nodes:\n G.add_nodes_from([1, 2, 3, 4])\n\n # Create edges:\n G.add_edges_from([(1,2), (2,3), (3,4)])\n\n # Add formulas to nodes:\n G.add_formula(1, \"p & q & r\")\n G.add_formula(4, \"~p & ~q\")\n\n # Find the global completion of the G-scenario:\n R = eb.global_completion(G, simplify=True)\n\n # Pretty-print the resulting formulas at each node:\n eb.print_formulas(R)\n\nIf the above code is saved in a file called ``completion.py``, then it can be run by typing\n``python completion.py`` at the command line, as follows:\n\n::\n\n $ python completion.py \n Node 1:\n p \u2227 q \u2227 r\n Node 2:\n r\n Node 3:\n r\n Node 4:\n r \u2227 \u00acp \u2227 \u00acq\n\n\nIf you get an error running this example, it is most likely due to the *dependencies* of \nEquibel not being compatible with your platform. As noted above, Equibel includes \npre-compiled binaries of the Python ``gringo`` module, as well as of ``asprin.parser``, \nfor 64-bit Linux distributions (tested on Ubuntu 14.04) and for Mac OS (tested on OSX 10.10.5). \nIf you are not using one of these systems, you will need to manually compile the ``gringo`` \nand ``asprin.parser`` dependencies (see `the Github page `__).\n\n\nImplemented Approaches\n----------------------\n\nEquibel allows for experimentation with several different approaches to\nconsistency-based belief change in a graph-oriented setting, namely:\n\n#. Global completion\n#. Simple iteration\n#. Expanding iteration\n#. Augmenting iteration\n#. Ring iteration\n\nThe global completion operation is performed on an ``EquibelGraph`` ``G`` by\n``eb.global_completion(G)``; this performs a \"one-shot\" procedure to update\nthe information at every node in the graph, and thus is not an iterative approach. All\nof the other approaches---\\ *simple*, *expanding*, *augmenting*, and *ring*---can be performed\niteratively, and each one iterates to a *fixpoint*. The table below summarizes the Equibel\nfunctions used to perform single iterations of each approach, as well as to find the fixpoints\nreached by each approach:\n\n\n+----------------------+------------------------------+---------------------------------------+\n| Method | Single Iteration | Iterate to Fixpoint |\n+======================+==============================+=======================================+\n| Simple Iteration | ``eb.iterate_simple(G)`` | ``eb.iterate_simple_fixpoint(G)`` |\n+----------------------+------------------------------+---------------------------------------+\n| Expanding Iteration | ``eb.iterate_expanding(G)`` | ``eb.iterate_expanding_fixpoint(G)`` |\n+----------------------+------------------------------+---------------------------------------+\n| Augmenting Iteration | ``eb.iterate_augmenting(G)`` | ``eb.iterate_augmenting_fixpoint(G)`` |\n+----------------------+------------------------------+---------------------------------------+\n| Ring Iteration | ``eb.iterate_ring(G)`` | ``eb.iterate_ring_fixpoint(G)`` |\n+----------------------+------------------------------+---------------------------------------+\n\n\nEach of the approaches has two separate implementations, corresponding to its equivalent *semantic* \nand *syntactic* characterizations. In addition, there are two ways of performing the core optimization\nprocedure over equivalences, involving either *inclusion-based* or *cardinality-based* maximization.\n\nEach function listed above can take three optional arguments:\n\n#. ``method``, which is a string that is either \"semantic\" or \"syntactic\",\n representing the method to use when performing the approach; e.g.\n based on either the syntactic or semantic characterizations\n\n - The default ``method`` is *semantic*\n - To avoid typos when entering strings, Equibel has constants ``eb.SEMANTIC`` \n and ``eb.SYNTACTIC`` which equal the strings \"semantic\" and \"syntactic\", respectively.\n\n#. ``opt_type``, which is a string that is either \"inclusion\" or \"cardinality\", \n representing the type of maximization to be performed over equivalences\n\n - The default ``opt_type`` is *inclusion*\n - To avoid typos when entering strings, Equibel has constants ``eb.INCLUSION``\n and ``eb.CARDINALITY`` which equal the strings \"inclusion\" and \"cardinality\", respectively.\n\n#. ``simplify``, which is a Boolean flag specifying whether to simplify the\n final formulas at each node.\n\n - The default value for ``simplify`` is ``False``\n\nBy definition, the semantic and syntactic characterizations of an approach yield\n*equivalent results*; however, depending on the input scenario and type of approach, the\nperformance of the characterizations may differ significantly. A good example of this is\nin the case of expanding iteration, where we have an *early-stoppping condition* over the\nradius of the expanding neighbourhood when using the semantic characterization, but not when\nusing the syntactic characterization (causing the semantic characterization to be significantly\nfaster for large graphs in practice).\n\nSome Examples\n~~~~~~~~~~~~~\n\nTo show how the ``method`` and ``opt_type`` arguments can be combined, we consider the following\n(by no means exhaustive) examples.\n\nIn the following example, we can see the difference between using inclusion-based optimization and\ncardinality-based optimization in the global completion:\n\n.. code:: python\n\n import equibel as eb\n\n if __name__ == '__main__':\n\n # Creates a star graph with nodes [0, 1, 2, 3] and undirected edges [(0,1), (0,2), (0,3)]\n G = eb.star_graph(3)\n G.add_formula(1, 'p')\n G.add_formula(2, 'p')\n G.add_formula(3, '~p')\n\n # Using inclusion-based maximization over equivalences\n R_inclusion = eb.global_completion(G, method=eb.SEMANTIC, opt_type=eb.INCLUSION, simplify=False)\n eb.print_formulas(R_inclusion)\n \n # Using cardinality-based maximization over equivalences\n R_cardinality = eb.global_completion(G, method=eb.SEMANTIC, opt_type=eb.CARDINALITY, simplify=False)\n eb.print_formulas(R_cardinality)\n\nSaving this code in a file ``inclusion_vs_cardinality.py`` and running it yields:\n\n::\n\n $ python inclusion_vs_cardinality.py \n Node 0:\n p \u2228 \u00acp\n Node 1:\n p\n Node 2:\n p\n Node 3:\n \u00acp\n\n\n Node 0:\n p\n Node 1:\n p\n Node 2:\n p\n Node 3:\n \u00acp\n\nThe following example function calls for the global completion operation show the flexible way in\nwhich options can be combined in Equibel:\n\n- ``R_semantic = eb.global_completion(G)``\n\n - This function call computes the global completion of ``G``.\n With no options explicitly specified, the defaults are used; thus,\n this call involves the *semantic characterization* with\n *inclusion-based* optimization, and does not simplify the resultant formulas.\n - With all options explicitly specified, the above function call is\n equivalent to\n ``R_semantic = eb.global_completion(G, method=eb.SEMANTIC, opt_type=eb.INCLUSION, simplify=False)``\n\n- ``R_syntactic = eb.global_completion(G, method=eb.SYNTACTIC)``\n\n - This finds the global completion of ``G``, using the *syntactic\n characterization*, the default *inclusion-based* optimization, and no simplification\n of formulas.\n\n- ``R_syntactic = eb.global_completion(G, method=eb.SYNTACTIC, opt_type=CARDINALITY)``\n\n - This finds the global completion of ``G``, using the *syntactic\n characterization*, *cardinality-based* optimization, and no simplification of\n formulas.\n\n- ``R_syntactic = eb.global_completion(G, method=eb.SYNTACTIC, opt_type=CARDINALITY, simplify=True)``\n\n - This finds the global completion of ``G``, using the *syntactic\n characterization* and *cardinality-based* optimization. \n With the ``simplify=True`` option, the resulting scenario\n will have simplified formulas for each node in the graph.\n\nThese options can be similarly combined for each of the iterative approaches, as shown in the\nfollowing example calls:\n\n- ``R_semantic = eb.iterate_simple(G, method=eb.SEMANTIC, simplify=True)``\n\n - This function call computes the graph and scenario that result\n from performing a single *simple iteration* over ``G``, using the *semantic\n characterization* with default *inclusion-based* optimization. With the \n ``simplify=True`` option, the resulting scenario will have simplified formulas \n for each node in the graph.\n\n- ``R_syntactic = eb.iterate_simple(G, method=eb.SYNTACTIC, simplify=True)``\n\n - This call is similar to the previous call, except that it uses the\n *syntactic characterization* of simple iteration, rather than the semantic \n characterization.\n\n- ``R_semantic_fixpoint = eb.iterate_simple_fixpoint(G, method=eb.SEMANTIC, opt_type=eb.CARDINALITY, simplify=True)``\n\n - This computes the fixpoint reached by a sequence of *simple\n iterations* starting from the graph and scenario represented by ``G``, \n using the *semantic characterization* and *cardinality-based* optimization.\n\n- ``R_semantic = eb.iterate_expanding(G, simplify=True)``\n\n - This function call computes the graph and scenario that result\n from performing a single *expanding iteration* over ``G``, using the default *semantic\n characterization* with default *inclusion-based* optimization. Since ``simplify=True``, \n the resulting scenario will have simplified formulas for each node in the graph.\n\n- ``R_semantic = eb.iterate_augmenting_fixpoint(G, simplify=True)``\n\n - This computes the fixpoint reached by a sequence of *augmenting\n iterations* starting from the graph and scenario represented by ``G``, using the default\n *semantic characterization* and *inclusion-based* optimization. Since ``simplify=True``, the\n resulting scenario will have simplified formulas for each node in the graph.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/asteroidhouse/equibel", "keywords": "AI,belief change,belief revision,belief merging,multi-agent network", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "equibel", "package_url": "https://pypi.org/project/equibel/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/equibel/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/asteroidhouse/equibel" }, "release_url": "https://pypi.org/project/equibel/0.9.5/", "requires_dist": null, "requires_python": null, "summary": "A toolkit for equivalence-based belief change", "version": "0.9.5" }, "last_serial": 2141827, "releases": { "0.8.6a1": [ { "comment_text": "", "digests": { "md5": "5ec04c883e81fbf257d73bbcc5666848", "sha256": "94e50c5a5112fb0991eda697504aafbb8d272511a393e31d12aee16c2e2b6787" }, "downloads": -1, "filename": "equibel-0.8.6a1.tar.gz", "has_sig": false, "md5_digest": "5ec04c883e81fbf257d73bbcc5666848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3946803, "upload_time": "2015-06-25T23:29:41", "url": "https://files.pythonhosted.org/packages/63/3b/ea9c7c2a3034abda3c3acf4bbb48624d79bc56364e251e89b457493cdab5/equibel-0.8.6a1.tar.gz" } ], "0.8.7a1": [ { "comment_text": "", "digests": { "md5": "59279bab3fef4688403e2b293c8e10d7", "sha256": "d987a53601e3d667139aea074b4d1298d3b05298065800bd6645f6c8c5e55616" }, "downloads": -1, "filename": "equibel-0.8.7a1.tar.gz", "has_sig": false, "md5_digest": "59279bab3fef4688403e2b293c8e10d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3946919, "upload_time": "2015-06-26T00:38:02", "url": "https://files.pythonhosted.org/packages/c5/8d/790cd1e2346ae18334541afd2af8fb43d451672c63f8dc4839efc926336c/equibel-0.8.7a1.tar.gz" } ], "0.8.8a1": [ { "comment_text": "", "digests": { "md5": "ef92c36f57fe0de2656b78811f1bc7ba", "sha256": "d39d1fd3fd739ef1293fd6fd906182ab14842fc01c8ef68733772004a973d79a" }, "downloads": -1, "filename": "equibel-0.8.8a1.tar.gz", "has_sig": false, "md5_digest": "ef92c36f57fe0de2656b78811f1bc7ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5283283, "upload_time": "2015-07-03T22:42:58", "url": "https://files.pythonhosted.org/packages/2e/88/8ac9e54c2bd36c875d04274375482ef44c5bf5b8610c13f718ef86e6f32e/equibel-0.8.8a1.tar.gz" } ], "0.8.9a1": [ { "comment_text": "", "digests": { "md5": "f1e5520d9b2e00bccf183c24b31dbcf7", "sha256": "a3d850bee1190369d66db12ec579065b70535bac5129632c16dd49da5ff60f34" }, "downloads": -1, "filename": "equibel-0.8.9a1.tar.gz", "has_sig": false, "md5_digest": "f1e5520d9b2e00bccf183c24b31dbcf7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5283121, "upload_time": "2015-07-17T04:37:51", "url": "https://files.pythonhosted.org/packages/c3/9a/294374aff4a7857660556dccc978bc9b4fd020b952993eef74939b5ef1f6/equibel-0.8.9a1.tar.gz" } ], "0.9.0a1": [ { "comment_text": "", "digests": { "md5": "9f89f6d65da36578e597290c93c60c57", "sha256": "abc42351731f9c6497884618797226c71ae763c94d428fd6666ef85ed765724b" }, "downloads": -1, "filename": "equibel-0.9.0a1.tar.gz", "has_sig": false, "md5_digest": "9f89f6d65da36578e597290c93c60c57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5242992, "upload_time": "2015-08-27T02:47:17", "url": "https://files.pythonhosted.org/packages/a1/4c/04b81124f26e2eb2e9bcf78d64d5f96135881f310e736b29cf7b463af067/equibel-0.9.0a1.tar.gz" } ], "0.9.1a1": [ { "comment_text": "", "digests": { "md5": "14379730d9f451bd56ed176dc92ab0cd", "sha256": "826a24490b0424c8a5c8a254fc4d3fa45961e32a4c67a64f1772f66846697af2" }, "downloads": -1, "filename": "equibel-0.9.1a1.tar.gz", "has_sig": false, "md5_digest": "14379730d9f451bd56ed176dc92ab0cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5246473, "upload_time": "2015-09-26T04:10:33", "url": "https://files.pythonhosted.org/packages/11/57/4edb2ddf4408da1928e006b3e1f7ea1bfd6d8842c8aeb874ac96bfa1c7ed/equibel-0.9.1a1.tar.gz" } ], "0.9.3": [], "0.9.3a1": [ { "comment_text": "", "digests": { "md5": "98e74211ea795ed4a8ff672da18a97c5", "sha256": "e51bd7a1663a90efd8f9218539b4b475b89733bf852f60d986a2d736d7642147" }, "downloads": -1, "filename": "equibel-0.9.3a1.tar.gz", "has_sig": false, "md5_digest": "98e74211ea795ed4a8ff672da18a97c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4691240, "upload_time": "2016-05-31T02:21:54", "url": "https://files.pythonhosted.org/packages/91/6e/23ac3df4284167f6b05cb8982b86ae62b101b49bc45d4dc12c8eba374482/equibel-0.9.3a1.tar.gz" } ], "0.9.4a1": [ { "comment_text": "", "digests": { "md5": "7b1bf3db9cb6e2c91a3901a66e42c49b", "sha256": "26823ba2120a3b0ee11182489bc6bfa1e2c96ac2d683f8d486d2611524c1797b" }, "downloads": -1, "filename": "equibel-0.9.4a1.tar.gz", "has_sig": false, "md5_digest": "7b1bf3db9cb6e2c91a3901a66e42c49b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4691188, "upload_time": "2016-05-31T02:54:54", "url": "https://files.pythonhosted.org/packages/29/6c/a7a541f7797c96a655b4b3ee2613b25874e7ec00aeb649e793220a675b45/equibel-0.9.4a1.tar.gz" } ], "0.9.5": [ { "comment_text": "", "digests": { "md5": "95236acebe3693b3b58723a58ce4c5dc", "sha256": "2b85d421472a60a162bc03cee1728477b6e39c69e615b3d9d453f3bde0e6d08f" }, "downloads": -1, "filename": "equibel-0.9.5.tar.gz", "has_sig": false, "md5_digest": "95236acebe3693b3b58723a58ce4c5dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4691173, "upload_time": "2016-05-31T03:19:25", "url": "https://files.pythonhosted.org/packages/70/b7/e3b545c5d62333b333b033ffdfb59c1386d478e781ca1b9ecb8502f9b6c6/equibel-0.9.5.tar.gz" } ], "0.9.5a1": [ { "comment_text": "", "digests": { "md5": "5c3adb01fecf9622ee802de034a154c2", "sha256": "f8068e0b9427d4a15e2ed6329484eebc3a8d6af15c9978459aae93fde75d8bfb" }, "downloads": -1, "filename": "equibel-0.9.5a1.tar.gz", "has_sig": false, "md5_digest": "5c3adb01fecf9622ee802de034a154c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4691191, "upload_time": "2016-05-31T03:04:45", "url": "https://files.pythonhosted.org/packages/99/23/72ef707fb831db10baa69a0157d6e8f3150ec6f2922b526297f47f6bf695/equibel-0.9.5a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95236acebe3693b3b58723a58ce4c5dc", "sha256": "2b85d421472a60a162bc03cee1728477b6e39c69e615b3d9d453f3bde0e6d08f" }, "downloads": -1, "filename": "equibel-0.9.5.tar.gz", "has_sig": false, "md5_digest": "95236acebe3693b3b58723a58ce4c5dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4691173, "upload_time": "2016-05-31T03:19:25", "url": "https://files.pythonhosted.org/packages/70/b7/e3b545c5d62333b333b033ffdfb59c1386d478e781ca1b9ecb8502f9b6c6/equibel-0.9.5.tar.gz" } ] }