You are on page 1of 20

Islington College

Informatics College Pokhara


ICP logo here

Artificial Intelligence
Coursework 1

Submitted by: Submitted to:


Student's name Write the name of the tutor here
Abhishek Humagain Mr. Ashim Lamichhane
15043738
Student's id

Group: L3C1
Student's group
th
Date: 17 January,
Submission date 2018
Table of Contents
1. Introduction ............................................................................................................................. 1
1.1 Explanation of the topics .................................................................................................. 2
1.2 Reason for selection ......................................................................................................... 2
2. Mind Map................................................................................................................................ 3
2.1 Description and design of mind map................................................................................ 3
2.1.1 Mind Map 1............................................................................................................... 3
2.1.2 Mind Map 2............................................................................................................... 4
2.1.3 Mind Map 3............................................................................................................... 5
2.1.4 Mind Map 4............................................................................................................... 6
2.1.5 Mind Map 5............................................................................................................... 7
2.2 Graphical summary .......................................................................................................... 8
2.2.1 Graphical Summary 1 ............................................................................................... 8
2.2.2 Graphical Summary 2 ............................................................................................... 8
2.2.3 Graphical Summary 3 ............................................................................................... 9
2.2.4 Graphical Summary 4 ............................................................................................... 9
2.2.5 Graphical Summary 5 ............................................................................................. 10
3. Development ......................................................................................................................... 11
3.1 Pseudo code for the solution .......................................................................................... 11
3.2 Concept proof ................................................................................................................. 13
4. Analysis................................................................................................................................. 14
4.1 Concept analysis ............................................................................................................. 14
4.2 State transition diagram .................................................................................................. 15
5. Conclusion ............................................................................................................................ 16
References ..................................................................................................................................... 17
Table of Figures
Figure 1: Mind Map 1 ..................................................................................................................... 3
Figure 2: Mind Map 2 ..................................................................................................................... 4
Figure 3: Mind Map 3 ..................................................................................................................... 5
Figure 4: Mind Map 4 ..................................................................................................................... 6
Figure 5: Mind Map 5 ..................................................................................................................... 7
Figure 6: Graphical Summary NLP ................................................................................................ 8
Figure 7: Graphical Summary Intelligent Agent ............................................................................ 8
Figure 8: Graphical Summary Neural Network .............................................................................. 9
Figure 9: Graphical Summary Game theory ................................................................................... 9
Figure 10: Graphical Summary Fuzzy logic ................................................................................. 10
Figure 11: State Transition Diagram............................................................................................. 15
1. Introduction
Artificial Intelligence is taking over the world; in every field of it has been making
things easier. Even in the field of relationship, it has been of huge help to people. Yes, a
recommendation system, a part of AI and dating application or site are the perfect example
that can be taken for recommendation system.
Every people want someone in their life that might be a friend or a partner. People
share their happiness, their sorrows with their loved ones. As technology is changing the
world, it is changing the views of people that they could only talk when they would meet
physically. But, the dating site and applications have been changing the perspective of
people. Many countries have dating apps which are used worldwide, but our country
doesn’t have one for ourselves. So, people of our country use dating app of other countries.
In order to fill this gap, we propose to develop own dating application.
This is the individual report for the project done in Artificial Intelligence module.
In this report, the topic that we are going to do project on is explained and also the reason
for selecting that topic is stated. As the project is the dating application, the mind map
according to the need of topic is described and designed and the graphical summary as per
lecture is also made. In the development part, pseudo code for the project and the
uniqueness of the project is also described and at last the diagram to show the
transformation of the different states within the application.

Abhishek Humagain CU6051NI 1|Page


