diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 2035aa9..fcab1f8 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,6 @@
-
-
@@ -92,22 +90,22 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
diff --git a/main.py b/main.py
index adb6fa2..f8677e4 100644
--- a/main.py
+++ b/main.py
@@ -41,12 +41,18 @@ predictions = []
for i in range(0,matches.shape[0]):
module.input['form1'] = matches_input[i][0]
module.input['form2'] = matches_input[i][1]
- #module.input['points'] = matches_input[i][2]
+ module.input['points'] = matches_input[i][2]
module.compute()
x = module.output['result']
x = float("{:.4f}".format(x))
- y = int(round(x))
+ #y = int(round(x))
+ if x > 0.2:
+ y = 1
+ elif x < -0.2:
+ y = -1
+ else:
+ y = 0
predictions.append(y)
print("|FCL: " +str(x) + "|ROUND: " + str(y) + "|GROUND: " + str(matches_input[i][3]) + "|PKT DIFFERENCE: " + str(matches_input[i][2])+'|')
diff --git a/worker.fcl b/worker.fcl
index e226004..e758a49 100644
--- a/worker.fcl
+++ b/worker.fcl
@@ -12,16 +12,20 @@ END_VAR
FUZZIFY form1
RANGE := (-1.000 .. 5.000);
- TERM bad := (1,1)(2,0);
- TERM avg := (1,0)(2,1)(3,1)(4,0);
- TERM great := (4,0)(5,1);
+ TERM bad := (0.5,1)(1.5,0);
+ TERM notbad := (0.5,0)(1.5,1)(2.5,0)
+ TERM avg := (1.5,0)(2.5,1)(3.5,0)
+ TERM notgreat := (2.5,0)(3.5,1)(4.5,0)
+ TERM great := (3.5,0)(4.5,1);
END_FUZZIFY
FUZZIFY form2
RANGE := (-1.000 .. 5.000);
- TERM bad := (1,1)(2,0);
- TERM avg := (1,0)(2,1)(3,1)(4,0);
- TERM great := (4,0)(5,1);
+ TERM bad := (0.5,1)(1.5,0);
+ TERM notbad := (0.5,0)(1.5,1)(2.5,0)
+ TERM avg := (1.5,0)(2.5,1)(3.5,0)
+ TERM notgreat := (2.5,0)(3.5,1)(4.5,0)
+ TERM great := (3.5,0)(4.5,1);
END_FUZZIFY
FUZZIFY points
@@ -46,23 +50,61 @@ RULEBLOCK
ACCU : MAX;
ACT : MIN;
- //RULE 0: if form1 is avg and form2 is avg then result is draw
-
- RULE 1 : if form1 is great and form2 is bad then result is home
+ // form1: great | form2
+ RULE 0 : if form1 is great and form2 is bad then result is home
+ RULE 1 : if form1 is great and form2 is notbad then result is home
RULE 2 : if form1 is great and form2 is avg then result is home
- RULE 3 : if form1 is great and form2 is great then result is draw
+ RULE 3 : if form1 is great and form2 is notgreat then result is home
+ //rozbicie jednego draw
+ RULE 4 : if form1 is great and form2 is great and points is low then result is away
+ RULE 5 : if form1 is great and form2 is great and points is avg then result is draw
+ RULE 6 : if form1 is great and form2 is great and points is high then result is home
- RULE 4 : if form1 is avg and form2 is bad then result is home
- RULE 5 : if form1 is avg and form2 is avg then result is draw
- RULE 6 : if form1 is avg and form2 is great then result is away
+ // form1: notgreat | form2
+ RULE 7 : if form1 is notgreat and form2 is bad then result is home
+ RULE 8 : if form1 is notgreat and form2 is notbad then result is home
+ // rozbicie
+ RULE 9 : if form1 is notgreat and form2 is avg and points is low then result is away
+ RULE 10 : if form1 is notgreat and form2 is avg and points is avg then result is draw
+ RULE 11 : if form1 is notgreat and form2 is avg and points is high then result is home
+ // rozbicie
+ RULE 12 : if form1 is notgreat and form2 is notgreat and points is low then result is away
+ RULE 13 : if form1 is notgreat and form2 is notgreat and points is avg then result is draw
+ RULE 14 : if form1 is notgreat and form2 is notgreat and points is high then result is home
+ RULE 15 : if form1 is notgreat and form2 is great then result is away
+
+ // form1: avg | form2
+ RULE 16 : if form1 is avg and form2 is bad then result is home
+ RULE 17 : if form1 is avg and form2 is notbad then result is home
+ // rozbicie
+ RULE 18 : if form1 is avg and form2 is avg and points is low then result is away
+ RULE 19 : if form1 is avg and form2 is avg and points is avg then result is draw
+ RULE 20 : if form1 is avg and form2 is avg and points is high then result is home
+ RULE 21 : if form1 is avg and form2 is notgreat then result is away
+ RULE 22 : if form1 is avg and form2 is great then result is away
+
+
+ // form1: notbad | form2
+ RULE 23 : if form1 is notbad and form2 is bad then result is home
+ //rozbicie
+ RULE 24 : if form1 is notbad and form2 is notbad and points is low then result is away
+ RULE 25 : if form1 is notbad and form2 is notbad and points is avg then result is draw
+ RULE 26 : if form1 is notbad and form2 is notbad and points is high then result is home
+ RULE 27 : if form1 is notbad and form2 is avg then result is away
+ RULE 28 : if form1 is notbad and form2 is notgreat then result is away
+ RULE 29 : if form1 is notbad and form2 is great then result is away
+
+ // form1: bad | form2
+ //rozbicie
+ RULE 30 : if form1 is bad and form2 is bad and points is low then result is away
+ RULE 31 : if form1 is bad and form2 is bad and points is avg then result is draw
+ RULE 32 : if form1 is bad and form2 is bad and points is low then result is home
+ RULE 33 : if form1 is bad and form2 is notbad then result is away
+ RULE 34 : if form1 is bad and form2 is avg then result is away
+ RULE 35 : if form1 is bad and form2 is notgreat then result is away
+ RULE 36 : if form1 is bad and form2 is great then result is away
- RULE 7 : if form1 is bad and form2 is bad then result is draw
- RULE 8 : if form1 is bad and form2 is avg then result is away
- RULE 9 : if form1 is bad and form2 is great then result is away
- //RULE 10: if points is high then result is away
- //RULE 11: if points is high then result is draw
- //RULE 10: if form1 is great and form2 is bad and points is low then result is home
END_RULEBLOCK
END_FUNCTION_BLOCK