Automated Study Plan Generator using Rule-based and Knapsack Problem

—Undergraduate students are given the flexibility of arranging courses throughout their study duration especially when they are eligible for credit exemption for the courses taken during their diploma study. Issues arise when students arrange their studies manually. Improper course arrangement in the study plan may be resulting some of the selected courses do not correspond to the courses offered, and imbalance credit hours. Hence, this study aims to propose an algorithm to generate an automated and accurate study plan throughout the study duration. A combination of rule-based and knapsack problem were proposed to generate an automated study plan. A quantitative methodology through expert’s reviews and questionnaire survey was conducted to evaluate the accuracy of the proposed algorithm. The proposed algorithm shows high accuracy. In conclusion, the combination of rule-based and knapsack problem is appropriate to generate an automated and accurate study plan. The automated study plan generator can help students generate an effective study plan.


INTRODUCTION
Study planning is important to ensure the students carry a balance study load in every semester. The balance of courses and the number of credit hours chosen by the students themselves determine the planning of non-burdensome study sessions. Students need to allocate time (also known as student learning hours) for the implementation of all learning activities to achieve the learning outcomes. The student learning hours includes formal meetings (e.g., lectures), guided learning (e.g., tutorials, seminars, internships, and fieldwork), self-directed learning, and preparations for tests and final exams. A balance study load could influence the student's academic performance. Study planning is becoming more critical for undergraduate students who are eligible for credit exemption for the courses taken during their diploma study. When each student has a different number of total credit exemptions, the difference becomes more pronounced. As a result, different study plan is devised for each student. With a well study plan, students may shorten their undergraduate study depending on the total credit exemption.
Study planning is tied to academic rules. For instance, students are allowed to take minimum of 12 credits (exception on the last semester of study), and maximum of 20 credits per semester. Besides, a prerequisite course must be completed prior to another course. Moreover, not all courses are available in every semester. Some courses are only available in odd semesters, while others are only available in even semesters. Therefore, courses should be arranged according to the curriculum structure, and total credit hours per semester should be divided appropriately. The study plan should not interfere with the learning journey.
The field of artificial intelligence (AI) and knowledgebased system has enormous potential for improving simulation modelling support [1,2]. Due to recent advances in the field of AI, a knowledge-based system has demonstrated its abilities by providing successful solutions in a wide range of applications including in the field of education [2], agriculture [3], manufacturing [4], and health [5]. The system can be used as an alternative to traditional systems, particularly in advisory tasks and symbolic reasoning [6]. It is a subfield of AI that collects data automatically without the assistance of a human expert to solve problems that normally necessitate human intelligence [7,8].
Rules can be viewed as a simulation of the cognitive behavior of human experts. A rule-based expert system can mimic the ability of human experts to make decisions [9], [10]. They are programmed to solve problems in the same way that humans do, by using stored human information or expertise. Rule-based structures are created to solve specific problems in a given domain. Every domain has its own set of intelligent and reasoning humans that can be modelled and even replaced by automated rule-based systems. A system generator based on a rule engine that uses an improved Rete algorithm was designed to match data objects to perform certain functions through a system generator using rules set by the user (production) [11]. The rule engine's primary responsibility is to match the data objects submitted to the engine with the business rules, activate the business rules based on the current data state, and trigger the operations in the application based on the execution of logic declared in the ruleset. Reference [12] states that the problem of scheduling by minimizing the amount of flow time has attracted more attention from the research community. This is because the lower the total flow time value, the greater the resource utilization and cost savings. In this regard, today's manufacturing environment is quite practical, as it reduces the amount of flow time. Several tasks comprised of some sequences are utilized to determine optimal values for minimizing overall flow time; to provide good solutions as the problem size expands the development of heuristics and metaheuristics is essential. In the study, a ruled-based heuristic process for determining the sequence with the least total flow www.ijacsa.thesai.org time is proposed. The experimental results show that the proposed approach makes a major contribution to the exceedingly difficult scheduling problem.
The basic principle of all knapsack problem families is to choose a few objects, each with a benefit and weight value, to be packed into one or more capacity knapsacks. Assume there is a group of elements with known weights and values, as well as a pack or bag with a limited capacity for filling the knapsack. A problem known as the knapsack problem is devised to fill the said pack with the elements in such a way that their aggregate sum is possibly the highest without exceeding the pack's ability [13]. Knapsack Problem 0-1 is a popular form of knapsack problem with a wide range of applications, including capital budgeting, project selection, resource allocation, cutting stock, and investment decisionmaking. As a result, the issue of Knapsack Problem 0-1 optimization has drawn the attention of an increasing number of researchers [14]. GRASP technique was applied to a nursescheduling problem where the goal is to optimize a collection of preferred courses to a set of binding constraints [15]. A critical challenge is striking a balance between feasibility and optimality. Construction heuristics, neighborhood search methods, and evolutionary algorithms have all been effectively utilized to solve real scheduling issues. However, there is a frequent conflict between feasibility and solution quality, as well as difficulties in maintaining an appropriate balance between goals. This is solved by employing a knapsack problem, which ensures that the solutions generated by the construction heuristic are simple to fix. A diversification approach and a dynamic assessment criterion improve the optimum combo even further.
Study in [16] developed an automatic course planning system by using ontology and rule-based. The aim was to create a suitable course plan for a group of students according to the course prerequisite requirement, complexity of the course, teaching method, and the duration of the course. However, the course planning system did not include the course scheduling for a complete study duration from year one until end of study duration. Machine learning techniques were used to group students into similar study pattern according to the CGPA achievement and subsequently determine a feasible study path for the forthcoming semester [17]. Specifically, Neural Network algorithm is used for creating CGPA prediction models, and K-means algorithm is applied to group students according to the similarities of their grades in each course. The evaluation of the proposed system revealed that the students have improved their study performance for their ultimate CGPA in graduation. However, the proposed system does not consider the duration of the study completion, the course prerequisite requirement, and total number of credits in a semester. Moreover, [18] in their research work addressed the issue of determining the ideal set of courses to provide students with in a particular semester, while taking into account the required courses and the availability of teachers to teach those courses. The use of CourseScheduler, IApplet and AdmValidatorApplet function altogether helps the authors to achieve their aim successfully. However, the research focused on the creating a schedule of classes that aid the department administrative in the course scheduling rather than the study plan for students. The method to assist students generating study plan is lacking. Based on these limitations, this study aims to propose and validate an algorithm for compiling study plans throughout the study duration. A more in-depth investigation was conducted to assess the method's accuracy and usefulness.

