Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: joelburget/miftiwac
base: e0d3298295
...
head fork: joelburget/miftiwac
compare: 87018a689c
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
16 MIFTIWAC/rules.clp
@@ -0,0 +1,16 @@
+(deftemplate genre
+ (slot name)
+ (slot min-bpm)
+ (slot max-bpm))
+
+; startup vs deffacts
+(defrule startup ""
+ =>
+ (assert (genre (name house) (min-bpm 118) (max-bpm 135)))
+ (assert (genre (name disco) (min-bpm 90) (max-bpm 115)))
+ )
+
+(defrule print-possibilities
+ ?g <- (genre {min-bpm <= 125 && max-bpm >= 125})
+ =>
+ (printout t "genre is " ?g.name crlf))
View
23 MIFTIWAC/src/miftiwac/Miftiwac.java
@@ -0,0 +1,23 @@
+package miftiwac;
+
+import jess.*;
+
+public class Miftiwac {
+ public static void main(String[] args) {
+ try {
+ // Create a Jess rule engine
+ Rete engine = new Rete();
+ engine.reset();
+
+ // Load the pricing rules
+ engine.batch("rules.clp");
+
+ // Mark end of catalog data for later
+ //WorkingMemoryMarker marker = engine.mark();
+
+ engine.run();
+ } catch (JessException e) {
+ System.out.println(e);
+ }
+ }
+}
View
4 MIFTIWAC/src/test.java
@@ -1,4 +0,0 @@
-
-public class test {
-
-}

No commit comments for this range

Something went wrong with that request. Please try again.