1.1Explanation of the topics
For the project of module Artificial Intelligence, we have chosen the topic
recommendation system. Recommendation system have become an important tool to help
users to deal with information overload and the abundance of choice (Petˇr´ıˇcek1, 2017).
But hearing the term recommendation system, people think of recommending items or
movies, books to next person. But in this project, recommendation system is going to be
used to recommend person to person not an item to person. So, the topic we chose for this
module, Artificial Intelligence, is a dating application, named Maya in android. In this
dating application, recommendation system is used to match the people of common
interests. Dating application is a prime area for the recommendation system, as users face
an abundance of choice and must act in limited information (Wayne Wobcke, 2015).
The match making process is done on the basis of user taste, which is their interests,
hobbies, likes, dislikes. All this data can be found in users Facebook and also with the help
of user input which will be done when the user login to the application. There are many
chances to find person like you with same taste of things, from which user can be
comfortable and be friends. In this application, when two users are matched then their
profile will be shown to each other informing that they have been matched and then the
user can decide after viewing their profile whether to chat or ignore the other. If they chose
to chat then they can use chat application in the same application and if ignore then they
cannot chat with each other.

1.2Reason for selection


The reasons for selecting this project is stated below:
➢ Dating application is the prime area for the recommendation system.
➢ Dating site might be difficult for many users so application will help them find
people to date easily
➢ Lack of dating application in Nepal.
➢ To show the use of recommendation system in real time.

Abhishek Humagain CU6051NI 2|Page


2. Mind Map
2.1Description and design of mind map
2.1.1 Mind Map 1

Figure 1: Mind Map 1


This is the first mind map, in which we have done initial research on our project topic. Our
project topic is a dating application. In this application the match making is done with the use of
recommendation system, within this we have done some research on collaborative filtering.
Environment is selected as mobile phone and within it android phone and database is SQLite.
Vision for match making is user profile and users interest and hobbies.

Abhishek Humagain CU6051NI 3|Page


2.1.2 Mind Map 2

Figure 2: Mind Map 2


In this second mind map, more research was done and fields were found as in environment,
it was clear to use python server and database as SQLite. Also, the application was fixed to be
developed in android using kotlin. Vision was not clear so research was going on and in this mind
map same as first mind map, interest and hobbies, user profile was kept and user past matches
were added. In actuators chat interface was added and in recommendation also, more algorithms
were researched like, content based filtering, clustering, user based filtering and item based
filtering in collaborative filtering.

Abhishek Humagain CU6051NI 4|Page


2.1.3 Mind Map 3

Figure 3: Mind Map 3


In this mind map, Vision was cleared as using Facebook graph API. In environment,
wireframes were made for the app and xml layouts as views were decided. All other were as it is
as shown in figure above.

Abhishek Humagain CU6051NI 5|Page


2.1.4 Mind Map 4

Figure 4: Mind Map 4


In this fourth mind map, more number research and work were done. Application
development was started along with research on recommendation system. In the views, activity
was selected and started to build as shown in figure and permission that should be taken from user
were also decided. Further research in recommendation system were also done and basic algorithm
was also started.

Abhishek Humagain CU6051NI 6|Page


2.1.5 Mind Map 5

Figure 5: Mind Map 5


This is the last mind map, in this all the parts were cleared and algorithm also was started
according to content based filtering. Here, in recommendation according to the content based
filtering, categories or user’s likes are taken which are movies, tv series, music etcetera. Then the
group of category example movies, by its features which are action, drama, adventure and then the
number of features that occurs are count and Euclidian’s distance between users based on the
counts are calculated and at last the sorting is done on the matched users by Euclidian’s distance
from highest.

Abhishek Humagain CU6051NI 7|Page


2.2Graphical summary
2.2.1 Graphical Summary 1

Figure 6: Graphical Summary NLP


2.2.2 Graphical Summary 2

Figure 7: Graphical Summary Intelligent Agent

Abhishek Humagain CU6051NI 8|Page


2.2.3 Graphical Summary 3

Figure 8: Graphical Summary Neural Network


2.2.4 Graphical Summary 4

Figure 9: Graphical Summary Game theory

Abhishek Humagain CU6051NI 9|Page


2.2.5 Graphical Summary 5

Figure 10: Graphical Summary Fuzzy logic

Abhishek Humagain CU6051NI 10 | P a g e


