/KRR_final_project

Project for Knowledge Representation and Reasoning using Companion Cognitive Systems built by the Qualitative Reasoning Group at Northwestern University

Knowledge Representation and Reasoning

Project Description - Computer Science (CS) Academic Advisor

We built an Academic Advisor for CS Majors at Northwestern University using knowledge representation and reasoning. All knowledge representation and reasoning are stored in Cyc-style microtheories.

Highlights

Directory Structure:

 .
 ├── images                 # contains images used in README.md
 ├── .gitignore             # contains file types not to be synced with GitHub
 ├── Presentation.pptx      # project presentation                               
 ├── README.md                               
 ├── The FIRE Manual.pdf    # manual of the FIRE reasoning engine of Companion Cognitive Systems
 ├── analogy.krf            # file that contains analogy examples
 ├── analogy_scaled.krf     # file that contains analogy examples that are scaled significantly
 ├── harper_test.krf        # file that contains even more complicated analogy examples under test
 └── main.krf               # main file that contains defined ontology, facts, and rules

Environment Setup

To get setup please do the following:

  1. run Companion
  2. upload all .krf flatfiles to Companion
  3. run queries (details shown below)

Team Members:


Overview of Motivation

We sought to create an automated version of an academic CS advisor. The difficulties students face in trying to understand their academic options and plan their futures motivated us to develop a solution that obviated these challenges.

Currently, there are several different resources that exist for students to plan out their courses. These include published course manuals, assigned academic advisors, peer course reviews, and several other systems. However, it is tedious and time-consuming for students to extract and reconcile information from a multitude of disparate sources.

Image_1

In order to ameliorate this situation, we wanted to allow students to access a single, all-encompassing system to support them in their academic planning pursuits, thus freeing them from having to reckon with a multitude of different resources.

Image_2

Through Companions we have created a system that allows us to ask and receive answers to questions that we, as CS students ourselves, have faced. These range from simply checking whether two classes are the same, to reasoning whether two classes are similar based on multiple criteria. In this particular project, we have intentionally limited the scope of our queries to focus on planning one quarter ahead - although virtually all of our core representation and reasoning could easily be extended.

Note: In our repo we have also included Presentation.pptx which further details the background and goals of our project.


Project Structure

Our project is structured into 3 main files: main.krf, analogy.krf and analogy_scaled.krf and 1 test file: harper_test.krf. Below we have documented the main functionality provided from each of these files. These files add new knowledge and representation to the Companions base, so after uploading the .krf files queries can be automatically run. Example queries are shown below along with scenarios in which students may use them.

After setting up the environment as described above, we recommend testing our system by running the example queries. However, you are free to add knowledge as laid out in the files and test custom queries as well!

Please note that queries for main.krf, analogy.krf, an d harper_test.krf should be run within the CSAcademicAdvisorMt context; queries for analogy_scaled.krf should be run within the AnalogyScaledMt context.

File 1 - main.krf

Representation: In this file we make use of, and expand upon, the information held in Companions about Northwestern University's CS department and it's courses. This includes departments, professors, research groups, years, quarters, courses, and when courses meet. We also define a series of collections for overall research areas, like AI and Systems, along with all the classes that fall under those areas.

Reasoning: Within this file we present several different forms of reasoning. All are horn clauses, and some build upon each other for more complex reasoning. At a high level, we will be reasoning whether or not classes are appropriate/feasible for a CS student in a given term, whether or not the weekly lecture schedule of classes overlap, and what classes would be a good fit given different facets of a student's interests.

  • Scenario 1
    I really liked learning about AI programming. What could I take to expand upon that knowledge?
    Example Query:
    (goodClassGivenTopic ArtificialIntelligenceProgramming-Fall2018 (WinterQuarterFn (AcademicYearFn NorthwesternUniversity (YearFn 2018))) ?newCourse)

  • Scenario 2
    I really liked Willie’s teaching style. What could I take next quarter with him?
    Example Query:
    (goodClassGivenProfCourse IntroductiontoArtificialIntelligence-Fall2018 (WinterQuarterFn (AcademicYearFn NorthwesternUniversity (YearFn 2018))) ?newCourse)

  • Scenario 3
    I know that I want to take Data Science and Machine Learning. Can I take them both schedule-wise?
    Example Query:
    (notOverlap DataScienceSeminar-Fall2018 MachineLearning-Fall2018)

  • Scenario 4
    What are the possible courses I can take that would not overlap with the other 3 course that I have in mind?
    Example Query:
    (notOverlapTwo ?course DataScienceSeminar-Fall2018 MachineLearning-Fall2018 ProgrammingLanguages-Fall2018 (FallQuarterFn (AcademicYearFn NorthwesternUniversity (YearFn 2018))))

  • Scenario 5
    I really liked the Intro to AI course material and the teaching style of Machine Learning. What are two other courses I might like?
    Example Query:
    (quarterSuggestionOne ?course1 ?course2 IntroductiontoArtificialIntelligence-Fall2018 MachineLearning-Fall2018 (WinterQuarterFn (AcademicYearFn NorthwesternUniversity (YearFn 2018))))

  • Scenario 6
    I really liked the Intro to AI course material and the teaching style of Machine Learning. What are two relevant courses along with a third that is logistically feasible?
    Example Query:
    (quarterSuggestionTwo ?course1 ?course2 ?course3 IntroductiontoArtificialIntelligence-Fall2018 MachineLearning-Fall2018 (WinterQuarterFn (AcademicYearFn NorthwesternUniversity (YearFn 2018))))

  • Scenario 7
    I really liked The Design of Technological Tools for Thinking and Learning. What are some courses that might be taught by professors who have a similar background?
    Example Query:
    (similarResearchGroup TheDesignofTechnologicalToolsforThinkingandLearning-Winter2018 ?newCourse (SpringQuarterFn (AcademicYearFn NorthwesternUniversity (YearFn 2018))))

