These projects are related to Machine Learning, Reinforcement Learning & First order logic under the supervision of Dr Hossein Karshenas at the University of Isfahan.
We implement a graph data structure to apply Dijkstra and Astar Algorithms on the nodes to find the shortest path between points in the graph.
Our nodes are airports. We want to find the shortest path between them with the minimum time cost.
To Run this project, run these commands:
pip install numpy
pip install pandas
- You can see the result of the Execution of Dijkstra and Astar Algorithms in the .txt files in the folder of the project for any origin & destination in the Graph.
- Every time you run this program, you should give your origin and destination as input to this program. Then your result was saved in two .txt files in the folder of the program. The current output was saved for the "Imam Khomeini International Airport" as the origin & "Raleigh Durham International Airport" as the destination.
We implement Linear Regression from scratch with Numpy and Pandas Libraries.
Our task is the prediction of flight price concerning features like duration, arrival time, departure time, and...
- Reading Dataset
- Checking NAN values
- Handling Text Features
- Feature scaling with Min-Max scaler(Normalization)
- Applying Linear Regression
- Evaluation With the R2-score, MSE and MAE
To Run this project, run these commands:
pip install numpy
pip install pandas
pip install scikit-learn
pip install seaborn
This project aims to implement an intelligent agent that exists in a non-deterministic environment.
Our goal is to find the policy for this agent in this non-deterministic environment.
Tip
This agent has the Transition Model of the Environment.
We use the Value Iteration algorithm to find the policy for the agent.
Important
Agent exists in the "Cliff Walking" environment from the gymnasium. You can see the features of this environment in the below link: https://gymnasium.farama.org/environments/toy_text/cliff_walking/
- implementation of Value Iteration algorithm
- Checking the Convergence of the algorithm
- Calculation of q-star matrix & v-star list
- showing the score of every state with a heatmap
- showing the convergence plot
To Run this project, run these commands:
pip install 'gymnasium[all]'
pip install numpy
pip install seaborn
The goal of this project is to implement an intelligent agent that pays activity in an unknown environment.
Our goal is to find the policy for this agent in this unknown environment.
Tip
We use the q-learning algorithm to find the policy for the agent.
We used another solution to find the policy. We use Deep Q-Learning(DQN) to suggest the best action in every state to the agent.
Important
Agent exists in the "Maze" environment from the gym-maze. You can see the features of this environment in the below link: https://github.com/MattChanTK/gym-maze
- implementation of q-learning algorithm
- implementation of Deep Q-Learning with Keras.
- selecting action with epsilon-greedy & approximation_utility
To Run this project, run these commands:
pip install tensorflow
pip install --upgrade keras
pip install seaborn
python setup.py install
The goal of this project is to implement an intelligent agent that works in the Pacman game environment and earns the most points.
- In this phase, we use the Pacman environment developed by UC Berkeley.
- In this environment, your agent pays activity in a maze and eats the small points and some large points.
- In this game, the goal is to eat the dots while avoiding the ghosts. By eating the big dots, the situation changes in your favor: for a short time, you can also eat and gain ghosts.
- We implement the Minimax algorithm to solve the problem.
- We use a Heuristic method to guide our agent to catch to the maximum score and finally win this game.
Tip
We have a multi-agent environment. So our problem is winning the game with the maximum score.
We evaluated our heuristic method and caught 100 wins from 100 games with 1 directional ghost in this game with this heuristic method.
To run the game with intelligent ghosts, run this command in the folder of the game:
- Running with 1 directional Ghost for 100 times:
python pacman.py -p AIAgent -k 1 -a depth=4 -g DirectionalGhost -n 100
- Running 1 ghost with stochastic actions:
python pacman.py -p AIAgent -k 1 -a depth=4 -n 100
To see the Minimax algorithm implementation and our heuristic method, go to this path: Multi agent search game/multiAgents.py
In this project, the goal is to implement a tourist tour recommendation system based on the text received from the user.
The goal is to implement this system by using First Order Logic.
Our Task is to design a Knowledge base with Prolog Language.
- We implement a graph With input dataset and Prolog.
- We can find the first & Second Connected neighbors with Prolog.
- We can receive a text from a user about his thoughts about a tour and then suggest to him a tour that matches his text.
- This tour is based on the text input from a user and real connected nodes in the Graph.
To Run this project, run these commands:
pip install numpy
pip install pandas
pip install pyswip