{"id":20620561,"url":"https://github.com/blacklight/libcsp--","last_synced_at":"2025-07-06T10:02:46.458Z","repository":{"id":66602198,"uuid":"674251","full_name":"blacklight/libCSP--","owner":"blacklight","description":"A library for managing CSP, constraint satisfaction problems in AI and more","archived":false,"fork":false,"pushed_at":"2010-05-27T09:56:25.000Z","size":188,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T10:02:37.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blacklight.png","metadata":{"files":{"readme":"README","changelog":"Changelog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-19T01:20:27.000Z","updated_at":"2015-01-10T12:28:16.000Z","dependencies_parsed_at":"2023-02-20T07:20:45.172Z","dependency_job_id":null,"html_url":"https://github.com/blacklight/libCSP--","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blacklight/libCSP--","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FlibCSP--","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FlibCSP--/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FlibCSP--/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FlibCSP--/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blacklight","download_url":"https://codeload.github.com/blacklight/libCSP--/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacklight%2FlibCSP--/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263882252,"owners_count":23524458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T12:14:52.419Z","updated_at":"2025-07-06T10:02:46.437Z","avatar_url":"https://github.com/blacklight.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"========================================\n _ _ _      ____ ____  ____             \n| (_) |__  / ___/ ___||  _ \\  _     _   \n| | | '_ \\| |   \\___ \\| |_) || |_ _| |_ \n| | | |_) | |___ ___) |  __/_   _|_   _|\n|_|_|_.__/ \\____|____/|_|    |_|   |_|  \n========================================\n\n\nlibCSP++ is a small library whose purpose is allowing the programmer who has to\nmanage constraint-related problems (CSP == Constraint Satisfaction Problem), in\nartificial intelligence or any other application, to do it easily, just caring\nabout how to express the constraints of his own problem, not how to write an\nalgorithm that verifies those constraints. The programmer only has to focus\nthree parameters: the variables of the problem (e.g., in a sudoku resolution \nalgorithm, each cell of the game may represent a variable), the domains of these\nvariables (e.g., in a sudoku, each cell may assume values from 1 to 9) and the\nconstraints of the problem, simply provided like one or more boolean functions\n(always in a sudoku, the constraints are represented by a boolean function\nreturning true if all the variables in the same row, column and cell have\ndifferent values, false otherwise). Once focused these features, the programmer\njust has to provide them to build a CSP object, without caring of the algorithm\nto check the satisfiability of his problem, and so pay his attention to *HIS*\nown algorithm.\n\n\nINSTALLATION:\n\nJust type make install. The files will be copied, by default, to /usr/local.\nChange the Makefile if you want them in a different location. No additional\ndependency is required. Only a C++ compiler.\n\n\nUSAGE:\n\nJust include \u003ccsp++/csp++.h\u003e in your source files using libCSP++, possibly\nadding the directory where csp++ directory is located to your include list (for\nexample, using g++ and supposing you installed csp++ to /usr/local, you would\nappend -I/usr/local/include to your compiler command line).\n\n\nDOCUMENTATION:\n\nYou can find doxygen-generated documentation, both in HTML and LaTeX format, in\nthe doc/ directory of the project. If you modify some of the sources files of\nthe library and want to change the documentation, just move to csp++ directory\nand launch `doxygen' command again.\n\n\nEXAMPLES:\n\nTwo examples of usage of the library are provided.\n\n- fourcolours.cpp is a simple application whose purpose is to interactively ask the\nuser to enter the colours for some European countries. The constraint is that two\nadjacent countries on the map cannot have the same colour, and the domain of\neach variable (country) is the set of colours it can assume (a set of 4 colours\nis used, it has been proved in the chromatic theory of graphs that 4 colours are\nenough for satisfying the constraint \"two adjacent countries must always have\ndifferent colours\"). Every time the user inserts the colour for a country, the\ndomains (colours) of the remaining countries are computed again applying the\nconstraint just entered by the user, and for the next countries the choice of\nthe colours is only restricted to these computed domains. If the user has to\nchoose a colour for a country having an only value left in its domain, that\nvalue will be chosen automatically.\n\n- sudoku.cpp is a nice program that automatically solves a sudoku, theoretically by\nany size (in truth the complexity of the algorithm rises exponentially when the\nsize of the sudoku grows, and the required time for the algorithm is also\ninversely proportional to the number of variables already set by default in the\ngame). The sudoku to be solved is read by a text file. If no file is provided,\nthe program reads the sudoku contained in ./sudoku.txt. More examples are\nprovided in files sudoku-easy.txt, sudoku-medium.txt, sudoku-hard.txt and\nsudoku-2x2x2.txt. If you want to solve a sudoku different by the one provided in\nsudoku.txt, just put the new sudoku in a file whose structure is similar to the\none illustrated in the sample files, and pass it as parameter for the\napplication (e.g. ./sudoku mysudoku.txt). The application will verify whether\nthe given game has a solution (unique), is indeterminate (the given variables\nare not enough for reaching a unique solution) or impossible (any configuration\nleads to a violation of the constraints).\n\nFor building the examples, from the root directory of the project just type\n`make examples'. For removing them, type `make examples-clean'. For building\nonly one of them, type `make fourcolours' or `make sudoku', and specularly `make\nfourcolours-clean' or `make sudoku-clean'.\n\n\nLICENCE:\n\nAll the source code and examples are released under GNU GPL 3 licence.\n\n\nAUTHOR:\n\nBlackLight, \u003cblacklight[AT]autistici[DOT]org\u003e, http://0x00.ath.cx\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacklight%2Flibcsp--","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacklight%2Flibcsp--","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacklight%2Flibcsp--/lists"}