From 96f44f2cfba8806dcf9b85bedac5516f939fee18 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 12 Nov 2012 10:50:15 +0100 Subject: gradual_killer: Optimize rules a bit --- rules/gradual_killer.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rules/gradual_killer.pl b/rules/gradual_killer.pl index c40eeb9..2fb15cb 100644 --- a/rules/gradual_killer.pl +++ b/rules/gradual_killer.pl @@ -14,8 +14,7 @@ gradual_killer(_, d, [4], [5]). gradual_killer(_, c, [5], [6]). gradual_killer(_, c, [6], [7]). -gradual_killer([d,d|_], d, [7], [d]):-!. -gradual_killer(_, c, [7], [c]). +gradual_killer([d,d|_], d, [7], [8,d]):-!. +gradual_killer(_, c, [7], [8,c]). -gradual_killer(_, c, [c], [c]). -gradual_killer(_, d, [d], [d]). +gradual_killer(_, Choice, [8,Choice], [8,Choice]). -- cgit