0% found this document useful (0 votes)
15 views10 pages

AI (Prolog) LabProjectReport

Uploaded by

sciemontist
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

AI (Prolog) LabProjectReport

Uploaded by

sciemontist
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

REPORT ON

SMARTPHONE RECOMMENDATION
SYSTEM FOR OPTIMAL SMART
COMPUTING DEVICE PURCHASE

COURSE CODE: CSE 714

SUBMITTED TO:

DR. MOHAMMAD SHAHADAT HOSSAIN

PROFESSOR

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

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

3 Aims and Objectives 1

4 Design 1

5 Code 2

6 Screenshots 4

7 Test cases and Results 7

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.

3. Aims and Objectives

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.

Figure: Flowchart of the Smartphone Recommendation System

5. Code

/* Lab Project */

domains

brand, colors, model=symbol

CPU, GPU, b_cam_MP = symbol

sd_support_GB = integer

ram_GB, rom_GB, battery_mAh = integer

screen_In, weight_gm, f_cam_MP, price_tk = real

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

smartphone(samsung, galaxy_M01, qualcomm_snapdragon_octacore, adreno505, 3, 32, 64, 5,


c13_2, 4000, 5.7, black_red_blue, 168, 11999).

smartphone(samsung, galaxy_A2_Core, exynos_octa, mali_T830_MP1, 1, 16, 256, 5, c5, 2600,


5, black_blue, 142, 6990).

smartphone(samsung, galaxy_A21s, exynos_octa, mali_G52, 3, 32, 512, 13, c48_8_2_2, 5000,


6.5, black_white_blue_red, 192, 19999).

smartphone(samsung, galaxy_A21s, exynos_octa, mali_G52, 4, 64, 512, 13, c48_8_2_2, 5000,


6.5, black_white_blue_red, 192, 16999).

smartphone(samsung, galaxy_A21s, exynos_octa, mali_G52, 4, 128, 512, 13, c48_8_2_2, 5000,


6.5, black_white_blue_red, 192, 21999).

smartphone(huawei, y6_pro, mediatek_helio_quad, powerVR_GE8320, 3, 32, 512, 8, c13, 3020,


6.09, midNightBlack_saphireBlue, 150, 11999).

smartphone(huawei, nova8_SE_high_edition, mediatek_Dimensity800, mali_G57_MC3, 8, 128,


0, 16, c48_8_2_2, 3800, 6.53,
deepSeaBlue_MagicNightBlack_SilverMoonStars_SakuraSnowClearSky, 178, 45300).

smartphone(apple, iphone_12_pro_max, a14_bionic_hexacore, apple_GPU, 6, 128, 0, 12,


c12_12_12, 3687, 6.7, silver_graphite_gold_pacificBlue, 228, 161999).

smartphone(apple, iphone_12_pro, a14_bionic_hexacore, apple_GPU, 6, 128, 0, 12, c12_12_12,


2815, 6.1, silver_graphite_gold_pacificBlue, 189, 119000).

smartphone(apple, iphone_12_pro, a14_bionic_hexacore, apple_GPU, 6, 256, 0, 12, c12_12_12,


2815, 6.1, silver_graphite_gold_pacificBlue, 189, 126000).

smartphone(apple, iphone_12_pro, a14_bionic_hexacore, apple_GPU, 6, 512, 0, 12, c12_12_12,


2815, 6.1, silver_graphite_gold_pacificBlue, 189, 137000).

smartphone(apple, iphone_12, a14_bionic_hexacore, apple_GPU, 4, 64, 0, 12, c12_12_12, 2815,


6.1, black_white_red_green_blue, 164, 117999).

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).

smartphone(apple, iphone_12_mini, a14_bionic_hexacore, apple_GPU, 4, 128, 0, 12, c12_12,


2227, 5.4, black_white_red_green_blue, 135, 109999).

start:-

write(" Smartphone Recommendation System"), nl,nl,

write("It helps to find the smartphones for your preference"), nl, nl,

write("Please Enter: 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>)"),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

The user starts using the program with typing start.

: start

Smartphone

Recommendation

System

It helps to find the smartphones for your preference

Please Enter: 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>)

If you want to ignore any feature, please, put an '_' (underscore) in its place.

:smartphone(Company, Model, _, _, _, _, _, _, _, _, _, _, _, Price) and Price<20000

Company=samsung, Model=galaxy_M01, Price=11999

Company=samsung, Model= galaxy_A2_Core, Price=6990

Company=samsung, Model= galaxy_A21s, Price=19999

Company=samsung, Model= galaxy_A21s, Price=16999

Company=huawei, Model=y6_pro, Price=11999

5 solutions

: smartphone(samsung, galaxy_A21s, _, _, RAM, ROM,_, _. _. Battery, _, _, _, Price)

RAM=3, ROM=32, Battery=5000, Price=19999

RAM=4, ROM=64, Battery=5000, Price=16999

RAM=4, ROM=128, Battery=5000, Price=21999

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

1. Turbo Prolog Owner's Handbook

2. Google Scholar Profile of Professor Dr. Mohammad Shahadat Hossain


(https://scholar.google.dk/citations?user=0wRP4OsAAAAJ&hl=en)

3. www.gsmarena.com

You might also like