Liking cljdoc? Tell your friends :D

Rete for Frames

Clojure RETE implementation for frames

Manners Benchmark Table

TestCLIPS v 6.24 (msec)rete4frames v 5.3.0 (msec)
manners81.31659982x 61
manners1618247x 14
manners322721427x 5
manners6489399635x 1.1
manners12832439688690x 0.27

Test results obtained on the same hardware and OS 7 october 2016. As can be seen from the results, rete4frames initially far behind and then starts to catch up CLIPS. On the most difficult test rete4frames almost 4 times faster than CLIPS.

Leiningen dependency information:

 [rete "5.3.0-SNAPSHOT"]

Maven dependency information:

<dependency>
  <groupId>rete</groupId>
  <artifactId>rete</artifactId>
  <version>5.3.0-SNAPSHOT</version>
</dependency>

To get the Manners Benchmark results run in REPL:

(require 'rete.core)
(in-ns 'rete.core)
(app "run" "examples/manners.clj" "examples/manners_f8.clj")

The benchmark table for Waltz algorithm is in [Waltz Benchmark Table] (https://github.com/rururu/rete4frames/blob/master/doc/waltz_benchmark.md)

Running examples:

(require 'rete.core)
(in-ns 'rete.core)
(app "run" "examples/mab.clj") ;; Monkey and bananas..
(app "run" "examples/zebra.clj") ;; Who drinks water, who owns zebra..
(app "run" "examples/auto.clj") ;; Automotive Expert System..
(app "run" "examples/sudoku/sudoku.clj" "examples/sudoku/grid3x3-p1.clj") ;; Game "Sudoku"
(app "run" "examples/hypertension.clj") ;; Doctor's expert system
Today: 19.2.2015..
What will do? [reception analyse end]
reception
What is a name of a next patient? (no-patients)
"Alice"
Patient: Alice, age: 70, race: nonblack
Last blood pressure values: systolic: 140, diastolic: 90, date: 18.2.2015
Well, Alice, let's measure your current blood pressure..
What are blood pressure values now? [systolic diastolic]
[140 90]
Good, Alice.
Continue prescribed medication.
                     Waiting for you after 18.3.2015, if all is well.
                     Good bye.
What is a name of a next patient? (no-patients)
...

Yet another example: "Real" air traffic control system - client-server ClojureScript-Clojure application based on "Flightradar24" web service (http://www.flightradar24.com/), "Leaflet" JavaScript libraty (http://leafletjs.com/), httpkit, compojure, core.async and others Clojure libraries. This example is in a separate repository https://github.com/rururu/rete4flights.

And one more: es-boat - a prototype of an expert system for coastal navigation. It uses [Protege-3.5 ontology editor] (http://protege.stanford.edu/) as a knowledge representation system and server-side GUI, [OpenStreetMap] (https://wiki.openstreetmap.org/wiki/API) API, Leaflet JavaScript library, [Cesium] (https://cesiumjs.org/) WebGL virtual globe and map engine, [GeoNames] (http://www.geonames.org/) geographical database and Wikipedia. Link to this prpject: https://github.com/rururu/es-boat

Integrated Development Environment

IDE based on [Protege-3.5 ontology editor] (http://protege.stanford.edu):

Simple start IDE:

$ cd <..>/rete4frames
$ lein run

Start IDE for developers

$ cd <..>/rete4frames
$ lein repl
...
rete.protege=> (-main)

screenshot

3.30 minute IDE [screencast] (https://www.youtube.com/watch?v=2Q9Y_jUDF8U).

How to include Rete for Frames into your Java programs see example [Eclipse project] (https://github.com/rururu/rete4frames/blob/master/Rete4framesEclipseTest/).

For further information see [Documentation] (https://github.com/rururu/rete4frames/blob/master/doc/intro.md)

To get this functionality in ClojureScript see [cljs-rete4f] (https://github.com/rururu/cljs-rete4f)

Copyright and license

Copyright © 2014-2016 Ruslan Sorokin.

Licensed under the EPL (see the file epl.html). [License of Protege-3.5] (https://github.com/rururu/rete4frames/blob/master/LICENSE_PROTEGE)

Can you improve this documentation? These fine people already did:
rururu & Ruslan Sorokin
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close