--- a/gdl/tictactoe.gdl Sun Jan 22 12:37:45 2017 +0000
+++ b/gdl/tictactoe.gdl Tue Feb 07 11:45:06 2017 +0000
@@ -6,23 +6,23 @@
;; Roles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (role xplayer)
- (role oplayer)
+(role xplayer)
+(role oplayer)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initial State
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (init (cell 1 1 b))
- (init (cell 1 2 b))
- (init (cell 1 3 b))
- (init (cell 2 1 b))
- (init (cell 2 2 b))
- (init (cell 2 3 b))
- (init (cell 3 1 b))
- (init (cell 3 2 b))
- (init (cell 3 3 b))
- (init (control xplayer))
+(init (cell 1 1 b))
+(init (cell 1 2 b))
+(init (cell 1 3 b))
+(init (cell 2 1 b))
+(init (cell 2 2 b))
+(init (cell 2 3 b))
+(init (cell 3 1 b))
+(init (cell 3 2 b))
+(init (cell 3 3 b))
+(init (control xplayer))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Dynamic Components
@@ -30,105 +30,105 @@
;; Cell
- (<= (next (cell ?m ?n x))
- (does xplayer (mark ?m ?n))
- (true (cell ?m ?n b)))
+(<= (next (cell ?m ?n x))
+ (does xplayer (mark ?m ?n))
+ (true (cell ?m ?n b)))
- (<= (next (cell ?m ?n o))
- (does oplayer (mark ?m ?n))
- (true (cell ?m ?n b)))
+(<= (next (cell ?m ?n o))
+ (does oplayer (mark ?m ?n))
+ (true (cell ?m ?n b)))
- (<= (next (cell ?m ?n ?w))
- (true (cell ?m ?n ?w))
- (distinct ?w b))
+(<= (next (cell ?m ?n ?w))
+ (true (cell ?m ?n ?w))
+ (distinct ?w b))
- (<= (next (cell ?m ?n b))
- (does ?w (mark ?j ?k))
- (true (cell ?m ?n b))
- (or (distinct ?m ?j) (distinct ?n ?k)))
+(<= (next (cell ?m ?n b))
+ (does ?w (mark ?j ?k))
+ (true (cell ?m ?n b))
+ (or (distinct ?m ?j) (distinct ?n ?k)))
- (<= (next (control xplayer))
- (true (control oplayer)))
+(<= (next (control xplayer))
+ (true (control oplayer)))
- (<= (next (control oplayer))
- (true (control xplayer)))
+(<= (next (control oplayer))
+ (true (control xplayer)))
- (<= (row ?m ?x)
- (true (cell ?m 1 ?x))
- (true (cell ?m 2 ?x))
- (true (cell ?m 3 ?x)))
+(<= (row ?m ?x)
+ (true (cell ?m 1 ?x))
+ (true (cell ?m 2 ?x))
+ (true (cell ?m 3 ?x)))
- (<= (column ?n ?x)
- (true (cell 1 ?n ?x))
- (true (cell 2 ?n ?x))
- (true (cell 3 ?n ?x)))
+(<= (column ?n ?x)
+ (true (cell 1 ?n ?x))
+ (true (cell 2 ?n ?x))
+ (true (cell 3 ?n ?x)))
- (<= (diagonal ?x)
- (true (cell 1 1 ?x))
- (true (cell 2 2 ?x))
- (true (cell 3 3 ?x)))
+(<= (diagonal ?x)
+ (true (cell 1 1 ?x))
+ (true (cell 2 2 ?x))
+ (true (cell 3 3 ?x)))
- (<= (diagonal ?x)
- (true (cell 1 3 ?x))
- (true (cell 2 2 ?x))
- (true (cell 3 1 ?x)))
+(<= (diagonal ?x)
+ (true (cell 1 3 ?x))
+ (true (cell 2 2 ?x))
+ (true (cell 3 1 ?x)))
- (<= (line ?x) (row ?m ?x))
- (<= (line ?x) (column ?m ?x))
- (<= (line ?x) (diagonal ?x))
+(<= (line ?x) (row ?m ?x))
+(<= (line ?x) (column ?m ?x))
+(<= (line ?x) (diagonal ?x))
- (<= open
- (true (cell ?m ?n b)))
+(<= open
+ (true (cell ?m ?n b)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (<= (legal ?w (mark ?x ?y))
- (true (cell ?x ?y b))
- (true (control ?w)))
+(<= (legal ?w (mark ?x ?y))
+ (true (cell ?x ?y b))
+ (true (control ?w)))
- (<= (legal xplayer noop)
- (true (control oplayer)))
+(<= (legal xplayer noop)
+ (true (control oplayer)))
- (<= (legal oplayer noop)
- (true (control xplayer)))
+(<= (legal oplayer noop)
+ (true (control xplayer)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (<= (goal xplayer 100)
- (line x))
+(<= (goal xplayer 100)
+ (line x))
- (<= (goal xplayer 50)
- (not (line x))
- (not (line o))
- (not open))
+(<= (goal xplayer 50)
+ (not (line x))
+ (not (line o))
+ (not open))
- (<= (goal xplayer 0)
- (line o))
+(<= (goal xplayer 0)
+ (line o))
- (<= (goal oplayer 100)
- (line o))
+(<= (goal oplayer 100)
+ (line o))
- (<= (goal oplayer 50)
- (not (line x))
- (not (line o))
- (not open))
+(<= (goal oplayer 50)
+ (not (line x))
+ (not (line o))
+ (not open))
- (<= (goal oplayer 0)
- (line x))
+(<= (goal oplayer 0)
+ (line x))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (<= terminal
- (line x))
+(<= terminal
+ (line x))
- (<= terminal
- (line o))
+(<= terminal
+ (line o))
- (<= terminal
- (not open))
+(<= terminal
+ (not open))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;