You are not logged in. login register
Game 3conn3
name 3conn3
creator stephan
number of roles 3
stylesheet chess_like/chess_like_automatic.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description 3conn3 is a three player version of Connect Four except a player needs just 3 coins in a line to win the match.
GDL by: Arne König, Christian Drescher, Max Ostrowski and Torsten Grote
http://deepthought.23inch.de/

Game Description

(role red)
(role green)
(role yellow)
(init (cell 1 1 b))
(init (cell 1 2 b))
(init (cell 1 3 b))
(init (cell 1 4 b))
(init (cell 1 5 b))
(init (cell 1 6 b))
(init (cell 2 1 b))
(init (cell 2 2 b))
(init (cell 2 3 b))
(init (cell 2 4 b))
(init (cell 2 5 b))
(init (cell 2 6 b))
(init (cell 3 1 b))
(init (cell 3 2 b))
(init (cell 3 3 b))
(init (cell 3 4 b))
(init (cell 3 5 b))
(init (cell 3 6 b))
(init (cell 4 1 b))
(init (cell 4 2 b))
(init (cell 4 3 b))
(init (cell 4 4 b))
(init (cell 4 5 b))
(init (cell 4 6 b))
(init (cell 5 1 b))
(init (cell 5 2 b))
(init (cell 5 3 b))
(init (cell 5 4 b))
(init (cell 5 5 b))
(init (cell 5 6 b))
(init (cell 6 1 b))
(init (cell 6 2 b))
(init (cell 6 3 b))
(init (cell 6 4 b))
(init (cell 6 5 b))
(init (cell 6 6 b))
(init (cell 7 1 b))
(init (cell 7 2 b))
(init (cell 7 3 b))
(init (cell 7 4 b))
(init (cell 7 5 b))
(init (cell 7 6 b))
(init (control red))
(succ 1 2)
(succ 2 3)
(succ 3 4)
(succ 4 5)
(succ 5 6)
(succ 6 7)
(<= (cm ?c ?r)
    (or (true (cell ?c ?r red)) (true (cell ?c ?r green)) (true (cell ?c ?r yellow))))
(<= (sequential ?a ?b ?c)
    (succ ?a ?b)
    (succ ?b ?c))
(<= (top-unused ?c ?r)
    (true (cell ?c ?r b))
    (cm ?c ?s)
    (succ ?s ?r))
(<= (top-unused ?c 1)
    (true (cell ?c 1 b)))
(<= (plays-on ?c ?r)
    (does ?x (drop ?c))
    (top-unused ?c ?r))
(<= (next (cell ?c ?r ?x))
    (true (cell ?c ?r ?x))
    (not (plays-on ?c ?r)))
(<= (next (control green))
    (true (control red)))
(<= (next (control yellow))
    (true (control green)))
(<= (next (control red))
    (true (control yellow)))
(<= (legal ?x (drop ?c))
    (true (cell ?c 6 b))
    (true (control ?x)))
(<= (legal red noop)
    (or (true (control green)) (true (control yellow))))
(<= (legal green noop)
    (or (true (control red)) (true (control yellow))))
(<= (legal yellow noop)
    (or (true (control red)) (true (control green))))
(<= (next (cell ?c ?r ?color))
    (does ?color (drop ?c))
    (top-unused ?c ?r))
(<= (row ?x)
    (sequential ?a ?b ?c)
    (true (cell ?a ?r ?x))
    (true (cell ?b ?r ?x))
    (true (cell ?c ?r ?x)))
(<= (col ?x)
    (sequential ?a ?b ?c)
    (true (cell ?e ?a ?x))
    (true (cell ?e ?b ?x))
    (true (cell ?e ?c ?x)))
(<= (diag1 ?x)
    (sequential ?a ?b ?c)
    (sequential ?e ?f ?g)
    (true (cell ?a ?e ?x))
    (true (cell ?b ?f ?x))
    (true (cell ?c ?g ?x)))
(<= (diag2 ?x)
    (sequential ?a ?b ?c)
    (sequential ?e ?f ?g)
    (true (cell ?a ?g ?x))
    (true (cell ?b ?f ?x))
    (true (cell ?c ?e ?x)))
(<= (connthree ?x)
    (or (col ?x) (row ?x) (diag1 ?x) (diag2 ?x)))
(<= (goal ?x 50)
    (not (connthree red))
    (not (connthree green))
    (not (connthree yellow))
    (role ?x))
(<= (goal ?color 100)
    (role ?color)
    (connthree ?color))
(<= (goal red 0)
    (or (connthree green) (connthree yellow)))
(<= (goal green 0)
    (or (connthree red) (connthree yellow)))
(<= (goal yellow 0)
    (or (connthree red) (connthree green)))
(<= terminal
    (or (connthree red) (connthree green) (connthree yellow)))
(<= (not-filled)
    (true (cell ?c 6 b)))
(<= terminal
    (not (not-filled)))

sees_XML(...) rules

(<= (sees_xml random ?t) (true ?t))
(<= (sees_xml ?p ?t) (role ?p) (distinct ?p random) (true ?t))