CoCo (Combined deduCtiOn and abduCtiOn) is a dual-process cognitive architecture written in Rust. It combines a CLIPS-based rule engine with timeline planning to support both deduction and abduction in dynamic environments.
Highlights
- Hybrid reasoning: deduction + abduction
- Rust core for performance and safety
- CLIPS integration for rules and pattern matching
- Simple web interface for interaction and visualization
Run the server locally:
cargo run --features="server"By default the server listens on http://0.0.0.0:3000 and serves the web UI.
CoCo links to the CLIPS v6.4.2 C library. Install CLIPS as follows:
- Download and unpack:
wget -O clips_core_source_642.zip https://sourceforge.net/projects/clipsrules/files/CLIPS/6.4.2/clips_core_source_642.zip/download
unzip clips_core_source_642.zip- Build the core library:
cd clips_core_source_642/core
make release- Either point
CLIPS_SOURCE_DIRat the extracted source, or install the static library system-wide:
export CLIPS_SOURCE_DIR=$(pwd)
# or
sudo cp libclips.a /usr/local/lib/
sudo ldconfigBelow are minimal examples that show JSON payloads (useful for APIs or config files).
- Class example (JSON)
{
"name": "Person",
"parents": ["Agent"],
"static_properties": {
"age": { "type": "int", "default": 30, "min": 0, "max": 150 },
"name": { "type": "string", "default": "Unknown" }
},
"dynamic_properties": {
"mood": { "type": "symbol", "allowed_values": ["happy", "neutral", "sad"], "default": "neutral" }
}
}- Object example (JSON)
{
"classes": ["Person"],
"properties": {
"age": 28,
"name": "Alice"
}
}- Rule example (JSON)
{
"name": "greet",
"content": "(defrule greet (Person (name ?n)) => (printout t \\\"Hello \\\" ?n \\\"!\\\" crlf))"
}Contributions are welcome! Please open issues for bugs or feature requests, and submit pull requests for improvements.
CoCo is licensed under the MIT License. See LICENSE for details.