Collection of three comprehensive projects exploring evolutionary algorithms, fuzzy logic, and neural networks from the Computational Intelligence course at Amirkabir University of Technology.
This repository contains three comprehensive projects completed during my undergraduate Computational Intelligence course at Amirkabir University of Technology. Each project demonstrates fundamental concepts in computational intelligence through practical, from-scratch implementations:
- Evolutionary AI Game - Neuroevolution using genetic algorithms for game-playing agents
- Fuzzy C-Means Clustering - Soft clustering with fuzzy logic and membership degrees
- Handwritten Digit Recognition - Multi-layer neural network with backpropagation on MNIST
All projects are accompanied by their respective codes, necessary datasets (if required), and comprehensive documentation, which includes instructions and reports (in Persian).
Course Focus:
- Evolutionary computation and genetic algorithms
- Fuzzy logic and soft computing
- Neural networks and deep learning fundamentals
- Optimization algorithms
- Pattern recognition and classification
Neuroevolution system that trains neural networks to play games using genetic algorithms.
Description:
- Implements genetic algorithms to evolve neural networks for game-playing agents
- Three game modes: Helicopter, Gravity, and Thrust
- Real-time visualization of evolutionary progress
- Transfer learning capabilities across different game modes
Key Features:
- Genetic Algorithm: (μ, λ) and (μ + λ) selection strategies
- Neural Network: 3-layer feedforward architecture
- Fitness Evaluation: Distance-based scoring system
- Evolution Operators: Parent selection, crossover, and mutation
- Advanced Features: Checkpointing, learning curves, transfer learning
Technologies: Python, Pygame, NumPy
Classification based on Fuzzy Logic (C-Means) for unsupervised data clustering.
Description:
- Implements Fuzzy C-Means clustering algorithm from scratch
- Soft clustering approach where data points have membership degrees to multiple clusters
- Iterative optimization to minimize cost function
- Tested on multiple datasets with visualization
Key Features:
- Soft Clustering: Each data point belongs to multiple clusters with different degrees
- Elbow Method: Automatic determination of optimal cluster count
- Visualization: Color gradients showing fuzzy membership degrees
- Multiple Datasets: Tested on 4 different datasets
- Iterative Algorithm: Cost function minimization
Technologies: Python, NumPy, Pandas, Matplotlib
Multi-layer neural network built from scratch to classify handwritten digits using the MNIST dataset.
Description:
- Implemented a multi-layered neural network model from scratch
- Trained to recognize and classify handwritten digits (0-9)
- Uses backpropagation algorithm for training
- No deep learning frameworks - pure NumPy implementation
Key Features:
- Dataset: MNIST (60,000 training images + 10,000 test images)
- Architecture: Multi-layer feedforward neural network
- Training: Backpropagation with gradient descent
- Implementation: Built from scratch without frameworks
- Stages: Step-by-step implementation (step5, step6-1, step6-2, step6-3)
Technologies: Python, NumPy, Matplotlib, PIL (Pillow)
Computational-Intelligence-Course/
├── Evolutionary-AI-Game-Project/
│ ├── docs/
│ │ ├── Instruction.pdf # Project specification (Persian)
│ │ └── Report.pdf # Implementation report (Persian)
│ ├── src/
│ │ ├── game.py # Main game implementation
│ │ ├── player.py # Player agent class
│ │ ├── evolution.py # Genetic algorithm implementation
│ │ ├── nn.py # Neural network (feedforward)
│ │ ├── config.py # Configuration settings
│ │ ├── util.py # Utility functions
│ │ └── box_list.py # Obstacle management
│ └── checkpoint/ # Saved evolution states
├── Fuzzy_C-means/ # External repository (submodule)
└── Handwritten-Digit-Recognition/ # External repository (submodule)
| Technology | Purpose |
|---|---|
| Python 3.7+ | Primary programming language |
| NumPy | Numerical computing and matrix operations |
| Matplotlib | Data visualization and plotting |
| Pygame | Game development framework |
| Pandas | Data manipulation and analysis |
| PIL/Pillow | Image processing |
- Python 3.7 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/zamirmehdi/Computational-Intelligence-Course.git
cd Computational-Intelligence-Course- Install required packages:
pip install numpy matplotlib pandas pygame pillowEvolutionary AI Game:
cd Evolutionary-AI-Game-Project/src
python game.py --mode helicopter --play TrueFuzzy C-Means:
cd Fuzzy_C-means
python main.pyHandwritten Digit Recognition:
cd Handwritten-Digit-Recognition/src
python main.pyDetailed instructions are available in each project's directory.
Author: Amirmehdi Zarrinnezhad
Course: Computational Intelligence
University: Amirkabir University of Technology (Tehran Polytechnic) - Spring 2021
Repository Link: Computational-Intelligence-Course
This repository is part of my coursework at Amirkabir University of Technology.
Other Course Projects:
- Artificial Intelligence Course - NLP, Search Algorithms, Pathfinding
Questions or collaborations? Feel free to reach out!
📧 Email: amzarrinnezhad@gmail.com
🌐 GitHub: @zamirmehdi
⭐ If you found this project helpful, please consider giving it a star! ⭐
Amirmehdi Zarrinnezhad