.Open Games GAME::=Net{ N person game. Players::Sets. Some Players. N::=No_of_players::=|Players|. Position: :Sets. moves::Position->@Position. moves::@Position->@Position=map[P:@Positions]{q:Position|| for some p:P, q in moves(p)}. State::Sets. win, loose,draw,undecided::State. value::Position->State. Won::=win./value. Lost::=loose./value. Drawn::=draw./value. For all p:Position ( p in Won|Lost|Draw iff moves(p)={}). Winning, Loosing::@Position. Won==>Winning. Lost==>Loosing. No Winning & Loosing. Initial::@Position. loops::@= some p:positions( p in moves;do(moves) ). }=::GAME. SOLITAIRE::={ A game with one player were there may be a chance of winning and one initial state GAME and No_of_players=1. For all p:Loosing, p.moves==>Loosing. Draw={}. possible::@= Initial==>Winning and for all p:Winning, some p.moves & Winning. Rubik's cube is a patience game with loops. Solitare card games have no loops. Rubik's cube has no Loosing positions, a single Won position, and a finite but large set of Winning positions. Call such a game a maze: maze::@= Winning=Position is Finite and |Won|=1. }=::SOLITAIRE. 2_PERSON_GAME::=Net{ |- GAME and No_of_players=2. black,white::Players. Winning::= { p:Position || p in Won or p.moves==>Lost or for all q:p.moves, some r:q.moves (r in Winning) }. Loosing::= { p:Position || p in Lost or some p.moves & Winning or for some q:p.moves, all r:q.moves (r in Loosing) }. play_alternately::@= For some State:Sets ( Position = Players >< State ) and for all p:Position, q:moves(p) ( p.1st<>q.1st ). }=::2_PERSON_GAME. BOARD_GAME::=Net{ |- GAME. Board::Sets. Type_of_piece::Sets. |- Position=Board->{empty}|Piece. |- Piece=Players>Grid). |- 2_PERSON_GAME(play_alternately). |- Type_of_piece={mark}. nought::Piece=(black,mark), cross::Piece=(white, mark). |- Board=1..3><1..3. Rows::={ {(r,c):Board||r:1..3}||c:1..3 }, Cols::={ {(r,c):Board||c:1..3}||r:1..3 }, Diagonals::={ {(1,1),(2,2),(3,3)} , {(1,3),(2,2),(3,1)} }. |- Position=Player>q./Position) }. .Hole }=::tictactoe. .Close Games