File 2: analogy.krf

This file contains a simple example that represents the core advanced reasoning that Analogical Matching (via the Structure-Mapping Engine).

Representation:
Here we describe 4 similar courses in microtheories as cases and add them all in a case library. We also defined predicates probabilityRelated and mathHeavy to denote courses are probability-related and math-heavy.

Reasoning:
We used reminding predicate to find courses that are similar to a course that is both probability-related and math-heavy.

  • Scenario 1
    What are some similar courses to Probabilistic Graphical Models (Winter 2018)?
    Example Query:
    (reminding ProbabilisticGraphicalModels-Winter2018DescriptionMt (CaseLibrarySansFn similarCourses ProbabilisticGraphicalModels-Winter2018DescriptionMt) (TheSet) ?similarCourse ?match)

  • Scenario 2
    What are some similar courses to Statistical Pattern Recognition (Winter 2018)?
    Example Query:
    (reminding StatisticalPatternRecognition-Winter2018DescriptionMt (CaseLibrarySansFn similarCourses StatisticalPatternRecognition-Winter2018DescriptionMt) (TheSet) ?similarCourse ?match)

File 3: analogy_scaled.krf

This file contains a much more complicated example that is self-contained with much more complicated ontology defined than the ontology in main.krf.

Representation:
We ontologized 16 new predicates in this file, including differentContentApproach, moreDifficultThan, etc. These predicates help to describe the classes in this file primarily in terms of the relationships between them.

Reasoning:
Here we describe 6 courses in microtheories as cases and add them all in a case library. As noted above, each of the 6 courses are described using a variety of predicates. We again use the reminding predicate to obtain courses similar to a specified course, and trust FIRE's structure-mapping engine to determine the dimensions of similarity and evaluate courses in that vein.

  • Scenario 1
    What are some similar courses to Knowledge Representation and Reasoning (Winter 2018)?
    Example Query:
    (reminding KRR-Winter2018DescriptionMt (CaseLibrarySansFn CourseDescriptionsCaseLibrary KRR-Winter2018DescriptionMt) (TheSet) ?case ?match)

  • Scenario 2
    What are some similar courses to Machine Learning (Fall 2018)?
    Example Query:
    (reminding ML-Fall2018DescriptionMt (CaseLibrarySansFn CourseDescriptionsCaseLibrary ML-Fall2018DescriptionMt) (TheSet) ?case ?match)

File 4: harper_test.krf

This test file contains an expansion of the ontology and reasoning seen within in analogy_scaled.krf. The intent was to explore the capabilities of analogy to enhance the user's experience with our CS Academic Advisor.

Representation:
We ontologized several new predicates in this file, including courseDifficulty, taughtByExpert, breadthInDepth, and taughtByStudents. These predicates help to further embellish our descriptions of the classes in the file. Additionally, we added two new classes (relative to analogy_scaled.krf) and defined them using the predicates available in the file.

Reasoning:
Building off of the reasoning work found in analogy.krf and analogy_scaled.krf, we sought to extend analogy to consider multiple comparisons as well as to incorporate specified criteria into analogies. We also, unsuccessfully, sought to use layered analogies, wherein we would find analogous courses along several specified dimensions and then determine which of those was most analogous to a specified 'liked' course.

  • Scenario 1
    What is course that is more analogous to Knowledge Representation and Reasoning (Winter 2018) than it is to Data Science (Fall 2018) to ?
    Example Query:
    (findBalance TargetCourse000A TargetCourse000B TestCourse000CaseLibrary ?caseRec)

  • Scenario 2
    What is a similar course to Knowledge Representation and Reasoning (Winter 2018) in terms of the course professor?
    Example Query:
    (reminding TargetCourse000A TestCourse000CaseLibrary (requiredCorrespondence (courseInstructor ?course1 WillieWilson) (courseInstructor ?course2 WillieWilson)) ?case ?match)


Special Thanks:
We would like to thank our class instructors: Irina Rabkina and Willie Wilson for their patience and guidance in this project! We learned a lot about knowledge representation and reasoning :]