II. BACKGROUND
A direct entry student is defined as a student who pursues a degree from a particular institution or a university with a particular completed diploma degree. Compared to direct admission students, direct entry students are allowed to make credit exemption. Credit exemption is a provision of the academic regulations under the semester system that aims to facilitate student mobility. For an instance, students must complete a diploma with at least a 3.00 CGPA from an institution and the courses pursued must be recognized by the senate as equivalent and meet the curriculum requirements of the program pursued or in their respective field of study. Credit exemption may be granted to students who have taken equivalent courses and passed with a minimum grade of C using the university's grading system, provided that at least 80% of the learning content is equivalent. The amount of credit exemption allowed should not exceed 30% of the total credits of the graduating requirements.
Academic handbooks have become a reference for students, containing important information about students' curriculum structure according to a specific program. Courses are divided into four categories, namely general module (W), core module (P), specialization module (K), and free module (E). Table I explains the course category. All courses are categorized as W and are not allowed for credit exemption.  Table II shows the list of course code and name. Students must meet all components of the code to complete a total of 120 credit hours.

III. ALGORITHM IMPLEMENTATION INTO UNIVERSITY RULE
Rule-based expert system is based on knowledge that collects a range of factual information, and makes actions through interpretation from a set of predefined rules [19]. Certain courses have rules that must be followed to complete the semester. According to the rules, the proposed algorithm will decide whether or not to include the course. For the arrangement of study plans, a new rule is proposed to control the arrangement of schedules according to the selected semester. The selection of courses is based on the current semester offers and availability through the knapsack problem method until the credit hour rate reaches a predetermined limit.
Normal students must complete all 120 credits in a minimum of 7 semesters. However, direct entry students have the option to shorten the semester depending on the total number of credit exemption approved. Alternatively, students can stay with 7 semesters as offered with lower credit hours. The first step is to determine the maximum number of semesters according to the total number of credit exemption approved. Then, the total credit hour in a semester is calculated to ensure a balance credit taken by students in every semester, and to ensure that the total credit hours to be taken do not exceed the stipulated conditions. Fig. 1 depicts the semester calculation step as well as the total credit hours in a semester according to total credit exemption approved.
Equation (1) shows the calculation of total credit hours in a semester (tch). (1) where 120 is the minimum graduating credit, tce is total credit exemption, 12 is the Industrial Training credit, and ts is the total number of semesters. Industrial Training is a mandatory requirement for students at the end of the semester before graduation. Hence, the industrial training credit and the semester are deducted to calculate tch. To make the calculation method simpler, the maximum amount generated will be added to a value of 1 for the semester when the calculation result produces a decimal number and the decimal part is removed as shown in Fig. 1. This is because the number of available credits offered varies and there are no credit hours in decimal form. Using this formula, the total credit hours will not fall below the semester's minimum total credit of 9 and will not exceed the semester's maximum total credit of 20. 397 | P a g e www.ijacsa.thesai.org for each course. The course is thus removed from the list of available courses because it has become a rule that must be followed. Using the proposed rule-based approach, several courses must be prioritized to ensure the planned flow runs smoothly. Overall, rule-based algorithm is applied to:  determine number of semesters study  prioritize University Compulsory Courses to be arranged in the semester according to the program curriculum structure.
 prioritize program core courses according to the prerequisite and semester offered.
 prioritize specialization courses according to the prerequisite and semester offered  prioritize English courses according to the pre-requisite and semester offered.
