You are not logged in. login register
Game dualconnect4
name dualconnect4
creator stephan
number of roles 2
stylesheet generic/generic.xsl
GDL v1
enabled
matches show matches
statistics show game statistics
description Dual Connect 4 is a disjunctively factorable joining of Connect4 and Connect4 Suicide. You win if you win on either board. by: Peter Pham

Game Description

( role red )
( role black )

( init ( control_normal red ) )
( init ( control_suicide black ) )

( <= ( base ( cell_normal ?x ?y ?p ) ) ( x ?x ) ( y ?y ) ( role ?p ) )
( <= ( base ( control_normal ?p ) ) ( role ?p ) )
( <= ( base ( control_suicide ?p ) ) ( role ?p ) )
( <= ( base ( cell_suicide ?x ?y ?p ) ) ( role ?p ) ( x ?x ) ( y ?y ) )

( <= ( input ?p noop ) ( role ?p ) )
( <= ( input ?p ( drop_normal ?x ) ) ( role ?p ) ( x ?x ) )
( <= ( input ?p ( drop_suicide ?x ) ) ( role ?p ) ( x ?x ) )

( <= ( legal ?p noop ) ( role ?p ) ( not ( true ( control_normal ?p ) ) ) ( not ( true ( control_suicide ?p ) ) ) )
( <= ( legal red ( drop_normal ?x ) ) ( true ( control_normal red ) ) ( column_open_normal ?x ) )
( <= ( legal black ( drop_normal ?x ) ) ( true ( control_normal black ) ) ( column_open_normal ?x ) )
( <= ( next ( cell_normal ?x 1 ?player ) ) ( does ?player ( drop_normal ?x ) ) ( column_empty_normal ?x ) )
( <= ( next ( cell_normal ?x ?y2 ?player ) ) ( does ?player ( drop_normal ?x ) ) ( cell_normal_open_normal ?x ?y2 ) ( succ ?y1 ?y2 ) ( not ( cell_normal_open_normal ?x ?y1 ) ) )
( <= ( next ( cell_normal ?x ?y ?player ) ) ( true ( cell_normal ?x ?y ?player ) ) )
( <= ( next ( control_normal red ) ) ( true ( control_normal black ) ) )
( <= ( next ( control_normal black ) ) ( true ( control_normal red ) ) )
( <= ( next ( control_suicide red ) ) ( true ( control_suicide black ) ) )
( <= ( next ( control_suicide black ) ) ( true ( control_suicide red ) ) )
( <= terminal_normal ( line_normal red ) )
( <= terminal_normal ( line_normal black ) )
( <= terminal_normal ( not board_open_normal ) )
( <= ( goal_normal red 100 ) ( line_normal red ) )
( <= ( goal_normal red 50 ) ( not ( line_normal red ) ) ( not ( line_normal black ) ) ( not board_open_normal ) )
( <= ( goal_normal red 0 ) ( line_normal black ) )
( <= ( goal_normal red 0 ) ( not ( line_normal red ) ) ( not ( line_normal black ) ) board_open_normal )
( <= ( goal_normal black 100 ) ( line_normal black ) )
( <= ( goal_normal black 50 ) ( not ( line_normal red ) ) ( not ( line_normal black ) ) ( not board_open_normal ) )
( <= ( goal_normal black 0 ) ( line_normal red ) )
( <= ( goal_normal black 0 ) ( not ( line_normal red ) ) ( not ( line_normal black ) ) board_open_normal )
( <= ( cell_normal_open_normal ?x ?y ) ( x ?x ) ( y ?y ) ( not ( true ( cell_normal ?x ?y red ) ) ) ( not ( true ( cell_normal ?x ?y black ) ) ) )
( <= ( column_open_normal ?x ) ( cell_normal_open_normal ?x 6 ) )
( <= ( column_empty_normal ?x ) ( cell_normal_open_normal ?x 1 ) )
( <= board_open_normal ( x ?x ) ( column_open_normal ?x ) )
( <= ( line_normal ?player ) ( true ( cell_normal ?x1 ?y ?player ) ) ( succ ?x1 ?x2 ) ( succ ?x2 ?x3 ) ( succ ?x3 ?x4 ) ( true ( cell_normal ?x2 ?y ?player ) ) ( true ( cell_normal ?x3 ?y ?player ) ) ( true ( cell_normal ?x4 ?y ?player ) ) )
( <= ( line_normal ?player ) ( true ( cell_normal ?x ?y1 ?player ) ) ( succ ?y1 ?y2 ) ( succ ?y2 ?y3 ) ( succ ?y3 ?y4 ) ( true ( cell_normal ?x ?y2 ?player ) ) ( true ( cell_normal ?x ?y3 ?player ) ) ( true ( cell_normal ?x ?y4 ?player ) ) )
( <= ( line_normal ?player ) ( true ( cell_normal ?x1 ?y1 ?player ) ) ( succ ?x1 ?x2 ) ( succ ?x2 ?x3 ) ( succ ?x3 ?x4 ) ( succ ?y1 ?y2 ) ( succ ?y2 ?y3 ) ( succ ?y3 ?y4 ) ( true ( cell_normal ?x2 ?y2 ?player ) ) ( true ( cell_normal ?x3 ?y3 ?player ) ) ( true ( cell_normal ?x4 ?y4 ?player ) ) )
( <= ( line_normal ?player ) ( true ( cell_normal ?x1 ?y4 ?player ) ) ( succ ?x1 ?x2 ) ( succ ?x2 ?x3 ) ( succ ?x3 ?x4 ) ( succ ?y3 ?y4 ) ( succ ?y2 ?y3 ) ( succ ?y1 ?y2 ) ( true ( cell_normal ?x2 ?y3 ?player ) ) ( true ( cell_normal ?x3 ?y2 ?player ) ) ( true ( cell_normal ?x4 ?y1 ?player ) ) )
( <= ( legal red ( drop_suicide ?x ) ) ( true ( control_suicide red ) ) ( column_open_suicide ?x ) )
( <= ( legal black ( drop_suicide ?x ) ) ( true ( control_suicide black ) ) ( column_open_suicide ?x ) )
( <= ( next ( cell_suicide ?x 1 ?player ) ) ( does ?player ( drop_suicide ?x ) ) ( column_empty_suicide ?x ) )
( <= ( next ( cell_suicide ?x ?y2 ?player ) ) ( does ?player ( drop_suicide ?x ) ) ( cell_suicide_open_suicide ?x ?y2 ) ( succ ?y1 ?y2 ) ( not ( cell_suicide_open_suicide ?x ?y1 ) ) )
( <= ( next ( cell_suicide ?x ?y ?player ) ) ( true ( cell_suicide ?x ?y ?player ) ) )
( <= terminal_suicide ( line_suicide red ) )
( <= terminal_suicide ( line_suicide black ) )
( <= terminal_suicide ( not board_open_suicide ) )
( <= ( goal_suicide red 100 ) ( line_suicide black ) )
( <= ( goal_suicide red 50 ) ( not board_open_suicide ) )
( <= ( goal_suicide red 0 ) ( line_suicide red ) )
( <= ( goal_suicide black 100 ) ( line_suicide red ) )
( <= ( goal_suicide black 50 ) ( not board_open_suicide ) )
( <= ( goal_suicide black 0 ) ( line_suicide black ) )
( <= ( cell_suicide_open_suicide ?x ?y ) ( x ?x ) ( y ?y ) ( not ( true ( cell_suicide ?x ?y red ) ) ) ( not ( true ( cell_suicide ?x ?y black ) ) ) )
( <= ( column_open_suicide ?x ) ( cell_suicide_open_suicide ?x 6 ) )
( <= ( column_empty_suicide ?x ) ( cell_suicide_open_suicide ?x 1 ) )
( <= board_open_suicide ( x ?x ) ( column_open_suicide ?x ) )
( <= ( line_suicide ?player ) ( true ( cell_suicide ?x1 ?y ?player ) ) ( succ ?x1 ?x2 ) ( succ ?x2 ?x3 ) ( succ ?x3 ?x4 ) ( true ( cell_suicide ?x2 ?y ?player ) ) ( true ( cell_suicide ?x3 ?y ?player ) ) ( true ( cell_suicide ?x4 ?y ?player ) ) )
( <= ( line_suicide ?player ) ( true ( cell_suicide ?x ?y1 ?player ) ) ( succ ?y1 ?y2 ) ( succ ?y2 ?y3 ) ( succ ?y3 ?y4 ) ( true ( cell_suicide ?x ?y2 ?player ) ) ( true ( cell_suicide ?x ?y3 ?player ) ) ( true ( cell_suicide ?x ?y4 ?player ) ) )
( <= ( line_suicide ?player ) ( true ( cell_suicide ?x1 ?y1 ?player ) ) ( succ ?x1 ?x2 ) ( succ ?x2 ?x3 ) ( succ ?x3 ?x4 ) ( succ ?y1 ?y2 ) ( succ ?y2 ?y3 ) ( succ ?y3 ?y4 ) ( true ( cell_suicide ?x2 ?y2 ?player ) ) ( true ( cell_suicide ?x3 ?y3 ?player ) ) ( true ( cell_suicide ?x4 ?y4 ?player ) ) )
( <= ( line_suicide ?player ) ( true ( cell_suicide ?x1 ?y4 ?player ) ) ( succ ?x1 ?x2 ) ( succ ?x2 ?x3 ) ( succ ?x3 ?x4 ) ( succ ?y3 ?y4 ) ( succ ?y2 ?y3 ) ( succ ?y1 ?y2 ) ( true ( cell_suicide ?x2 ?y3 ?player ) ) ( true ( cell_suicide ?x3 ?y2 ?player ) ) ( true ( cell_suicide ?x4 ?y1 ?player ) ) )

( <= ( normal_win ?p ) ( goal_normal ?p 100 ) )
( <= ( suicide_win ?p ) ( goal_suicide ?p 100 ) )
( <= ( win ?p ) ( normal_win ?p ) )
( <= ( win ?p ) ( suicide_win ?p ) )
( <= ( some_win ) (win ?p) )

( <= ( goal ?p 100 ) ( win ?p ) )
( <= ( goal ?p 50 ) ( role ?p ) ( not ( some_win ) ) )
( <= ( goal ?p 0 ) ( some_win ) ( role ?p ) ( not ( win ?p ) ) )


( <= terminal terminal_normal ) 
( <= terminal terminal_suicide )

( succ 1 2 )
( succ 2 3 )
( succ 3 4 )
( succ 4 5 )
( succ 5 6 )
( succ 6 7 )
( succ 7 8 )

( x 1 )
( x 2 )
( x 3 )
( x 4 )
( x 5 )
( x 6 )
( x 7 )
( x 8 )
( y 1 )
( y 2 )
( y 3 )
( y 4 )
( y 5 )
( y 6 )



sees_XML(...) rules

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