{"id":24892778,"url":"https://github.com/lamaabdeldayem/quiz-proctoring-system","last_synced_at":"2026-01-06T20:43:14.771Z","repository":{"id":272430821,"uuid":"858679939","full_name":"lamaabdeldayem/Quiz-Proctoring-System","owner":"lamaabdeldayem","description":"A Prolog-based system for assigning Teaching Assistants to quizzes, ensuring availability and avoiding scheduling conflicts.","archived":false,"fork":false,"pushed_at":"2025-01-17T13:06:27.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T18:16:42.565Z","etag":null,"topics":["ai","automation","backtracking","logic-programming","logical-programming","prolog","recursion","scheduling"],"latest_commit_sha":null,"homepage":"","language":"Prolog","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/lamaabdeldayem.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":"2024-09-17T10:49:52.000Z","updated_at":"2025-01-17T13:06:28.000Z","dependencies_parsed_at":"2025-01-14T11:57:00.023Z","dependency_job_id":"b1beb020-8a68-4fcb-a8ec-a59b8c20a22d","html_url":"https://github.com/lamaabdeldayem/Quiz-Proctoring-System","commit_stats":null,"previous_names":["lamaabdeldayem/quiz-proctoring-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamaabdeldayem%2FQuiz-Proctoring-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamaabdeldayem%2FQuiz-Proctoring-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamaabdeldayem%2FQuiz-Proctoring-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamaabdeldayem%2FQuiz-Proctoring-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamaabdeldayem","download_url":"https://codeload.github.com/lamaabdeldayem/Quiz-Proctoring-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858876,"owners_count":20684057,"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":["ai","automation","backtracking","logic-programming","logical-programming","prolog","recursion","scheduling"],"created_at":"2025-02-01T18:16:53.769Z","updated_at":"2026-01-06T20:43:14.728Z","avatar_url":"https://github.com/lamaabdeldayem.png","language":"Prolog","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🗓️ Teaching Assistant Scheduling System 📚\n\n## 🚀 Overview\n\nThis Prolog-based **Scheduling System** is designed to assign Teaching Assistants (TAs) to proctor quizzes. The system ensures TAs are available during their assigned slots, while considering their teaching schedules and days off. The goal is to avoid any scheduling conflicts while distributing tasks fairly. 🎓\n\n### 🎯 Key Features\n- **Dynamic Scheduling**: Generates schedules based on TAs' availability.\n- **Conflict-Free Assignments**: Ensures no overlaps in assignments.\n- **Recursive Algorithms**: Utilizes backtracking, recursion, and list processing for efficient scheduling.\n\n---\n\n## 🧠 Core Concepts\n\n### 📚 Data Structures\n- **Quiz**: Represented as `quiz(_, Day, Slot, Count)`:\n  - `Day`: Day of the quiz.\n  - `Slot`: Time slot for the quiz.\n  - `Count`: Number of TAs needed for the quiz.\n  \n- **FreeSchedule**: Represents available TAs for each day and slot.\n- **ProctoringSchedule**: Final assignment of TAs to quizzes.\n\n---\n\n## 🛠️ Functions\n\n### 1. `assign_quiz`\nAssigns TAs to a specific quiz based on availability.\n\n```prolog\nassign_quiz(quiz(_, Day, Slot, Count), FreeSchedule, AssignedTAs) :-\n    member(day(Day, L1), FreeSchedule),\n    nth1(Slot, L1, FreeTAs),\n    powerset(FreeTAs, P),\n    length(P, Count),\n    permutation(P, AssignedTAs).\n```\n**Details**:\n- Filters available TAs for a specific day and slot.\n- Generates all possible combinations of available TAs to meet the required count.\n\n### 2. `powerset`\nGenerates all subsets of a given list.\n\n```prolog\npowerset([], []).\npowerset([H1|T1], [H1|T2]) :-\n    powerset(T1, T2).\npowerset([_|T1], T2) :-\n    powerset(T1, T2).\n```\n**Details**:\n- This function is used to generate possible assignments of TAs for each quiz.\n\n### 3. `assign_quizzes`\nAssigns TAs to multiple quizzes while avoiding conflicts.\n\n```prolog\nassign_quizzes(Quizzes, FreeSchedule, ProctoringSchedule) :-\n    assign_quizzesH(Quizzes, FreeSchedule, ProctoringSchedule),\n    \\+ common(ProctoringSchedule).\n```\n**Details**:\n- Handles multiple quizzes recursively.\n- Ensures no overlapping assignments for the same slot and day.\n\n### 4. `common`\nDetects conflicts in the proctoring schedule.\n\n```prolog\ncommon(ProctoringSchedule) :-\n    member(proctors(quiz(Q1, Day, Slot, _), L1), ProctoringSchedule),\n    member(proctors(quiz(Q2, Day, Slot, _), L2), ProctoringSchedule),\n    Q1 \\= Q2,\n    \\+ intersection(L1, L2, []).\n```\n**Details**:\n- Detects conflicts if two quizzes share the same time slot and day but have overlapping TAs.\n\n### 5. `free_schedule`\nGenerates the free schedule for all TAs based on teaching schedules and days off.\n\n```prolog\nfree_schedule(_, [], []).\nfree_schedule(AllTAs, [day(Day, L1)|T1], [L2|T2]) :-\n    setFreee(AllTAs, day(Day, L1), day(Day, []), L2),\n    free_schedule(AllTAs, T1, T2).\n```\n**Details**:\n- Creates a list of available TAs for each day and time slot, considering their teaching schedules and days off.\n\n### 6. `setFreee`\nPopulates available TAs for a specific day and slot.\n\n```prolog\nsetFreee(_, day(Day, []), D, D).\nsetFreee(AllTAs, day(Day, [H1|T1]), day(Day, H13), D) :-\n    findall(Name, (member(ta(Name, Agaza), AllTAs), Agaza \\= Day, \\+ member(Name, H1)), Free1),\n    permutation(Free1, Free),\n    append(H13, [Free], H15),\n    setFreee(AllTAs, day(Day, T1), day(Day, H15), D).\n```\n**Details**:\n- Determines the TAs that are free for a specific day and slot by filtering out those already scheduled or on leave.\n\n### 7. `assign_proctors`\nOrchestrates the scheduling process.\n\n```prolog\nassign_proctors(AllTAs, Quizzes, TeachingSchedule, ProctoringSchedule) :-\n    free_schedule(AllTAs, TeachingSchedule, FreeSchedule), !,\n    assign_quizzes(Quizzes, FreeSchedule, ProctoringSchedule).\n```\n**Details**:\n- Combines all the steps to generate the final proctoring schedule.\n\n---\n\n## 💻 Technologies\n- **Language**: Prolog\n- **Programming Paradigm**: Logic Programming\n- **Key Features**: Recursion, Backtracking, and Permutations\n\n---\n\n## 🚀 How to Run\n\n1. **Install Prolog** on your system.\n2. **Save the Code** to a file, e.g., `TAScheduler.pl`.\n3. **Load the file** in your Prolog interpreter:\n   ```bash\n   consult('TAScheduler.pl').\n   ```\n4. **Define Input Data** for TAs, quizzes, and teaching schedules, then run the scheduling functions.\n\n---\n\n## 📋 Example Usage\n\n```prolog\n% Define TAs with their leave days\nAllTAs = [ta(\"Alice\", \"Monday\"), ta(\"Bob\", \"Tuesday\"), ta(\"Charlie\", \"Wednesday\")].\n\n% Define quizzes\nQuizzes = [quiz(1, \"Monday\", 1, 2), quiz(2, \"Monday\", 2, 1)].\n\n% Define teaching schedule\nTeachingSchedule = [day(\"Monday\", [[\"Bob\"], [\"Alice\"]])].\n\n% Generate proctoring schedule\nassign_proctors(AllTAs, Quizzes, TeachingSchedule, ProctoringSchedule).\n```\n\n---\n\n## ⚠️ Notes\n- The system ensures fairness and prevents overburdening any individual TA.\n- The approach is flexible and can handle various constraints, making it highly adaptable.\n\n---\n\n## 🌱 Future Improvements\n\n- **Priority-based Assignments**: Add support for assigning higher-priority TAs to quizzes.\n- **Conflict Detection**: Enhance the system with more detailed logs for conflict identification.\n- **Graphical Interface**: Implement a user-friendly interface to visualize schedules.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamaabdeldayem%2Fquiz-proctoring-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamaabdeldayem%2Fquiz-proctoring-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamaabdeldayem%2Fquiz-proctoring-system/lists"}