The parameters used for configuring the rule-based algorithm include the total credit hours, exempted courses and their credit hours, course prerequisites, program curriculum structure and course details. The course details including course name, course code, course category, credit hours, and the semester offered according to odd or even semesters.

A. General Rule for Seven Semesters of Study
Students who only receive credit exemption ranging from 3 to 15 credit hours are advised to complete seven semesters of study. This is because the number of exemption hours is insufficient to reduce the study time. However, students can reduce the credit hours for the coming semesters. The rule prioritizes the courses categorized as W and K to be arranged in the semester according to the curriculum structure as depicted in Fig. 2.  Fig. 3 illustrates how the rules for 6 semesters are applied. For all programs offered at the faculty, workshops (P1 and K1) are the main course at the core of the program. The P1 course is available in both semesters, but the K1 course is only offered in the odd semester. Therefore, students are encouraged to take P1 early in the semester so that they can enroll K1 in the subsequent odd semester with 3rd year students. Then, students are allowed to take final project courses in the following semester. Moreover, P4 (Programming Technique) is the pre-requisite course of P1. In this way, planning to shorten the semester is more structured because the core courses can be enrolled in the appropriate semester. P1 and K1 are given priority because they are the backbone of the study plan and are divided into six semesters. According to the curriculum structure, these workshop courses are only offered in odd semesters. In semester 1, the algorithm will check the pre-condition status of the P1 course first before allocating the course in a semester. If the requirements are not complied with, students will first consider the P4 and change P1 to the second semester. The group for K1 comprises direct entry students and normal entry students. Hence, the course must be offered in semester 3 to ensure the direct entry students can be assigned in groups. This is equivalent to semester 5 of normal students. Next, English courses are placed in the earlier semester such as English for Academic Purpose (W1), sorted to semester 1, English for Academic Purposes (W2), sorted to semester 2, and English for Professional Interaction (W3) at semester 3. The next rule ensures the selection of co-curriculum courses. The method is the same as the prerequisites by ensuring that co-curriculum courses are not taken in the same semester and Co-Curriculum II (W5) does not precede Co-Curriculum I (W4).

C. Course Specialization Rules
In addition, specialization based on the program taken by the students is emphasized. This is because these courses are only concentrated among the same programs. The students are not permitted to join specialization classes of other programs. Since specialization courses are offered at a particular semester, a rule is made to allow and ensure specialization courses are taken during the semester where the courses are offered. This ensures the students are following the correct guidelines throughout their study. The rules have limited the students to take 3 or 4 courses per semester to ensure that their study schedule is bearable during the semester. Therefore, maximum specialization courses are set based on the proposed rules. There are several additions to the rules for certain programs such as Bachelor of Computer Science (Database Management) with honors (BITD), Bachelor of Computer Science (Computer Networking) with honors (BITC), and Bachelor of Computer Science (Artificial Intelligence) with honors (BITI). For instance, for the BITI program, the P5 (Artificial Intelligence) course is a prerequisite that must be met. The P5 course affects other courses like K2 (Knowledge-Based System), K3 (Natural Language Processing), and K4 (Machine Learning). Fig. 4 illustrates the additional rules of BITI program.

