Implementation of JIProlog on an Android-based Song Expert System to Provide Song Recommendations Based on 16 Human Personality Types

Songs can be enjoyed by someone both in sad and happy heart conditions. The genres of songs are very diverse according to the personality that a person has. Songs also always get attention in society. However, the problem often experienced by some people who rarely enjoy songs is that they don't know what songs suit their personality when they want to listen to music. The purpose of this research is to develop an Android-based Song Expert System application with the implementation of the Java Internet Prolog (JIProlog) library. The method used in designing this expert system is forward chaining; this method aims to browse data on a knowledge base logically. The results of this application will provide song recommendations based on 4 dimensions of personality, namely, dimension 1 (introvert/extrovert), dimension 2 (sensory/intuitive), dimension 3 (thinking/feeling), and dimension 4 (judging/perceiving). Of the 16 human personalities, each personality type will be given 3 song genres. So that users can choose a variety of songs that suit their personality. The test results show that the system successfully displays recommendations with the knowledge base, but the resulting song recommendations still have limitations. Hopefully, this song expert system can help someone get songs that match their personality and the condition of the heart that is being experienced.


A B S T R A C T A R T I C L E I N F O
Songs can be enjoyed by someone both in sad and happy heart conditions.The genres of songs are very diverse according to the personality that a person has.Songs also always get attention in society.However, the problem often experienced by some people who rarely enjoy songs is that they don't know what songs suit their personality when they want to listen to music.The purpose of this research is to develop an Android-based Song Expert System application with the implementation of the Java Internet Prolog (JIProlog) library.The method used in designing this expert system is forward chaining; this method aims to browse data on a knowledge base logically.The results of this application will provide song recommendations based on 4 dimensions of personality, namely, dimension 1 (introvert/extrovert), dimension 2 (sensory/intuitive), dimension 3 (thinking/feeling), and dimension 4 (judging/perceiving).Of the 16 human personalities, each personality type will be given 3 song genres.So that users can choose a variety of songs that suit their personality.The test results show that the system successfully displays recommendations with the knowledge base, but the resulting song recommendations still have limitations.Hopefully, this song expert system can help someone get songs that match their personality and the condition of the heart that is being experienced.

INTRODUCTION
Songs are one of the entertainments that someone can enjoy in sad and happy heart conditions.Because the genres in songs are very diverse with their respective characteristics that can match a person's personality.Songs also always develop in every era and get community attention.Songs occupy the 1st place in search queries made by YouTube users in Indonesia with an index value of 100, karaoke and dangdut occupy the 6th and 7th positions with index values of 18 and 14, and children's songs are in 16th position with index value of 8.
A problem often experienced by some people who rarely enjoy songs is when they want to listen to music but don't know what song suits their personality.).Some platforms that can be used to enjoy songs can usually provide song recommendations based on songs often heard before.So, those who rarely want songs have to play one by one the songs that seem right and good for them to listen to.Therefore, there needs to be an effective, efficient, and appropriate solution to providing song recommendations.
To be able to provide recommendations, a system must have intelligence.The intelligence can be in the form of the intelligence supplied by the creator or intelligence learned by the system itself.This is what is commonly called artificial intelligence.One of the fields of artificial intelligence is expert systems.Expert systems can adopt the knowledge possessed by an expert in their field.In general, expert systems can review the solutions and advice they have provided based on the knowledge present in the system.In addition, expert systems offer the possibility of flexibly integrating new knowledge with existing knowledge.
Based on references in previous years regarding the Prolog (Kowalski & Sadri, 2016;Koch et al., 1996;Dovier et al., 1996), one way of implementing expert knowledge into an expert system is by using Prolog (Programming in Logic).However, based on the literature review that researchers have done (Maulina et al., 2013;Salisah et al., 2015), standard expert systems made with Prolog are usually limited to the SWI Prolog interpreter application.So, it is complicated to be used by the general public to provide tangible benefits.And there is no user interface in the program, only a command line that is unlikely to be understood by everyone.
Based on this condition, this is the background for researchers to create an "Android-Based Song Expert System to Provide Song Recommendations Based on 16 Personality Types with a Knowledge Base Using Prolog".It is hoped that the expert system developed can help someone who wants to enjoy a song that suits their personality and the mood being experienced.

METHODS
The product we developed is a system to determine the type of song that matches the personality and mood that the user is experiencing.This system belongs to the field of artificial intelligence, which is commonly called an expert system.The knowledge base in this system is built with Prolog, which is implemented in Android applications using the help of the JIProlog library as an interpreter.And we are using the forward chaining method on the inference engine in determining song recommendations in the knowledge base.
Based on references in the previous years regarding Forward Chaining (Ariawan et al., 2016;Darmansyah et al., 2021;Harjanto et al., 2018;Hayadi et al., 2018;Putri et al., 2020;Rupnawar et al., 2016)  facts or statements starting from the left side; that is, reasoning starts from the points first to test the truth of the hypothesis.

Music genres based on personality
The following in

Artificial intelligence products
In determining song recommendations, according to some previous references (Ji et al., 2015;Sánchez-Moreno et al., 2020;Kindra et al., 2021;Setiawan, 2021), the system needs to know in advance the facts of the user.Starting from knowing the personality of the MBTI test, which consists of 4 dimensions following some previous references (Dargis et al., 2015;Bess & Harvey, 2002).Dimension 1 to determine "How do users exert and receive energy?" i.e., Introvert or Extrovert; Dimension 2 to determine "How do users take in information?"i.e., Sensory or Intuitive; Dimension 3 to determine "How do users make conclusions and make decisions in life?" i.e., Thinking or Feeling; and Dimension 4 "How do users deal with the outside world?" i.e., Judging or Perceiving, as well as knowing "What is the user's current mood?" i.e., happy or sad.
After knowing these facts, the system will conclude what songs are appropriate based on its knowledge base.Furthermore, it will be presented as a list of songs and connected to the YouTube application to enjoy the suggested song directly.(De Mel et al, 2013;Riza and Nugroho, 2020)

Knowledge base in Prolog
The following logic rules are created to determine a person's personality based on the 4 dimensions tested in MBTI (Chi & Chen, 2009;Drnevich, 2006;Sidran and Kearney, 2003).The following logical rules were created to determine songs based on personality and happy mood.

System Architecture and Workflow
The process of determining song recommendations on the knowledge base using an inference engine with the forward chaining method can be seen in Figure 1.An example of a query run to determine the personality type personality(X, introvert, intuitive, thinking, perceiving).And to select the song song(L, G, happy, intp).In doing prologue queries, it is very concerned about uppercase and lowercase letters.So, it needs to be a concern to adjust to the knowledge base that has been created.But because the prologue system that has been made is implemented into an Android application, the

Figure 1 .
Figure 1.Forward chaining of song expert system

Figure 2 .
Figure 2. Query prologue of song expert system

Table 1
(Dargis, M., et al. 2015)ward music based on 16 personality types, and in Table2, the types of music genres are based on 16 personality types(Dargis, M., et al. 2015)

Table 1 .
Navigating music by genre