A forward-chaining expert system that matches travelers to curated destinations using weighted attribute scoring and synonym normalization.
python main.pyRequires tkinter (ships with most Python installs). On Ubuntu/Debian:
sudo apt-get install python3-tk| File | Role |
|---|---|
schema.py |
Attribute definitions, valid values, weights, and synonyms |
inference_engine.py |
Knowledge base validation, fact normalization, forward-chaining & scoring |
main.py |
Tkinter desktop GUI (entry point) |
destinations.json |
Persistent knowledge base (30 destinations) |
- Find My Destination — Select your preferences from dynamic dropdowns, get ranked results with match percentages and explainability.
- Teach Waypoint — Add new destinations with schema-validated attributes.
- Browse Destinations — Search and filter the full knowledge base.
- Dynamic fact ingestion — The system only asks about attributes actually used in the current rule set, ordered by weight. Add a new attribute to any destination and the UI picks it up automatically.
- Synonym normalization — Type "cheap", "chill", or "party" and they map to canonical values (
low,relaxation,nightlife). - Weighted certainty scoring — Each match gets a
certainty%based on attribute weights:budget(3.0) >climate(2.5) >activity(2.0) >duration(1.5) >companions(1.0). - Explainability — Every result shows which attributes matched and which didn't.
- Schema validation — The KBG rejects invalid destinations and reports why.
Add a new attribute (e.g. region) in one place:
- Add the attribute spec to
ATTRIBUTE_SCHEMAinschema.py - Add it to a few destinations in
destinations.json
The system starts asking about it immediately — no other code changes needed.