D. Course Availability Rule
The availability of a course should be considered before carrying out this proposed rule. This is because specialization courses need to be sorted accordingly. It is important to offer the courses according to odd or even semesters so that students are not left behind when the courses are offered. If the courses are only offered in odd semesters, they will not be available in even semesters, and vice versa. Some courses are open to other programs in other semesters. Students can plan ahead of time to enter the classes indirectly. This arrangement is based on the lean and the year of the offers to correspond to the students' year of study. This arrangement must be made to ensure that students take a diverse range of courses while also meeting the required credit hours. The proposed algorithm will ensure the availability of a course's semester whether it is in an even or odd semester only or both. Fig. 5 shows a continuation of the previous compilation of rules. The next rule stipulates that the specialization courses should be included in a particular semester. This is because the semester arrangement is short, and some courses need to be taken first. Specialization courses according to a particular program are usually not offered in other programs; hence should be prioritized in the compilation.

E. Sorting Courses using Knapsack Problem 0-1
The Knapsack Problem 0-1 is applied to fill the remaining number of credit hours from the rule-based algorithm until the total credit hour limit is reached. Equation (2)  where i represents course (xi = 1 for selected course, whereas xi = 0 for unselected course), n is a number of total courses, wi is weight, pi is profit which is the credit hour of a particular course, and c is the required remaining credit hours to fulfil the total credit hours per semester. The algorithm will select the highest and most appropriate credit hours that can be adjusted for the number of credit hours remaining. The election results made by the proposed algorithm are entered into the semester. This process is repeated until the total number of credit hours reaches a maximum. This process continues to compile for the next semester. Fig. 6 depicts the flow of the knapsack problem where the process is repeated until the number of hours and courses for each semester reaches the maximum rate.

IV. AUTOMATED STUDY PLAN GENERATOR PROTOTYPE
The creation of the courses details for a complete curriculum structure is the first stage in constructing this prototype. The course details include course code, course name, prerequisites course, credit hours, and semester of offering are the required input as shown in Fig. 7. The total credit hours exempted is then determined as shown in Fig. 8. This stage is crucial since it serves as the prototype's major support structure. The total credit hours exempted must not exceed the maximum credits set by the university. The prototype shows warning when total credit hours exempted exceed the maximum credits to prevent students from making mistakes. Subsequently, the algorithm will determine the number of semesters and arrange the courses that are appropriate for the student. According to the parameters given by the algorithm, new courses will be substituted for the exempted courses. Fig. 9 shows the example of courses plan generated from the automated study plan generator.

A. Expert Reviews
Expert review was conducted to evaluate the suitability and accuracy of the proposed algorithm. For this study, experts consist of lecturers who had experience as academic advisors in a faculty. In total, four experts representing various academic program were participated in the review. The experts were contacted in advance to obtain information about their experience as academic advisors and to obtain their consent to become experts. Each expert was chosen from different departments to ensure that the rules established for each program were followed correctly. Then, the test case was sent via email.
The preparation of test cases was planned following the program to be given to experienced academic advisors. Test cases were organized based on the study plan generated from the proposed algorithm. To ensure accuracy, respondents were allowed to test the automated study plan generator prototype at random. The test cases were divided into 3 sections. Section A contains five test cases of total credit exemption between 3 and 15 credit hours which allows students to take 7 semesters of study. Section B contains five test cases of total credit exemption between 18 and 36 credit hours which allows students to take 6 semesters of study. Section C contains 3 test cases based on the random credit exemption course selected by the respondents. The total credit exemption between 3 and 36 credit hours. In total, 32 test cases were distributed to the experts.

B. Testing
Testing was conducted to identify bugs in the proposed algorithm. Testing helps in understanding and refining the given requirements [20]. It is the practice of comparing a piece of software's behavior to the predetermined and expected behavior established during the development phase. This method of testing accuracy was accomplished through the use of a study plan generated by the prototype. This test was run for each program several times to identify any problems that may have arisen. This test was performed independently to ensure that the study plans produced met the study's objectives.

