Course:CPSC312-2018 University Agenda
University Agenda
Authors:
Isabel Zorrilla Steenbock, Kushal Mohee
What is the problem?
Problem
Students often have difficulties in simulating their degree on beginning university here at UBC. They have troubling exploring and scheduling their degree into a 4 year plan. This task can be especially difficult since courses often have prerequisites which need to be fulfilled and many requirements in different categories that need to be fulfilled.
Idea
We would like to prototype a tool coded in Prolog which would allow students to choose among several courses to meet the requirements of their major and build a timetable from there for the upcoming 4 years.
Design
A typical degree in UBC would consist of 120 credits over 4 years. Often, majors in UBC already have mandatory courses(core courses) which need to be taken. While, some of these courses might fulfill some requirements, we often need to choose other courses/electives to fulfill the rest. Upper level courses might have prerequisites which were not explicitly mentioned hence we can lose track of which courses need which prerequisites.
Our prolog program allows you to choose courses from a suggested list to fulfill your requirements. It also recognizes the prerequisites and prompts you to choose the appropriate prerequisites from a list for a chosen course.
After compiling all your choices, it creates a feasible timetable while enforcing prerequisite rules. It has been designed to ask you how many courses you indeed to take each term and produces a plan accordingly. It returns a list of courses which did not fit based on the preferences you inputted.
The code was made as modular as possible. There are 3 components to it namely:
- The Knowledge Base - contains UBC courses
- The Requirements Analyser - responsible to ask about which courses the user wants to take to fulfill which requirements
- The Scheduler - uses the list provided by the Requirements Analyzer to create the timetable
What is the something extra?
We implemented a simple IO interface to make it easy for the user to type their chosen course and messages are written to validate the user’s choice.
What did we learn from doing this?
- The fundamental principles of logic programing
- Prototyping a solution to a problem
- Prolog programming syntax
- Using SWI-Prolog built in functions
- Use of triples to define relations
- Learnt to work with IO principles with SWI-Prolog
- Testing code rigorously using trace and debug functions
- Modular coding so that functions are general enough to be used for other majors and degrees
- Writing recursive predicates especially with lists
Our code:
There are 3 files in the link, each one acting as one of the components mentioned above.
- The Knowledge Base - knowledgeBase.pl
- The Requirements Analyzer - analyzer.pl
- The Scheduler - scheduler.pl
So far the Knowledge Base contains information relevant to a cognitive systems degree and the program will run with a cogs degree.
You only need to run load the scheduler on SWI-Prolog. Consult more instructions in the ReadMe file.
Click here to access our code.