3. Development
3.1Pseudo code for the solution
Begin Procudure rank_by_category
category <- from parameter
target_user <- from parameter
users <- parameter
users_and_score <- Initialize an empty list
For Each user In users
If user.id not equal to target_user.id Then
category1 <- get category data of target_user
category2 <- get category data of user
users_score <- calculate_distance(category1, category2)
Append a tuple (user, users_score) to the list user_and_score
End If
End
sorted <- sort users_and_score by second element of tuple, score
return sorted
End
Begin Procedure calculate_distance
category1<- from parameter
category2 <- from parameter
Initialize sum_of_squares to 0
For each key, value in category1.items
If key is in category2 Then
squares <- square of (category1[key] - category2[key])
sum_of_squares = sum_of_squares + squares
End if
End for

Abhishek Humagain CU6051NI 11 | P a g e


Return 1/sum_of_squares
End
Begin Procedure recommend
target_user <- from parameter
users <- get all users from user table from database
list_of_categories = [‘movies’, ‘tv series’, ‘music’, ...]
Initialize an empty dictionary recom_dict
For each category in list_of_categories
recom_users = rank_by_category(catgory, target_user, user)
recom_dict[category] <- first 5 items from recom_users
End For
Return recom_dict
End Procedure

Abhishek Humagain CU6051NI 12 | P a g e


3.2Concept proof
The recommendation system is a common topic while talking about the Artificial
Intelligence, but it can be used in a wide range of fields. We can take the example of
YouTube, Amazon, Netflix who have used recommendation system for the benefits of
users.
Talking about the dating application, tinder is a recommendation system in it
because it recommends user based on certain criteria like city, gender, age group, and user
can swipe for match making, when both user swipe right for each other then they got
matched and can talk with each other. Like this application, which is perfect example for
recommendation system, we have selected our project as a dating application to show a
working example of recommendation system.
This concept is unique in the context of our country Nepal and as well in the college
project because there is not a single dating application in Nepal. Also in this module. no
one have proposed this system for the module project.

Abhishek Humagain CU6051NI 13 | P a g e


4. Analysis
4.1Concept analysis
The first method that came to our discussions was counting similar likes in
Facebook between users. This method is somewhat naive and limited because it assumes
one user must, for example, watch or listen to exact same movie or music as the other to
establish a degree of similarity between them. So, with the help of our supervisor, we
thought of a better process. Instead of naively matching the likes or the pages in Facebook,
we decided to work on the category level of the likes - movies, music, tv series, etc. Then
we would count the features (for example, genres like action, adventures in case of movies),
that occur across all the likes, and calculate Euclidean distance between two users for each
category. Then matching users are sorted by their distance starting from maximum. It was
sensibly difficult to combine the result from different categories in any way, so with the
suggestion of our supervisor, we calculated the ranking of users for each category
separately and mixed them to show to the user. This method accounts for the fact that users
who have not watched exactly same movies can also have similar taste, and in the
conversation, that they can actually recommend each other new movies of similar genre.
In the future after deployment, we would keep the track of the times a user has
successfully connected with others according to our recommendations. We would then find
out the performance of the system by dividing the number of successful connections by
number of times recommendations ran. We would also set some kind of weight when a
user skips recommended users by system so that the consequent recommendations will get
better.

Abhishek Humagain CU6051NI 14 | P a g e


4.2State transition diagram

Figure 11: State Transition Diagram

Abhishek Humagain CU6051NI 15 | P a g e


5. Conclusion
Seeing the market and needs of online dating application backed by data science
and machine learning, we proposed and started working on the project. We made sure we
followed a proper process of software engineering, including researching, designing,
developing, documenting, etc. in building the recommendation system and application, so
that we would be more likely to reach our goal.

Abhishek Humagain CU6051NI 16 | P a g e


References
Petˇr´ıˇcek1, L. B. a. V., 2017. brozovsky07recommender.pdf. [Online]
Available at: http://www.occamslab.com/petricek/papers/dating/brozovsky07recommender.pdf
[Accessed 13 January 2017].
Wayne Wobcke, A. K. Y. S. K. X. C. M. B. P. C. a. A. M., 2015. A Deployed People-to-People
Recommender System in Online Dating. A Deployed People-to-People Recommender System in
Online Dating, p. 14.

Abhishek Humagain CU6051NI 17 | P a g e

You might also like