C. Questionnaire Survey
A user acceptance survey was developed with Google Forms and sent through messages to respondents. The survey was distributed to direct entry students who are aware of the direct entry concept and procedures. The questionnaire items were separated into sub-categories to acquire a clear understanding and accountability of evaluations and comments at the next step. The technology acceptance model (TAM) created by Davis was used in this study to evaluate the behavior of persons by using one generally known theory on the actual use behavior of utilizing new technology [21]. The influences on the intention of using the prototype were based on the individual's perceived ease of use (EU). The capability of the prototype (CP) was determined in terms of features and results generated to leverage user needs for study plan activities. Attitude (ATT) was thought to assist in meeting the needs of the users and hence influenced the attitude created toward the prototype. The perceived usefulness (PU) ensured that the developed prototype received a response in terms of use and usage behavior. Lastly, the student intends to use (IU) was created to determine the extent to which prototype requirements were developed to address existing problems. Fig. 10 illustrates the revised TAM model that specifically explains the computer acceptance determinants that are general and capable of explaining user behavior toward the automated study plan generator. The questionnaire used a five-point Likert scale of 1 to 5, 1 refers to strongly disagree and 5 refers to strongly agree. The questionnaire consists of 19 items. Respondents were instructed to use the automated study plan generator first to provide an overview of the prototype. Next, the respondents were required to answer the questionnaire survey. Each aspect presented was analyzed to gain the respondents' acceptance of the prototype to achieve the objectives.

D. Data Analysis
Test case results from experts and testing were analyzed using a confusion matrix to evaluate the accuracy. Table III shows the aspects to calculate the accuracy of the matrix by taking the average values across the "main diagonal".
The formula to calculate the accuracy based on the confusion matrix is shown in (3).
(3) Expected outcome was YES, and the actual outcome was also YES.

FP:
The expected outcome was YES, and the actual outcome was NO.

FN:
The expected outcome was NO, and the actual outcome was YES.

TN:
The expected outcome was NO, and the actual outcome was also NO. On the other hand, a descriptive analysis (Mean ± SD) and correlation analysis were performed to analyze the data collected form the questionnaire survey.
VI. RESULTS Table IV shows the results from the expert review. In total, four experts representing various program were participated in the review. Each expert evaluated thirteen cases of a particular program. The results indicate that the automated study plan generator generates highly accurate study plan between 0.99 to 1 accuracy.
According to an expert who evaluated BITI program, the P1 (Workshop 1) course should be scheduled in the second semester so that students can learn how to tackle their studies at UTeM first. If a student successfully exempted for more than 18 credit hours, the algorithm rules place P1 course in Semester 1. They can be changed because the P1 course is available in both, and a new course will be taken. As for the BITC program, the arrangement of courses developed in the automated study plan generator is good, except that there is a problem with the K1 (Workshop II) course that is supposed to be taken before the end of Year 2. This is because the outcome of the arrangement produced depends on the P6 (Data Communication and Networking) course whether it is excluded or not. This plays an important role in compiling the study plan, but it is not stated in the handbook. Human error occurs where the availability of elective courses is incorrectly set causing the accuracy of the program to decrease.
Overall, the study plan generated from the proposed algorithm has high accuracy. It is very useful for new direct entry students to obtain an initial overview of the preparation of study plans at the beginning of the semester. The courses offered also depend on the quota set by the faculty, which forces students to change their study plans in the event of a change.
A. Testing Table V shows 28 manual testing results from various programs. Random course selection reveals that the automated study plan generator prototype has an accuracy of 0.999 on an average. The accuracy of the manually tested program has given a value of 1 except for the BITE program. This is because when the BITE program is shortened; students must merge three even semesters into two semesters. This causes the generated study plan exceeds the total credit hours. If a student is exempted from 18 credit hours, but the courses provided in the second semester are not reduced, the generated study plan will be unbalanced credit hours.

