AI (Prolog) LabProjectReport
AI (Prolog) LabProjectReport
SMARTPHONE RECOMMENDATION
SYSTEM FOR OPTIMAL SMART
COMPUTING DEVICE PURCHASE
SUBMITTED TO:
PROFESSOR
UNIVERSITY OF CHITTAGONG
SUBMITTED BY:
MAMUN AL IMRAN
ID: 17701072
SESSION: 2016-2017
7th SEMESTER
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
UNIVERSITY OF CHITTAGONG
CONTENTS
Serial Topics Page
1 Introduction 1
2 Problem Statement 1
4 Design 1
5 Code 2
6 Screenshots 4
8 Conclusion 8
9 References 8
1. Introduction
We are living in the age of “4th Industrial Revolution” that is also known as “Industry 4.0”. It is quite
natural that the consumer demand for smart phones will increase exponentially in this era. As the
traditional services are getting more and more automated, people on Earth are willing more and more to
own smart phones. There is enormous number of smartphones available with enormous amount of
features in the market now. It seems like there is a sea of smartphones.
2. Problem Statement
Now-a-days consumers get it difficult enough selecting the best smartphones according to their budget
and/or need. Addition of newer and newer features in such devices increases complexity in the problem.
In order to solve this problem I’m proposing a system that is made up using Turbo PROLOG.
The system I developed requires knowledge base consisting of the features of various smartphones.
The users will enter their desired features and their budget and then the system will show them the
optimal smartphones that they can grab in current market situation.
The system must have a rich knowledge base that stores information about various smartphones. It
must also have smart clauses and predicates for handling versatile recommendations.
4. Design
The official handbook for Turbo Prolog [1] contains step-by-step tutorials, demo programs and source
codes to follow. The Google Scholar profile of our honorable teacher Professor Dr. Mohammad
Shahadat Hossain [2] also contains many thought provoking articles on AI. So, I followed both the
book and his profile for designing my system.
The following figure represents the knowledge base, the inference engine and a new knowledge of the
system.
smartphone(samsung,…) Company=samsung,
smartphone(huawei,…) Model=galaxy_A21s,
smartphone(apple,…) Inference Battery_mAh=5000
smartphone(xiaomi,…)
...
Knowledge Base New Knowledge
Figure: the Knowledge Base, the Inference Engine and a New Knowledge
1
The system I developed depends much on knowledge base that houses specifications of a number of
smartphones. For specifications I used the GSM Arena website[3]. The following figure shows the
flowchart of the system.
5. Code
/* Lab Project */
domains
sd_support_GB = integer
predicates
2
smartphone(brand, model, CPU, GPU, ram_GB, rom_GB, sd_support_GB, f_cam_MP,
b_cam_MP, battery_mAh, screen_In, colors, weight_gm, price_tk)
start
clauses
3
smartphone(apple, iphone_12, a14_bionic_hexacore, apple_GPU, 4, 128, 0, 12, c12_12_12,
2815, 6.1, black_white_red_green_blue, 164, 124999).
start:-
write("It helps to find the smartphones for your preference"), nl, nl,
write("If you want to ignore any feature, please, put an '_' (underscore) in its place.").
6. Screenshots
Figure: Screenshot 1
4
Figure: Screenshot 2
Figure: Screenshot 3
5
Figure: Screenshot 4
Figure: Screenshot 5
6
7. Test Cases and Results
: start
Smartphone
Recommendation
System
If you want to ignore any feature, please, put an '_' (underscore) in its place.
5 solutions
3 solutions
7
8. Conclusion
I tried my best to make the system user friendly. I hope that the system will be much beneficial to the
users in finding the best smart devices to buy. Buying the best suitable device will enable the users to
save a large amount of money and time.
9. References
3. www.gsmarena.com