pycona


Namepycona JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/CPMpy/PyConA
SummaryA cpmpy-based library for constraint acquisition.
upload_time2024-09-05 09:04:24
maintainerNone
docs_urlNone
authorDimos Tsouros
requires_python>=3.6
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## PyConA: Constraint Acquisition in Python

PyConA ([https://github.com/PyConA/pycona](https://github.com/PyConA/pycona)) is a python-based, open-source package for Constraint Acquisition (CA). In CA, **the goal is to assist the user in modeling**  Constraint Programming (CP) problems, by learning the constraints through user interaction.

PyConA is based on the powerful CPMpy Constraint Programming and Modeling library in python (https://github.com/CPMpy/cpmpy), which is used for modeling the constraint problems.

Currently, only interactive CA methods are implemented in PyConA; passive CA methods might be added later.

### Interactive Constraint Acquisition

In interactive CA, the system interacts with an Oracle, which can be a human user or a software system. The CA system asks queries and based on the answers of the oracle it either learns or excludes constraints.

PyConA is a generic CA library implementing a range of interactive CA methods, using the following modules:
- Interactive CA Algorithm: The top-level algorithm to be used.
- Query Generation: The query generation system to be used to generate top-level queries.
- FindScope: The FindScope system to be used for finding the scope of violated constraints.
- FindConstraint: The FindConstraint system to be used for finding the exact violated constraints in the given scopes.

A detailed presentation of CA methods can be found at: 
- [Video](https://www.youtube.com/embed/d6EZi8YO60k)
- [Slides](https://school.a4cp.org/summer2023/slides/ml4cp2023_consacq_DimosTsouros.pdf)

### Features

The repository has implemented various approaches and methods from the literature:
- Algorithms: QuAcq [[1](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)-[2](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425)], MQuAcq [[3](https://link.springer.com/chapter/10.1007/978-3-319-98334-9_25)-[4](https://link.springer.com/article/10.1007/s10601-020-09311-4)], MQuAcq-2 \[[5](https://link.springer.com/chapter/10.1007/978-3-030-30048-7_41)], GrowAcq \[[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.36)], P-QuAcq\[[7](https://www.ijcai.org/Proceedings/16/Papers/108.pdf)], G-QuAcq [[8](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7372165&tag=1)]
- Query Generation: TQ-Gen [[9](https://link.springer.com/chapter/10.1007/978-3-319-93031-2_1)], PQ-Gen [[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.36)]
- FindScope: FindScope [[1](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)], Findscope-2 [[2](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425), [4](https://link.springer.com/article/10.1007/s10601-020-09311-4)]
- FindC: FindC [[1](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)], FindC-2 [[2](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425)]
- ML-based CA system and query generation objectives from [[10](https://ojs.aaai.org/index.php/AAAI/article/download/28655/29272)]

### Installation

#### Clone and Install from this Repo

Download PyConA from the GitHub repository and install it as follows:
```commandline
git clone -b main --depth 1 https://github.com/PyConA/PyConA.git
pip install PyConA.
```

### Basics

In **PyConA**, the ProblemInstance class represents the instance of the problem the user wants to acquire the constraints for. It must be initialized with the variables of the problem and a language. 
A CA system is then used to acquire the constraints. 
**PyConA** currently implements only interactive CA algorithms (module .active_algorithms).
The core of PyConA is the CA system (CASystem class). A CASystem can be run on a given ProblemInstance. The ProblemInstance class represents the instance of the problem the user wants to acquire the constraints for. It must be initialized with the variables of the problem and a language.

### Basic Tutorials

Coming very soon
### Documentation

Coming soon

### References

[1] [Bessiere, C., at al. (2013, June). Constraint acquisition via partial queries. In _Twenty-Third International Joint Conference on Artificial Intelligence.](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)

[2] [Bessiere, C., et al. (2023). Learning constraints through partial queries. Artificial Intelligence, 319, 103896.](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425)

[3] [Tsouros, D. C., Stergiou, K., & Sarigiannidis, P. G. (2018). Efficient methods for constraint acquisition. In _Principles and Practice of Constraint Programming: 24th International Conference, CP 2018, Lille, France, August 27-31, 2018, Proceedings 24_ (pp. 373-388). Springer International Publishing.](https://link.springer.com/chapter/10.1007/978-3-319-98334-9_25)

[4] [Tsouros, D. C., & Stergiou, K. (2020). Efficient multiple constraint acquisition. _Constraints_, _25_(3), 180-225.](https://link.springer.com/article/10.1007/s10601-020-09311-4)

[5] [Tsouros, D. C., Stergiou, K., & Bessiere, C. (2019). Structure-driven multiple constraint acquisition. In _Principles and Practice of Constraint Programming: 25th International Conference, CP 2019, Stamford, CT, USA, September 30–October 4, 2019, Proceedings 25_ (pp. 709-725). Springer International Publishing.](https://link.springer.com/chapter/10.1007/978-3-030-30048-7_41)

[6] [Tsouros, D. C., Berden, S., & Guns, T. (2023). Guided Bottom-Up Interactive Constraint Acquisition}}. In _29th International Conference on Principles and Practice of Constraint Programming (CP 2023)_ (Vol. 280, p. 36).](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.36)

[7] [Daoudi, A., Mechqrane, Y., Bessiere, C., Lazaar, N., & Bouyakhf, E. H. (2016, July). Constraint Acquisition with Recommendation Queries. In _IJCAI_ (pp. 720-726).](https://www.ijcai.org/Proceedings/16/Papers/108.pdf)

[8] [Daoudi, A., Lazaar, N., Mechqrane, Y., Bessiere, C., & Bouyakhf, E. H. (2015, November). Detecting types of variables for generalization in constraint acquisition. In _2015 IEEE 27th International Conference on Tools with Artificial Intelligence (ICTAI)_ (pp. 413-420). IEEE.](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7372165&tag=1)

[9][Ait Addi, H., Bessiere, C., Ezzahir, R., & Lazaar, N. (2018). Time-bounded query generator for constraint acquisition. In _Integration of Constraint Programming, Artificial Intelligence, and Operations Research: 15th International Conference, CPAIOR 2018, Delft, The Netherlands, June 26–29, 2018, Proceedings 15_ (pp. 1-17). Springer International Publishing.](https://link.springer.com/chapter/10.1007/978-3-319-93031-2_1)

[10] [Tsouros, D., Berden, S., & Guns, T. (2024, March). Learning to learn in interactive constraint acquisition. In _Proceedings of the AAAI Conference on Artificial Intelligence_ (Vol. 38, No. 8, pp. 8154-8162)](https://ojs.aaai.org/index.php/AAAI/article/download/28655/29272)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/CPMpy/PyConA",
    "name": "pycona",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Dimos Tsouros",
    "author_email": "dimos.tsouros@kuleuven.be",
    "download_url": "https://files.pythonhosted.org/packages/31/e6/dd9884a60d552512ec5d699f7245228a9fb5b0ea7d39266255b637e2dd6c/pycona-0.0.2.tar.gz",
    "platform": null,
    "description": "## PyConA: Constraint Acquisition in Python\r\n\r\nPyConA ([https://github.com/PyConA/pycona](https://github.com/PyConA/pycona)) is a python-based, open-source package for Constraint Acquisition (CA). In CA, **the goal is to assist the user in modeling**  Constraint Programming (CP) problems, by learning the constraints through user interaction.\r\n\r\nPyConA is based on the powerful CPMpy Constraint Programming and Modeling library in python (https://github.com/CPMpy/cpmpy), which is used for modeling the constraint problems.\r\n\r\nCurrently, only interactive CA methods are implemented in PyConA; passive CA methods might be added later.\r\n\r\n### Interactive Constraint Acquisition\r\n\r\nIn interactive CA, the system interacts with an Oracle, which can be a human user or a software system. The CA system asks queries and based on the answers of the oracle it either learns or excludes constraints.\r\n\r\nPyConA is a generic CA library implementing a range of interactive CA methods, using the following modules:\r\n- Interactive CA Algorithm: The top-level algorithm to be used.\r\n- Query Generation: The query generation system to be used to generate top-level queries.\r\n- FindScope: The FindScope system to be used for finding the scope of violated constraints.\r\n- FindConstraint: The FindConstraint system to be used for finding the exact violated constraints in the given scopes.\r\n\r\nA detailed presentation of CA methods can be found at: \r\n- [Video](https://www.youtube.com/embed/d6EZi8YO60k)\r\n- [Slides](https://school.a4cp.org/summer2023/slides/ml4cp2023_consacq_DimosTsouros.pdf)\r\n\r\n### Features\r\n\r\nThe repository has implemented various approaches and methods from the literature:\r\n- Algorithms: QuAcq [[1](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)-[2](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425)], MQuAcq [[3](https://link.springer.com/chapter/10.1007/978-3-319-98334-9_25)-[4](https://link.springer.com/article/10.1007/s10601-020-09311-4)], MQuAcq-2 \\[[5](https://link.springer.com/chapter/10.1007/978-3-030-30048-7_41)], GrowAcq \\[[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.36)], P-QuAcq\\[[7](https://www.ijcai.org/Proceedings/16/Papers/108.pdf)], G-QuAcq [[8](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7372165&tag=1)]\r\n- Query Generation: TQ-Gen [[9](https://link.springer.com/chapter/10.1007/978-3-319-93031-2_1)], PQ-Gen [[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.36)]\r\n- FindScope: FindScope [[1](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)], Findscope-2 [[2](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425), [4](https://link.springer.com/article/10.1007/s10601-020-09311-4)]\r\n- FindC: FindC [[1](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)], FindC-2 [[2](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425)]\r\n- ML-based CA system and query generation objectives from [[10](https://ojs.aaai.org/index.php/AAAI/article/download/28655/29272)]\r\n\r\n### Installation\r\n\r\n#### Clone and Install from this Repo\r\n\r\nDownload PyConA from the GitHub repository and install it as follows:\r\n```commandline\r\ngit clone -b main --depth 1 https://github.com/PyConA/PyConA.git\r\npip install PyConA.\r\n```\r\n\r\n### Basics\r\n\r\nIn **PyConA**, the ProblemInstance class represents the instance of the problem the user wants to acquire the constraints for. It must be initialized with the variables of the problem and a language. \r\nA CA system is then used to acquire the constraints. \r\n**PyConA** currently implements only interactive CA algorithms (module .active_algorithms).\r\nThe core of PyConA is the CA system (CASystem class). A CASystem can be run on a given ProblemInstance. The ProblemInstance class represents the instance of the problem the user wants to acquire the constraints for. It must be initialized with the variables of the problem and a language.\r\n\r\n### Basic Tutorials\r\n\r\nComing very soon\r\n### Documentation\r\n\r\nComing soon\r\n\r\n### References\r\n\r\n[1] [Bessiere, C., at al. (2013, June). Constraint acquisition via partial queries. In\u00c2\u00a0_Twenty-Third International Joint Conference on Artificial Intelligence.](https://www.lirmm.fr/~coletta/pub/ijcai13.pdf)\r\n\r\n[2] [Bessiere, C., et al. (2023). Learning constraints through partial queries.\u00c2\u00a0Artificial Intelligence,\u00c2\u00a0319, 103896.](https://www.sciencedirect.com/science/article/abs/pii/S0004370223000425)\r\n\r\n[3] [Tsouros, D. C., Stergiou, K., & Sarigiannidis, P. G. (2018). Efficient methods for constraint acquisition. In\u00c2\u00a0_Principles and Practice of Constraint Programming: 24th International Conference, CP 2018, Lille, France, August 27-31, 2018, Proceedings 24_\u00c2\u00a0(pp. 373-388). Springer International Publishing.](https://link.springer.com/chapter/10.1007/978-3-319-98334-9_25)\r\n\r\n[4] [Tsouros, D. C., & Stergiou, K. (2020). Efficient multiple constraint acquisition.\u00c2\u00a0_Constraints_,\u00c2\u00a0_25_(3), 180-225.](https://link.springer.com/article/10.1007/s10601-020-09311-4)\r\n\r\n[5] [Tsouros, D. C., Stergiou, K., & Bessiere, C. (2019). Structure-driven multiple constraint acquisition. In\u00c2\u00a0_Principles and Practice of Constraint Programming: 25th International Conference, CP 2019, Stamford, CT, USA, September 30\u00e2\u20ac\u201cOctober 4, 2019, Proceedings 25_\u00c2\u00a0(pp. 709-725). Springer International Publishing.](https://link.springer.com/chapter/10.1007/978-3-030-30048-7_41)\r\n\r\n[6] [Tsouros, D. C., Berden, S., & Guns, T. (2023). Guided Bottom-Up Interactive Constraint Acquisition}}. In\u00c2\u00a0_29th International Conference on Principles and Practice of Constraint Programming (CP 2023)_\u00c2\u00a0(Vol. 280, p. 36).](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2023.36)\r\n\r\n[7] [Daoudi, A., Mechqrane, Y., Bessiere, C., Lazaar, N., & Bouyakhf, E. H. (2016, July). Constraint Acquisition with Recommendation Queries. In\u00c2\u00a0_IJCAI_\u00c2\u00a0(pp. 720-726).](https://www.ijcai.org/Proceedings/16/Papers/108.pdf)\r\n\r\n[8] [Daoudi, A., Lazaar, N., Mechqrane, Y., Bessiere, C., & Bouyakhf, E. H. (2015, November). Detecting types of variables for generalization in constraint acquisition. In\u00c2\u00a0_2015 IEEE 27th International Conference on Tools with Artificial Intelligence (ICTAI)_\u00c2\u00a0(pp. 413-420). IEEE.](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7372165&tag=1)\r\n\r\n[9][Ait Addi, H., Bessiere, C., Ezzahir, R., & Lazaar, N. (2018). Time-bounded query generator for constraint acquisition. In\u00c2\u00a0_Integration of Constraint Programming, Artificial Intelligence, and Operations Research: 15th International Conference, CPAIOR 2018, Delft, The Netherlands, June 26\u00e2\u20ac\u201c29, 2018, Proceedings 15_\u00c2\u00a0(pp. 1-17). Springer International Publishing.](https://link.springer.com/chapter/10.1007/978-3-319-93031-2_1)\r\n\r\n[10] [Tsouros, D., Berden, S., & Guns, T. (2024, March). Learning to learn in interactive constraint acquisition. In\u00c2\u00a0_Proceedings of the AAAI Conference on Artificial Intelligence_\u00c2\u00a0(Vol. 38, No. 8, pp. 8154-8162)](https://ojs.aaai.org/index.php/AAAI/article/download/28655/29272)\r\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A cpmpy-based library for constraint acquisition.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/CPMpy/PyConA"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ec5d6be66276e48e58716ef17754265bd2b4c82e5bc7a82cf573121af4e594d",
                "md5": "16ace636249a08ccfde7a0a45ecf2426",
                "sha256": "9655ffea67505250f91da364bb6e9a60cd84a404729585bf919361e6f941892f"
            },
            "downloads": -1,
            "filename": "pycona-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16ace636249a08ccfde7a0a45ecf2426",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 66202,
            "upload_time": "2024-09-05T09:04:22",
            "upload_time_iso_8601": "2024-09-05T09:04:22.945414Z",
            "url": "https://files.pythonhosted.org/packages/3e/c5/d6be66276e48e58716ef17754265bd2b4c82e5bc7a82cf573121af4e594d/pycona-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31e6dd9884a60d552512ec5d699f7245228a9fb5b0ea7d39266255b637e2dd6c",
                "md5": "33cd34db957d071cdc48c3413024407c",
                "sha256": "9a730a0ceb2a431293d9693b87d4edef9c1b2029d2f766f3107899c8eb897021"
            },
            "downloads": -1,
            "filename": "pycona-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "33cd34db957d071cdc48c3413024407c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 45356,
            "upload_time": "2024-09-05T09:04:24",
            "upload_time_iso_8601": "2024-09-05T09:04:24.074046Z",
            "url": "https://files.pythonhosted.org/packages/31/e6/dd9884a60d552512ec5d699f7245228a9fb5b0ea7d39266255b637e2dd6c/pycona-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-05 09:04:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CPMpy",
    "github_project": "PyConA",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pycona"
}
        
Elapsed time: 1.12293s