B. Questionnaire Survey
Forty-four direct entry students have participated in the survey. These students were from Semesters 2 and 6. The female and male respondents were 43.2% and 56.8% respectively. BITS program had the highest percentage of 45.5%, followed by BITI and BITD at 15.9%. Besides, there are 11.4% students from the BITC program and 9.1% from the BITM program. Lastly, there are 2.3% of students from the BITZ program.  Table VI shows a descriptive analysis of the acceptance test constructs. All mean values are greater than 4.2, indicating that respondents have a generally positive opinion of the automated study plan generator. A total of 96% of respondents agreed that the automated study plan generator is capable of producing a study plan that meets the specified requirements. The majority of respondents (92%) rated all items under attitude and perceived ease of use constructs on a scale of 4 (agree) to 5 (strongly agree). All respondents also agreed on the automated study plan generator's perceived usefulness. Lastly, the automated study plan generator would be used by more than 90% of the respondents.
Correlation analysis of the acceptance test between constructs is shown in Table VII. The results indicate all the constructs show a positive and strong correlation (exceeding 0.5), with all correlations significant at the p<0.01 level. The relationship between capability (CP) and intention of use (IU) is 0.862, indicating that the two are highly correlated. The finding implies that user intention is based on the capabilities of the prototype to assist users in achieving the goal of use. Following that is perceived ease of use (EU) concerning perceived use (PU), with a high correlation between the two constructs, demonstrating that the prototype is simple to understand and provides convenience to the user.

VII. DISCUSSION
An algorithm for compiling study plans was proposed and validated in this study. Rule-based and knapsack problem were applied in compiling student learning plans. The rulebased method is utilized to optimize the courses that students must take during the semester as specified by the faculty. These courses have been planned based on the total number of credit hours exempted. There are crucial courses that must be prioritized based on the semester to guarantee that students do not miss out and create a change in the intended number of semesters. Besides, the knapsack problem used in this study is intended to select courses that are not included in the rules and can be put into a table based on credit hours and the desired offer. The courses to be chosen are balanced according to the number of hours allotted. As a result, a study plan that satisfies the prerequisites is created. These two approaches are ideal for dealing with this issue. This is because significant courses can be certain of their offer, while other courses are offered following the correct offer. The planned structure qualifies for making a study plan. The results from expert reviews and testing reveal that the automated study plan generator prototype has an accuracy of 0.999 on an average. Moreover, most of the respondents participated in the user acceptance survey have a generally positive opinion of the automated study plan generator in term of ease of use, usefulness and capability. The automated study plan generator would be used by more than 90% of the respondents.
The results produced from this study could provide valuable contributions to the undergraduate students to plan their course schedule prior to their graduation. The process of organizing learning can be more effectively implemented using the proposed algorithm. Students will not be overburdened and will be able to increase the consistency of their learning output in the coming semester by finding suitable learning arrangements. It has the potential to indirectly improve student learning performance.
This study has certain limits and problems. If the rule is incorrect or not written in the academic handbook, it can disrupt the schedule's arrangement. This is because the rules cannot be followed, resulting in a wild and incorrect arrangement. It will stymie students' planning and make new arrangements difficult. When constructing the study plan, Knapsack Problem 0-1 acts greedily to avoid this problem by using rules to ensure the algorithm obeys the established limitations. Knapsack Problem 0-1 will continue to produce results based on the number of credit hours without following the course codes. Moreover, human error is unavoidable when conducting studies, which reduces the accuracy of the results. The combination ruled-base and knapsack problem algorithm assures that the study schedule can be organized properly. Prerequisites can be met, credit hours can be allocated in a balanced manner, and courses can be arranged according to the offers by the faculty, all in one system. With the study's findings, any desired method can be constructed in the future.
To solve this problem, rule-based and knapsack problem are appropriate. This is because each course must follow all rules, and voids can be filled by the knapsack problem with greedily picked courses to fulfil the prerequisite credit hours. It also relies on the availability of courses offered in the semester. The results have a high level of accuracy and can be used by academic advisors and new direct entry students to arrange their schedules.

VIII. CONCLUSION
This study had successfully proposed and validated an algorithm for compiling study plans by using rule-based and knapsack problem. Based on the results and analysis, it is possible to conclude that the accuracy of the algorithm based on the rule-based and knapsack problem to generate study plan is high. Survey respondents believe that the proposed algorithm can assist them in creating and designing study plans. The majority of respondents are interested in using the automated study plan generator. Finally, it can be seen that both students and academic advisors can benefit from the automated study plan generator to arrange their study plans.