lorenzosinisi

lorenzosinisi

Hello everyone!

I have recently fallen in love with the Rete algorithm initially developed from Charles Forgy.

After having implemented it (with my own personal vision) in Elixir and having it working for some basic cases, I would like to develop this further and have it ready for production for companies that want to use Rete as part of their system. Maybe even implement a DSL so that it is easier to use it.

I would like to know if anyone is keen to help me develop and design more feature for this interesting AI project in Elixir (there isn’t any open source expert system built in Elixir, that I am aware of).

Also, would be great to know if anyone may need a rule engine built with Elixir in their system so I can help you implement it and see what extra feature would be needed.

So any feedback and suggestion is very welcome. This is the source code for now GitHub - lorenzosinisi/retex: A boilerplate/proof-of-concept for a Rete Algorithm implementation in Elixir · GitHub (feel free to open issues and PRs on the Github repo)

This is the paper from Forgy http://www.csl.sri.com/users/mwfong/Technical/RETE%20Match%20Algorithm%20-%20Forgy%20OCR.pdf

And this is YouTube video explanation about Rete https://www.youtube.com/watch?v=CmxHPJTAF3I and how it can be used in the real world.

Note: I am not an expert of AI so please bear with me if the initial implementation is not complete or completely correct, I just needed to “make it work” first in order to “make it beautiful” :slight_smile: (and I need help for that)

First 3 of 3 Posts Switch mode

chrstphrhrt

chrstphrhrt

Awesome! I am completely new to Elixir but have played around with the Python CLIPS libraries. I’m building a product that has a domain ontology encoded with Postgres LTREE as a network of DAG taxonomies with a custom triple store schema. There are trees for normal taxa stuff like topics, but also for procedures of rules. It needs breadth-fist search to match potential rules against iterative, mostly synchronous user input sessions, e.g. checking a fact pattern that emerges from interviews against laws.

From doing a couple throwaway prototypes I have become less and less convinced that a “real” graph (lib or db) is needed. Basic trees are fine because I can’t think of cases where multiple roots or cycles must exist, or even if they did, why they must be handled in the actual traversal algorithm if I can just use SQL relations and code to stitch together many branches when initializing a Rete network (not an expert on that so could be missing something). The attraction of Rete for me is doing breadth-first search for rule/action nodes and not having to think about pruning dead-end paths during execution. Any other theoretical capability feels like conceptual overhead, but I can appreciate the appeal

Since this is the only pure Elixir Rete lib I could find, I hope to give it a spin soon.

Have you looked at GitHub - afiniate/seresye: SERESYE means Swarm oriented ERlang Expert SYstem Engine. It is a library to write expert systems and rule processing engines using the Erlang programming language. It allows to create multiple engines, each one with its own facts and rules to be processed. · GitHub as well? They seem to just use tuples, which would seem to be quite nice fit with pattern matching. It is also the approach taken by some projects in other languages like GitHub - project-flogo/rules: Golang based Rules for Real-time Contextual Decisions · GitHub.

Hope to see more people on this!

Catharz

Catharz

I previously worked on a horrendously complex promotions engine (for a retail system), and I’m interested in how a rules engine might solve this problem.

How far is this from being “production ready”?

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement