Skip to content

A concise, research‑oriented Python toolkit for DSAI 104 “Knowledge Representation & Reasoning,” featuring an interactive Jupyter notebook on business‑rule encoding and salary computation plus two standalone logic engines—a Knights & Knaves solver and an English–predicate logic translator.

License

Notifications You must be signed in to change notification settings

amr-yasser226/krr-research-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

krr-research-snippets

A curated collection of Python‑based Knowledge Representation & Reasoning (KRR) exercises, including an interactive Jupyter notebook and two standalone logic mini‑projects.

Table of Contents

About

This repository showcases core AI techniques for modeling and automated reasoning, demonstrating how real‑world problems and classic puzzles can be encoded, solved, and explored in Python.

Repository Structure

krr-research-snippets/
├── Labs/
│   └── lab 7.ipynb                # Jupyter notebook: employee salary calculation exercise
├── mini-projects/
│   ├── Mini Project 1.py          # Logic puzzle solver (truth-tellers & liars)
│   └── Mini_Project 2.py          # English ↔ predicate-logic translator
├── LICENSE                        # MIT License
└── README.md                      # This file

Prerequisites

  • Python 3.7 or higher
  • (Optional) Jupyter Notebook for interactive execution

Installation

  1. Clone the repository:
    git clone https://github.com/amr-yasser226/krr-research-snippets.git
    cd krr-research-snippets
  2. (Optional) Install Jupyter:
    pip install jupyter

Usage

Lab 7 Notebook

Launch the notebook to explore conditional business‑rule encoding and salary computations:

jupyter notebook Labs/lab\ 7.ipynb

Mini Projects

  • Mini Project 1: Solve classic “truth‑tellers vs. liars” puzzles by brute‑force enumeration
    python "mini-projects/Mini Project 1.py"
  • Mini Project 2: Translate simple English quantifier sentences to first‑order logic and back
    python "mini-projects/Mini_Project 2.py"

Author’s Expertise

  • Python Programming: clear, idiomatic implementations
  • Interactive Data Science: Jupyter notebooks for narrative‑driven code
  • Logic & Automated Reasoning: puzzle solving via search and formal logic

Concepts and Ideas

  • Knowledge Representation & Reasoning: structuring information so machines can infer and decide
  • Automated Search: exhaustive truth‑value enumeration for Knights & Knaves puzzles
  • Predicate Logic Translation: mapping between natural language and formal quantifier syntax

Contributing

Contributions, new snippets, and improvements are welcome! Please open an issue or submit a pull request.

License

This project is released under the MIT License. See the LICENSE file for details.

About

A concise, research‑oriented Python toolkit for DSAI 104 “Knowledge Representation & Reasoning,” featuring an interactive Jupyter notebook on business‑rule encoding and salary computation plus two standalone logic engines—a Knights & Knaves solver and an English–predicate logic translator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published