{"id":19250367,"url":"https://github.com/amirreza81/artificial-intelligence","last_synced_at":"2025-06-16T08:35:28.212Z","repository":{"id":209619279,"uuid":"724535453","full_name":"Amirreza81/Artificial-Intelligence","owner":"Amirreza81","description":"Solutions to practical assignments of Artificial Intelligence course (CE-417) at Sharif University of Technology","archived":false,"fork":false,"pushed_at":"2024-10-28T11:28:28.000Z","size":26195,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-21T12:43:44.718Z","etag":null,"topics":["a-star","a-star-algorithm","adversarial-search","ai","alpha-beta-pruning","artificial-intelligence","bayesian-networks","cryptarithmetic","decision-trees","deep-learning","logistic-regression","machine-learning","minimax-algorithm","pytorch","q-learning","q-learning-vs-sarsa","rainforcement-learning","rl","simulated-annealing","simulated-annealing-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Amirreza81.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,"zenodo":null}},"created_at":"2023-11-28T09:27:18.000Z","updated_at":"2025-01-02T08:32:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"142baa8c-d061-45df-bf20-d2a5d7ec3ec7","html_url":"https://github.com/Amirreza81/Artificial-Intelligence","commit_stats":null,"previous_names":["amirreza81/artificial-intelligence"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Amirreza81/Artificial-Intelligence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirreza81%2FArtificial-Intelligence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirreza81%2FArtificial-Intelligence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirreza81%2FArtificial-Intelligence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirreza81%2FArtificial-Intelligence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amirreza81","download_url":"https://codeload.github.com/Amirreza81/Artificial-Intelligence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirreza81%2FArtificial-Intelligence/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260126714,"owners_count":22962675,"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":["a-star","a-star-algorithm","adversarial-search","ai","alpha-beta-pruning","artificial-intelligence","bayesian-networks","cryptarithmetic","decision-trees","deep-learning","logistic-regression","machine-learning","minimax-algorithm","pytorch","q-learning","q-learning-vs-sarsa","rainforcement-learning","rl","simulated-annealing","simulated-annealing-algorithm"],"created_at":"2024-11-09T18:16:55.857Z","updated_at":"2025-06-16T08:35:28.192Z","avatar_url":"https://github.com/Amirreza81.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artificial Intelligence 🤖🧠\n\n**Solutions to practical assignments of Artificial Intelligence course (CE-417) at Sharif University of Technology**\n\nThis repository contains solutions for the practical assignments given in the AI course, covering various essential topics in artificial intelligence. Each assignment implements a specific AI technique or algorithm to solve real-world problems, showcasing the theoretical concepts in action.\n\n## Table of Contents\n\u003e - [A Star](#A\\*)\n\u003e - [Simulated Annealing](#Simulated_Annealing)\n\u003e - [Cryptarithmetic Puzzle](#Cryptarithmetic_Puzzle)\n\u003e - [Adversarial Search](#Adversarial_Search)\n\u003e - [Q_Tabular](#Q_Tabular)\n\u003e - [RL_Chat](#RL_Chat)\n\u003e - [Bayesian Networks](#Bayesian_Networks)\n\u003e - [Decision Tree](#Decision_Tree)\n\u003e - [Logistic Regression](#Logistic_Regression)\n\n* ### **A\\***:\n  Implements the A* search algorithm to solve an elevator scheduling problem where students and professors must be transported between two floors, following specific constraints.\n    \n  ![A* Algorithm GIF](a_star_algorithm.gif)\n    \n  **Problem Description**:\n  The elevator needs to move students and professors between two floors with the following constraints:\n  - No floor should have more students than professors (if professors are present).\n   - The solution must ensure that all students and professors are transferred safely across floors.\n\n  **Approach**:\n  The problem is represented as a graph, where each state is described by the number of students and professors on each floor, and the position of the elevator. A* uses a heuristic to search for the \n   optimal path from the initial to the final state, ensuring efficiency and optimality.\n      \n  **Comparison with DFS**:  \n      The A* algorithm outperforms DFS in terms of finding shorter paths, thanks to its heuristic function, though it explores more states.\n\n  See this [file](https://github.com/Amirreza81/Artificial-Intelligence/blob/main/A-star/A_star.ipynb) for more details.\n\n* ### **Simulated_Annealing**:\n  Demonstrates optimization using the Simulated Annealing algorithm for solving the Knapsack problem.\n    \n  **Problem Description**:\n      The Knapsack problem involves selecting a subset of items with specific weights and values to maximize the total value without exceeding a given weight limit.\n\n  **Approach**:\n      Simulated Annealing is a probabilistic algorithm that explores the solution space by accepting worse solutions with decreasing probability over time (as the temperature cools). This helps escape \n  local optima and leads to a near-optimal solution.\n\n  **Results**:  \n      The algorithm finds an average best solution with a value of approximately 2595.05 over multiple runs, demonstrating its effectiveness in solving the Knapsack problem.\n\n  See this [file](https://github.com/Amirreza81/Artificial-Intelligence/blob/main/Simulated%20Annealing/Simulated_Annealing.ipynb) for more details.\n\n* ### **Cryptarithmetic_Puzzle**:  \n    The Cryptarithmetic Puzzle is a puzzle where the digits of some numbers are replaced with letters to make a mathematical equation. Each letter represents a unique digit from 0 to 9 (in case of base 10). The puzzle has the following constraints:\n\n    - Each letter can be replaced by a digit from 0 to 9 (in case of base 10), but no digit can be used twice.\n    - Each letter must be replaced by the same digit throughout the puzzle.\n    - The leftmost digit of each number cannot be zero.\n\n    \u003cimg src=\"Cryptarithmetic Puzzle/example.png\" alt=\"puzzle\" width=\"500\" class=\"center\"/\u003e\n    \n* ### **Adversarial_Search**:  \n    Minimax algorithm for game-playing agents with alpha-beta pruning.\n    \n* ### **Q_Tabular**:  \n    Implementation of Q-learning with tabular updates for reinforcement learning.\n    \n* ### **RL_Chat**:  \n    A simple chat system utilizing reinforcement learning for decision-making.\n\n* ### **Bayesian_Networks**:\n    Building and inference on Bayesian networks for probabilistic reasoning.\n\n* ### **Decision_Tree**:\n    Implementing decision tree algorithms for classification tasks.\n\n* ### **Logistic_Regression**:\n\n    In this notebook I implemented Logistic Regression from scratch. First I implemented all the needed function in order to use Logistic Regression. After that I tested my implementation on a dummy dataset and visualize the model boundary. Then I did the same on a tweet sentiment classification dataset.\n\n    **Steps**:\n        - Creating Dummy Dataset\n        - Implementing model\n        - Implementing training\n        - Training on a Tweet Sentiment Analysis Dataset (Ungraded)\n\n    **First dataset**:\n\n    ![Dataset](./Logistic%20Regression/images/dataset.png)\n    ![Result](./Logistic%20Regression/images/resultLR.png)\n    \n    **Second dataset**:\n\n    ![Dataset](./Logistic%20Regression/images/ds2.png)\n    ![Result](./Logistic%20Regression/images/resultLR2.png)\n\n    **Tweet Sentiment Analysis Dataset**:\n\n    In this part I used the logistic regression model I implemented to classify whether a *tweet* contains a postivie or negative sentiment.\n\n    The accuracy:\n\n    ![Acc](./Logistic%20Regression/images/acc.png)\n\n    The result:\n\n    ![res](./Logistic%20Regression/images/res.png)\n\n\n## Instructor ✍\n[Professor Mohammad Hossein Rohban](https://scholar.google.com/citations?user=pRyJ6FkAAAAJ\u0026hl=en)\n\n## Contribution 👥\nFeel free to fork this repository, submit pull requests, or raise issues if you find any bugs or have suggestions for improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirreza81%2Fartificial-intelligence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirreza81%2Fartificial-intelligence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirreza81%2Fartificial-intelligence/lists"}