Skip to content

rust-deep-learning/rust-cyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Cyc

A logic inference engine and family tree visualizer written in Rust. This project reimplements basic concepts from the Cyc artificial intelligence project, focusing on rule-based inference for family relationships.

Family Tree Visualization

Features

  • Rule-Based Inference: Automatically deduces relationships (Child, Sibling, Grandparent, Uncle, Aunt, etc.) based on a minimal set of parent-child facts.
  • Forward Chaining: Applies rules iteratively until no new facts can be derived.
  • Visualization: Generates a visual family tree (family_tree.png) using the inferred relationships.

Project Structure

  • src/knowledge.rs: The core inference engine. Manages the knowledge base (atoms, rules) and runs the inference loop. Also handles the image generation.
  • src/rules.rs: Defines the logic rules (e.g., "If X is parent of Y, then Y is child of X").
  • src/people.rs: Defines the entities (People) and the initial set of facts (Parent-Child relationships).
  • src/main.rs: Entry point that initializes the knowledge base, runs inference, and generates the output image.

Getting Started

Prerequisites

  • Rust (latest stable version)

Installation

  1. Clone the repository:

    git clone https://github.com/lazarcloud/rust-cyc.git
    cd rust-cyc
  2. Run the application:

    cargo run

This will:

  1. Print the inference steps to the console, showing derived facts.
  2. Generate a family_tree.png file in the project root visualizing the family tree.

About

A logic inference engine and family tree visualizer written in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages