{"id":15407225,"url":"https://github.com/ltfschoen/aind-constraint_satisfaction","last_synced_at":"2025-08-13T23:09:30.193Z","repository":{"id":76619906,"uuid":"88940446","full_name":"ltfschoen/AIND-Constraint_Satisfaction","owner":"ltfschoen","description":"Term 1 Lab 9 (Optional) by Luke Schoen for Udacity Artificial Intelligence Nanodegree (AIND)","archived":false,"fork":false,"pushed_at":"2017-04-21T04:33:10.000Z","size":193,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:28:28.827Z","etag":null,"topics":["algorithms","artificial-intelligence","constraint-satisfaction-problem","jupyter-notebook","n-queens","python36","sympy"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ltfschoen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-21T04:32:42.000Z","updated_at":"2017-04-21T07:29:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"0100407a-b12e-4619-bdab-a183110fbd09","html_url":"https://github.com/ltfschoen/AIND-Constraint_Satisfaction","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.36363636363636365","last_synced_commit":"10a15c187a14b551a452be7c954c71ebf5a558a7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ltfschoen/AIND-Constraint_Satisfaction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2FAIND-Constraint_Satisfaction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2FAIND-Constraint_Satisfaction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2FAIND-Constraint_Satisfaction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2FAIND-Constraint_Satisfaction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltfschoen","download_url":"https://codeload.github.com/ltfschoen/AIND-Constraint_Satisfaction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2FAIND-Constraint_Satisfaction/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270330595,"owners_count":24565816,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["algorithms","artificial-intelligence","constraint-satisfaction-problem","jupyter-notebook","n-queens","python36","sympy"],"created_at":"2024-10-01T16:27:49.903Z","updated_at":"2025-08-13T23:09:30.166Z","avatar_url":"https://github.com/ltfschoen.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About \n\n\n* Exercise implementing Constraint Satisfaction Problems (CSP) by implementing the N-Queens problem using symbolic constraints in a Jupyter notebook, and solving it using the Backtracking Search algorithm from AIMA.\n\nTo launch the notebook, run the following command from a terminal with anaconda3 installed and on the application path:\n\n* Guide on Jupiter Notebook https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook#gs.WPbJuKE\n\n## Setup\n\n* Install Jupyter Notebook App with Miniconda http://jupyter.readthedocs.io/en/latest/install.html\n    ```\n    pip3 install --upgrade pip setuptools\n    pip3 install jupyter\n    pip3 install matplotlib util sympy\n    ```\n\n* Launch Jupyter Notebook App `jupyter notebook AIND-Constraint_Satisfaction.ipynb`\n\n* Run code:\n    * Click any section containing a code snippet and go to menu: Cells \u003e Run All,\n    then view the outputs shown below the code snippets\n\n## Solution - Sympy\n\n* http://localhost:8888/notebooks/Sympy_Intro.ipynb\n\n# Warmup: Add to top of code snippet\n\n`pip3 install sympy`\n\n# SymPy Exercises\n\n* Question 1\n\t* Solution \n\t\t```\n\t\tA = symbols(\"A:A0, A:A1, A:A2\")\n\t\t```\n\n* Question 2\n\t* Solution\n\t\t```\n\t\tfrom operator import xor\n\t\tx, y = symbols(\"x y\")\n\t\txor_relation = xor(x, y)\n\t\t# alternative:\n\t\t# xor_relation = x ^ y\n\t\tE = xor_relation\n\t\t```\n\n* Question 3\n\t* Solution\n\t\t```\n\t\ta, b, c = symbols(['a', 'b', 'c'])\n\t\tmaxAbsDiff = constraint(\"MaxAbsDiff\", abs(a - b) \u003c c)\n\n\t\tA = symbols(\"A:A0, A:A1, A:A2\")\n\t\tmaxAbsDiff_copy = maxAbsDiff.subs({a: A[0], b: A[1], c: A[2]})\n\t\t```\n\n* Question 4\n\t* Attempt (WRONG)\n\t\thttps://discussions.udacity.com/t/sympy-intro-lab-question-4-help/229192/8\n\n## Solution \n\n* diffDiag\n\t* Discussion https://discussions.udacity.com/t/diffdiag-using-symbol/229264/8","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Faind-constraint_satisfaction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltfschoen%2Faind-constraint_satisfaction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Faind-constraint_satisfaction/lists"}