{"id":19357840,"url":"https://github.com/dleedev365/aima_python_practices","last_synced_at":"2025-08-14T05:15:50.497Z","repository":{"id":176565158,"uuid":"194799872","full_name":"dleedev365/aima_python_practices","owner":"dleedev365","description":"[CMPT 310: Artificial Intelligence Survey] N-Queens Problem, CSP problem, Minisat, Min-Conflicts, Hill-Climbing Search, Backtracking Search","archived":false,"fork":false,"pushed_at":"2019-07-02T06:31:19.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-24T11:49:43.200Z","etag":null,"topics":["aima-python","backtracking","csp-problem","hill-climbing","min-conflict","nqueens-problem"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dleedev365.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}},"created_at":"2019-07-02T06:15:18.000Z","updated_at":"2024-11-24T21:44:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"71aee3d1-8b39-418d-8156-e2754718794a","html_url":"https://github.com/dleedev365/aima_python_practices","commit_stats":null,"previous_names":["dlee0528/aima_python_practices","dleedev365/aima_python_practices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dleedev365/aima_python_practices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dleedev365%2Faima_python_practices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dleedev365%2Faima_python_practices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dleedev365%2Faima_python_practices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dleedev365%2Faima_python_practices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dleedev365","download_url":"https://codeload.github.com/dleedev365/aima_python_practices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dleedev365%2Faima_python_practices/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270364971,"owners_count":24571423,"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-14T02:00:10.309Z","response_time":75,"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":["aima-python","backtracking","csp-problem","hill-climbing","min-conflict","nqueens-problem"],"created_at":"2024-11-10T07:09:24.599Z","updated_at":"2025-08-14T05:15:50.436Z","avatar_url":"https://github.com/dleedev365.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aima_python_practices\nN-Queens Problem, CSP problem, Minisat\n\nThe following files are to explore the Ice Breaker Problem: given a group of n people, what's the minimum number of teams they can be partitioned into such that\nno team has 2 (or more) people who are friends. \n\n# Premise\nn people are named 0, 1, 2, …, n−1, and that we have what we will call a friendship graph, i.e. a graph with n nodes labeled 0 to n−1 (each node is a person), where nodes i and j are connected by an edge just when i and j are friends. \nFriendship is symmetric: if i is a friend of j, then j is a friend of i. Plus a person cannot be friends with themselves.\n\n# N-queens with SAT\nuse minisat to solve some constraint satisfaction problems.\n\n\u003e make_queen_sat(N) generates a SAT sentence (as a Python string) that, when satisfied, will be a solution to the N-queens problem.\n\u003e draw_queen_sat_sol(sol) takes the output of minsat as a string and draws the resulting N-queens solution on the screen (using print). \n\u003e make_ice_breaker_sat(graph, k) takes a friendship graph as input (see assignment 2) and a positive integer k representing the number of possible teams (i.e. each node can be one of k colors). It returns, as a Python string, an encoding as a SAT problem that can be used as input to minisat.\n\u003e find_min_teams(graph) uses minisat to find the (exact) minimum number of teams the people can be divided into such that no team has any friends (teams of 1 are permitted). find_min_teams(graph) returns a single integer: the (exact) minimum number of teams.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdleedev365%2Faima_python_practices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdleedev365%2Faima_python_practices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdleedev365%2Faima_python_practices/lists"}