[Toss-devel-svn] SF.net SVN: toss:[1376] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2011-03-21 23:38:19
|
Revision: 1376
http://toss.svn.sourceforge.net/toss/?rev=1376&view=rev
Author: lukstafi
Date: 2011-03-21 23:38:06 +0000 (Mon, 21 Mar 2011)
Log Message:
-----------
GDL action translation adopted to game simplification. GDL test cases extended with action translation tests. Small GDL test case: tictactoe. More logging.
Modified Paths:
--------------
trunk/Toss/Arena/Arena.ml
trunk/Toss/Arena/Arena.mli
trunk/Toss/Arena/ContinuousRule.ml
trunk/Toss/Arena/ContinuousRule.mli
trunk/Toss/GGP/GDL.ml
trunk/Toss/GGP/GDL.mli
trunk/Toss/GGP/GDLParser.mly
trunk/Toss/GGP/GDLTest.ml
trunk/Toss/GGP/GameSimpl.ml
trunk/Toss/GGP/GameSimpl.mli
trunk/Toss/GGP/GameSimplTest.ml
trunk/Toss/GGP/tests/breakthrough-simpl.toss
trunk/Toss/GGP/tests/connect5-simpl.toss
Added Paths:
-----------
trunk/Toss/GGP/tests/tictactoe-raw.toss
trunk/Toss/GGP/tests/tictactoe-simpl.toss
Modified: trunk/Toss/Arena/Arena.ml
===================================================================
--- trunk/Toss/Arena/Arena.ml 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/Arena/Arena.ml 2011-03-21 23:38:06 UTC (rev 1376)
@@ -60,6 +60,14 @@
(* -------------------- PARSER HELPER ------------------------------ *)
+let emb_of_names (game, state) rname emb_str =
+ let lhs =
+ (List.assoc rname game.rules
+ ).ContinuousRule.discrete.DiscreteRule.lhs_struc in
+ List.map (fun (lhs_e, m_e) ->
+ Structure.find_elem lhs lhs_e, Structure.find_elem state.struc m_e)
+ emb_str
+
(* Rules with which a player with given number can move. *)
let rules_for_player player_no game =
let rules_of_loc l =
@@ -935,11 +943,9 @@
let r = List.assoc r_name state_game.rules in
let matches = ContinuousRule.matches_post struc r state.time in
(* matches are from LHS to model *)
- let name (lhs,rhs) =
- Structure.elem_str (ContinuousRule.lhs r) lhs ^ " -> " ^
- Structure.elem_str struc rhs in
- let mname m = String.concat ", " (List.map name m) in
- ((state_game, state), String.concat "; " (List.map mname matches))
+ ((state_game, state),
+ String.concat "; " (
+ List.map (ContinuousRule.embedding_str r struc) matches))
with Not_found ->
((state_game, state), "ERR getting "^r_name^" matches, rule not found")
)
Modified: trunk/Toss/Arena/Arena.mli
===================================================================
--- trunk/Toss/Arena/Arena.mli 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/Arena/Arena.mli 2011-03-21 23:38:06 UTC (rev 1376)
@@ -40,6 +40,10 @@
val empty_state : game * game_state
+(** Translate from names to elements to get rule embedding. *)
+val emb_of_names :
+ game * game_state -> string -> (string * string) list -> (int * int) list
+
(** Rules with which a player with given number can move. *)
val rules_for_player : int -> game -> string list
Modified: trunk/Toss/Arena/ContinuousRule.ml
===================================================================
--- trunk/Toss/Arena/ContinuousRule.ml 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/Arena/ContinuousRule.ml 2011-03-21 23:38:06 UTC (rev 1376)
@@ -250,6 +250,11 @@
fprint Format.str_formatter r;
Format.flush_str_formatter ()
+let embedding_str r struc emb =
+ let name (lhs_e,rhs_e) =
+ Structure.elem_str (lhs r) lhs_e ^ " -> " ^
+ Structure.elem_str struc rhs_e in
+ String.concat ", " (List.map name emb)
(* Compare two rules and explain the first difference
met. Formulas and expressions are compared for structural equality. *)
Modified: trunk/Toss/Arena/ContinuousRule.mli
===================================================================
--- trunk/Toss/Arena/ContinuousRule.mli 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/Arena/ContinuousRule.mli 2011-03-21 23:38:06 UTC (rev 1376)
@@ -39,6 +39,8 @@
val fprint : Format.formatter -> rule -> unit
val print : rule -> unit
val sprint : rule -> string
+val embedding_str :
+ rule -> Structure.structure -> (int * int) list -> string
(** {2 Applying function to side structures} *)
Modified: trunk/Toss/GGP/GDL.ml
===================================================================
--- trunk/Toss/GGP/GDL.ml 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GDL.ml 2011-03-21 23:38:06 UTC (rev 1376)
@@ -484,6 +484,9 @@
(V_1 - V_K) :(phi_1) + ... (V_n - V_K) :(phi_n)" thus removing
phi_K from translation.
+ (8d) Finally, we simplify the result. Unused predicates are not
+ removed, because some of them will be needed for action translation.
+
(9) To translate an incoming action, we:
(9a) find the "lead legal" term to which the "does move" ground
@@ -544,6 +547,9 @@
type pair_matrix = Pairs_all | Pairs_triang | Pairs_star
let equivalences_all_tuples = ref Pairs_triang
+(** Generate test case for the given game name. *)
+let generate_test_case = ref None
+
open Aux.BasicOperators
type term =
@@ -659,6 +665,28 @@
| Currently arg -> "true", [arg]
| Does (arg1, arg2) -> "does", [arg1; arg2]
+let fprint_gdl_transl_data ?(details=false) ppf gdl =
+ (* TODO: print more data if needed *)
+ Format.fprintf ppf "GDL_DATA@,{@[<1>FLUENTS@ %a;@ PLAYING_AS@ %d;"
+ (Aux.fprint_sep_list ";" Format.pp_print_string) gdl.fluents
+ gdl.playing_as;
+ Aux.StrMap.iter (fun rname data ->
+ Format.fprintf ppf "@ @[<1>RULE@ %s:@ LEGAL=@,%s;@ PRECOND=@,%a;@ "
+ rname (term_str data.lead_legal) Formula.fprint data.precond;
+ Format.fprintf ppf "{@[<1>RHS ADD:@ ";
+ Aux.fprint_sep_list ";" Format.pp_print_string ppf
+ (List.map (fun (rel,args) -> rel^"("^String.concat ", "
+ (Array.to_list args)^")") data.rhs_add);
+ Format.fprintf ppf "@]}@]"
+ ) gdl.tossrule_data;
+ Format.fprintf ppf "@]}"
+
+let sprint_gdl_transl_data ?(details=false) gdl =
+ ignore (Format.flush_str_formatter ());
+ Format.fprintf Format.str_formatter "@[%a@]"
+ (fprint_gdl_transl_data ~details) gdl;
+ Format.flush_str_formatter ()
+
let rec body_of_literal = function
| Pos (Distinct args) ->
[Aux.Right ("distinct", args)] (* not negated actually! *)
@@ -3435,18 +3463,26 @@
time = 0.;
cur_loc = 0;
} in
- (* {{{ log entry *)
- (* *
- let file = open_out "./GGP/tests/breakthrough-raw.toss" in
- output_string file (Arena.state_str result);
- close_out file;
- * *)
+ (* {{{ log entry *)
+ (match !generate_test_case with
+ | None -> ()
+ | Some game_name ->
+ let file = open_out ("./GGP/tests/"^game_name^"-raw.toss") in
+ output_string file (Arena.state_str result);
+ close_out file);
if !debug_level > 1 then (
Printf.printf "\n\nGDL.translate_game: before simplification --\n%s\n%!"
(Arena.sprint_state result)
);
(* }}} *)
+ (* 8d *)
let result = GameSimpl.simplify result in
+ let tossrule_data =
+ Aux.StrMap.mapi (fun rname rdata ->
+ let r = List.assoc rname (fst result).Arena.rules in
+ {rdata with precond =
+ r.ContinuousRule.compiled.DiscreteRule.lhs_form}
+ ) !tossrule_data in
let playing_as = find_player player_term in
let noop_actions =
Array.mapi (fun loc noops->
@@ -3456,18 +3492,19 @@
| _ -> None
) loc_noop_legal in
(* {{{ log entry *)
- (* *
- let file = open_out "./GGP/tests/breakthrough-simpl.toss" in
- output_string file (Arena.state_str result);
- close_out file;
- * *)
+ (match !generate_test_case with
+ | None -> ()
+ | Some game_name ->
+ let file = open_out ("./GGP/tests/"^game_name^"-simpl.toss") in
+ output_string file (Arena.state_str result);
+ close_out file);
if !debug_level > 1 then (
Printf.printf "\n\nGDL.translate_game: after simplification --\n%s\n%!"
(Arena.sprint_state result)
);
(* }}} *)
{anchor_terms = !anchor_terms;
- tossrule_data = !tossrule_data;
+ tossrule_data = tossrule_data;
t_elements = t_elements;
playing_as = playing_as;
noop_actions = noop_actions;
@@ -3500,88 +3537,90 @@
let actions = Array.of_list actions in
let location = (fst state).Arena.graph.(loc) in
let player_action = actions.(location.Arena.player) in
+ let struc = (snd state).Arena.struc in
+ (* {{{ log entry *)
+ if !debug_level > 2 then (
+ Printf.printf "\ntranslate_incoming_move:\nGDL=%s\n%!"
+ (sprint_gdl_transl_data gdl)
+ );
+ if !debug_level > 3 then (
+ Printf.printf "STRUC=%s\n%!" (Structure.sprint struc)
+ );
+ (* }}} *)
(* 9a *)
let tossrules =
Aux.strmap_filter (fun _ rdata ->
try ignore (match_meta [] [] [player_action] [rdata.lead_legal]); true
with Not_found -> false
) gdl.tossrule_data in
- let tossrules = Aux.collect
- (List.map (fun (rname, rdata) ->
- rdata.lead_legal,
- (rname, rdata.precond, rdata.rhs_add, rdata.struc_elems,
- rdata.fixvar_elemvars)) tossrules) in
- let lead, tossrules =
- match tossrules with
- | [lead, tossrules] -> lead, tossrules
- | _ -> assert false in
(* {{{ log entry *)
if !debug_level > 0 then (
- Printf.printf "GDL.translate_incoming_move: action=%s; lead=%s\n%!"
- (term_str player_action) (term_str lead)
+ Printf.printf "GDL.translate_incoming_move: action=%s\n%!"
+ (term_str player_action)
);
(* }}} *)
(* 9c *)
- let fixed_inst, _ =
- match_meta [] [] [player_action] [lead] in
- let struc = (snd state).Arena.struc in
- let candidates = Aux.map_some (
- fun (rname, precond, add, struc_elems, fixvar_elemvars) ->
+ let candidates = Aux.map_some (fun (rname, rdata) ->
+ let fixed_inst, _ =
+ match_meta [] [] [player_action] [rdata.lead_legal] in
(* 9d *)
(* {{{ log entry *)
- if !debug_level > 4 then (
- Printf.printf "fixvar_elemvars: %s\n%!"
- (String.concat "; "
- (List.map (fun (v,ts)->v^": "^
- String.concat ", " (List.map (fun (t,_)->term_str t) ts))
- fixvar_elemvars))
- );
+ if !debug_level > 4 then (
+ Printf.printf "fixvar_elemvars: %s\n%!"
+ (String.concat "; "
+ (List.map (fun (v,ts)->v^": "^
+ String.concat ", " (List.map (fun (t,_)->term_str t) ts))
+ rdata.fixvar_elemvars))
+ );
(* }}} *)
- let anchors = Aux.concat_map (fun (v,t) ->
- let elemvars = List.assoc v fixvar_elemvars in
- Aux.concat_map (fun (mask, pevs) ->
- Aux.concat_map (fun (path, evs) ->
- let pred = List.assoc t
- (List.assoc path (List.assoc mask gdl.anchor_terms)) in
- List.map (fun ev->
- Formula.Rel (pred, [|Formula.fo_var_of_string
- (String.lowercase ev)|])) evs)
- pevs) elemvars
- ) fixed_inst in
- let precond = Formula.And (anchors @ [precond]) in
+ let anchors = Aux.concat_map (fun (v,t) ->
+ let elemvars = List.assoc v rdata.fixvar_elemvars in
+ Aux.concat_map (fun (mask, pevs) ->
+ Aux.concat_map (fun (path, evs) ->
+ let pred = List.assoc t
+ (List.assoc path (List.assoc mask gdl.anchor_terms)) in
+ List.map (fun ev->
+ Formula.Rel (pred, [|Formula.fo_var_of_string
+ (String.lowercase ev)|])) evs)
+ pevs) elemvars
+ ) fixed_inst in
+ let precond = Formula.And (anchors @ [rdata.precond]) in
(* {{{ log entry *)
- if !debug_level > 4 then (
- Printf.printf "GDL.translate_incoming_move: trying precond=\n%s\n...%!"
- (Formula.sprint precond)
- );
+ if !debug_level > 2 then (
+ Printf.printf
+ "GDL.translate_incoming_move: rule=%s; trying precond=\n%s\n...%!"
+ rname (Formula.sprint precond)
+ );
(* }}} *)
- let signat = Structure.rel_signature struc in
- let rule =
- DiscreteRule.translate_from_precond ~precond ~add
- ~emb_rels:gdl.fluents ~signat ~struc_elems in
- let lhs_struc = rule.DiscreteRule.lhs_struc in
- let rule = DiscreteRule.compile_rule
- (Structure.rel_signature struc) [] rule in
- let asgns =
- DiscreteRule.find_matchings struc rule in
+ let signat = Structure.rel_signature struc in
+ let rule =
+ DiscreteRule.translate_from_precond ~precond ~add:rdata.rhs_add
+ ~emb_rels:gdl.fluents ~signat ~struc_elems:rdata.struc_elems in
+ let lhs_struc = rule.DiscreteRule.lhs_struc in
+ let rule = DiscreteRule.compile_rule signat [] rule in
+ let asgns =
+ DiscreteRule.find_matchings struc rule in
(* {{{ log entry *)
- if !debug_level > 2 then (
- Printf.printf "found %s\n%!" (AssignmentSet.str asgns)
- );
+ if !debug_level > 2 then (
+ Printf.printf "found %s\n%!" (AssignmentSet.str asgns)
+ );
(* }}} *)
(* faster *)
(* let emb =
DiscreteRule.choose_match (snd state).Arena.struc rule asgns in *)
(* but we should check whether there's no ambiguity... *)
- match
- DiscreteRule.enumerate_matchings struc rule asgns
- with
- | [] -> None
- | [emb] -> Some (rname, emb, lhs_struc)
- | _ -> failwith
- ("GDL.translate_incoming_move: match ambiguity for rule "^rname)
+ match
+ DiscreteRule.enumerate_matchings struc rule asgns
+ with
+ | [] -> None
+ | [emb] -> Some (rname, emb, lhs_struc)
+ | _ -> failwith
+ ("GDL.translate_incoming_move: match ambiguity for rule "^rname)
) tossrules in
match candidates with
+ | [] ->
+ failwith
+ "GDL.translate_incoming_move: no matching rule found"
| [rname, emb, lhs_struc] ->
(* {{{ log entry *)
if !debug_level > 0 then (
@@ -3593,9 +3632,21 @@
);
(* }}} *)
rname, emb
- | _ -> failwith
- ("GDL.translate_incoming_move: ambiguity among rules "^
- String.concat ", " (List.map Aux.fst3 candidates))
+ | _ ->
+ (* {{{ log entry *)
+ if !debug_level > 0 then (
+ Printf.printf "GDL.translate_incoming_move: ambiguity\n%!";
+ List.iter (fun (rname, emb, lhs_struc) ->
+ Printf.printf "rname=%s; emb=%s\n%!"
+ rname
+ (String.concat ", " (List.map (fun (v,e) ->
+ Structure.elem_str lhs_struc v ^ ": " ^
+ Structure.elem_str struc e) emb))) candidates
+ );
+ (* }}} *)
+ failwith
+ ("GDL.translate_incoming_move: ambiguity among rules "^
+ String.concat ", " (List.map Aux.fst3 candidates))
(*
Modified: trunk/Toss/GGP/GDL.mli
===================================================================
--- trunk/Toss/GGP/GDL.mli 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GDL.mli 2011-03-21 23:38:06 UTC (rev 1376)
@@ -9,6 +9,9 @@
type pair_matrix = Pairs_all | Pairs_triang | Pairs_star
val equivalences_all_tuples : pair_matrix ref
+(** Generate test case for the given game name. *)
+val generate_test_case : string option ref
+
val manual_translation : bool ref
val manual_game : string ref
val top_exec_path : string ref
@@ -96,11 +99,19 @@
term -> game_descr_entry list -> int ->
(Arena.game * Arena.game_state) * (int * int * float) option * gdl_translation
+val translate_incoming_move :
+ gdl_translation -> Arena.game * Arena.game_state -> term list ->
+ string * DiscreteRule.matching
+(** As {!GDL.translate_incoming_move}, but with optional manual translation. *)
val translate_last_action :
gdl_translation -> Arena.game * Arena.game_state -> term list ->
string * DiscreteRule.matching
(** Rule name, embedding, game state. *)
+val translate_outgoing_move :
+ gdl_translation -> Arena.game * Arena.game_state ->
+ string -> (int * int) list -> string
+(** As {!GDL.translate_outgoing_move}, but with optional manual translation. *)
val translate_move : gdl_translation -> Arena.game * Arena.game_state ->
string -> (int * int) list -> string
Modified: trunk/Toss/GGP/GDLParser.mly
===================================================================
--- trunk/Toss/GGP/GDLParser.mly 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GDLParser.mly 2011-03-21 23:38:06 UTC (rev 1376)
@@ -14,8 +14,9 @@
%token FORALL EXISTS EOF
-%start parse_game_description parse_request
+%start parse_game_description parse_request parse_term
%type <GDL.request> parse_request request
+%type <GDL.term> parse_term
%type <GDL.game_descr_entry list> parse_game_description game_description
@@ -173,3 +174,6 @@
parse_request:
| request EOF { $1 }
+
+parse_term:
+ | term EOF { $1 }
Modified: trunk/Toss/GGP/GDLTest.ml
===================================================================
--- trunk/Toss/GGP/GDLTest.ml 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GDLTest.ml 2011-03-21 23:38:06 UTC (rev 1376)
@@ -5,6 +5,12 @@
GDLParser.parse_game_description KIFLexer.lex
(Lexing.from_string s)
+let parse_term s =
+ GDLParser.parse_term KIFLexer.lex
+ (Lexing.from_string s)
+
+let pte = parse_term
+
let state_of_file s =
let f = open_in s in
let res =
@@ -19,6 +25,14 @@
(Lexing.from_channel f) in
(* List.map GDL.rule_of_entry *) descr
+let emb_str (game, state) (rname, emb) =
+ let r = List.assoc rname game.Arena.rules in
+ let struc = state.Arena.struc in
+ ContinuousRule.embedding_str r struc emb
+
+let norm_move (rname,emb) =
+ rname, List.sort Pervasives.compare emb
+
let check_alternate players playout =
let rec aux turn playout =
match turn, playout with
@@ -30,6 +44,47 @@
else aux turn playout in
aux players playout
+let game_test_case ~game_name ~player ~loc0_rule_name ~loc0_emb
+ ~loc0_move ~loc0_noop ~loc1 ~loc1_rule_name ~loc1_emb ~loc1_noop
+ ~loc1_move =
+ let game = load_rules ("./GGP/examples/"^game_name^".gdl") in
+ let gdl, res = GDL.translate_game (Const player) game in
+ let goal = state_of_file ("./GGP/tests/"^game_name^"-simpl.toss") in
+ let resf = open_out ("./GGP/tests/"^game_name^"-temp.toss") in
+ let res_str = Arena.state_str res in
+ output_string resf res_str;
+ close_out resf;
+ let eq, msg = Arena.compare_diff goal res in
+ assert_bool
+ ("GGP/examples/"^game_name^".gdl to GGP/tests/"^game_name^
+ "-simpl.toss, see GGP/tests/"^game_name^"-temp.toss: "^msg)
+ eq;
+ Sys.remove ("./GGP/tests/"^game_name^"-temp.toss");
+ let rname = loc0_rule_name in
+ let emb =
+ Arena.emb_of_names res rname loc0_emb in
+ let transl =
+ GDL.translate_outgoing_move gdl res rname emb in
+ assert_equal ~printer:(fun x->x) loc0_move transl;
+ let move =
+ GDL.translate_incoming_move gdl res
+ [pte loc0_move; pte loc0_noop] in
+ assert_equal ~msg:"own incoming move" ~printer:(emb_str res)
+ (norm_move (rname, emb)) (norm_move move);
+ let req = Arena.ApplyRuleInt (rname, emb, 0.1, []) in
+ let ((game,state), _) = Arena.handle_request res req in
+ let res = game, {state with Arena.cur_loc = loc1} in
+ let rname = loc1_rule_name in
+ let emb =
+ Arena.emb_of_names res rname loc1_emb in
+ let move =
+ GDL.translate_incoming_move gdl res
+ [pte loc1_noop; pte loc1_move] in
+ assert_equal ~msg:"opponent incoming move"
+ ~printer:(emb_str res)
+ (norm_move (rname, emb)) (norm_move move)
+
+
let tests = "GDL" >::: [
"saturate" >::
@@ -82,46 +137,56 @@
(String.concat "\n"
(List.map GDL.exp_def_str res));
);
+
+ "tictactoe" >::
+ (fun () ->
+ game_test_case ~game_name:"tictactoe" ~player:"xplayer"
+ ~loc0_rule_name:"mark_x_y_0"
+ ~loc0_emb:[
+ "cell_x_y__blank_", "cell_2_2_MV1";
+ "control__blank_", "control_MV1"]
+ ~loc0_move:"(mark 2 2)" ~loc0_noop:"noop"
+ ~loc1:1 ~loc1_rule_name:"mark_x_y_1"
+ ~loc1_emb:[
+ "cell_x_y__blank_", "cell_1_1_MV1";
+ "control__blank_", "control_MV1"]
+ ~loc1_noop:"noop" ~loc1_move:"(mark 1 1)"
+ );
]
let bigtests = "GDLBig" >::: [
"connect5" >::
(fun () ->
- let connect5 = load_rules "./GGP/examples/connect5.gdl" in
- let _, res = GDL.translate_game (Const "x") connect5 in
- let goal = state_of_file "./GGP/tests/connect5-simpl.toss" in
- let resf = open_out "./GGP/tests/connect5-temp.toss" in
- let res_str = Arena.state_str res in
- output_string resf res_str;
- close_out resf;
- let eq, msg = Arena.compare_diff goal res in
- assert_bool
- ("GGP/examples/connect5.gdl to GGP/tests/connect5-simpl.toss, \
- see GGP/tests/connect5-temp.toss: "^msg)
- eq;
- Sys.remove "./GGP/tests/connect5-temp.toss"
+ game_test_case ~game_name:"connect5" ~player:"x"
+ ~loc0_rule_name:"mark_x149_y149_0"
+ ~loc0_emb:[
+ "cell_x149_y149__blank_", "cell_e_f_MV1";
+ "control__blank_", "control_MV1"]
+ ~loc0_move:"(mark e f)" ~loc0_noop:"noop"
+ ~loc1:1 ~loc1_rule_name:"mark_x159_y159_1"
+ ~loc1_emb:[
+ "cell_x159_y159__blank_", "cell_f_g_MV1";
+ "control__blank_", "control_MV1"]
+ ~loc1_noop:"noop" ~loc1_move:"(mark f g)"
);
"breakthrough" >::
(fun () ->
- let breakthrough = load_rules "./GGP/examples/breakthrough.gdl" in
- let _, res = GDL.translate_game (Const "white") breakthrough in
- let goal = state_of_file "./GGP/tests/breakthrough-simpl.toss" in
- let resf = open_out "./GGP/tests/breakthrough-temp.toss" in
- let res_str = Arena.state_str res in
- output_string resf res_str;
- close_out resf;
- let eq, msg = Arena.compare_diff goal res in
- assert_bool
- ("GGP/examples/breakthrough.gdl to \
- GGP/tests/breakthrough-simpl.toss, see
- GGP/tests/breakthrough-temp.toss: "^msg)
- eq;
- Sys.remove "./GGP/tests/breakthrough-temp.toss"
+ game_test_case ~game_name:"breakthrough" ~player:"white"
+ ~loc0_rule_name:"move_x1_y1_x2_y2_00"
+ ~loc0_emb:[
+ "cellholds_x1_y1__blank_", "cellholds_2_2_MV1";
+ "cellholds_x2_y2__blank_", "cellholds_3_3_MV1";
+ "control__blank_", "control_MV1"]
+ ~loc0_move:"(move 2 2 3 3)" ~loc0_noop:"noop" ~loc1:1
+ ~loc1_rule_name:"move_x1_y1_x2_y2_1"
+ ~loc1_emb:[
+ "cellholds_x1_y1__blank_", "cellholds_7_7_MV1";
+ "cellholds_x2_y2__blank_", "cellholds_6_6_MV1";
+ "control__blank_", "control_MV1"]
+ ~loc1_noop:"noop" ~loc1_move:"(move 7 7 6 6)"
);
-
-
]
@@ -132,19 +197,26 @@
Aux.run_test_if_target "GDLTest" bigtests
let a () =
+ GDL.debug_level := 4;
+ (* GameSimpl.debug_level := 4; *)
+ (* DiscreteRule.debug_level := 4; *)
+ ()
+
+let a () =
match test_filter
- ["GDL:2:masks"]
- tests
+ [(* "GDLBig:1:breakthrough" *) "GDLBig:0:connect5"]
+ bigtests
with
| Some tests -> ignore (run_test_tt ~verbose:true tests)
| None -> ()
let a () =
+ let game_name = "tictactoe" in
+ let player = "xplayer" in
(* GDL.debug_level := 4; *)
(* GameSimpl.debug_level := 4; *)
(* DiscreteRule.debug_level := 4; *)
- let breakthrough = load_rules "./GGP/examples/breakthrough.gdl" in
- let connect5 = load_rules "./GGP/examples/connect5.gdl" in
- let tictactoe = load_rules "./GGP/examples/tictactoe.gdl" in
- let gdl_def, toss_def = GDL.translate_game (Const "white") breakthrough in
- ignore gdl_def; ignore connect5; ignore breakthrough; ignore tictactoe
+ GDL.generate_test_case := Some game_name;
+ let game = load_rules ("./GGP/examples/"^game_name^".gdl") in
+ ignore (GDL.translate_game (Const player) game);
+ GDL.generate_test_case := None
Modified: trunk/Toss/GGP/GameSimpl.ml
===================================================================
--- trunk/Toss/GGP/GameSimpl.ml 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GameSimpl.ml 2011-03-21 23:38:06 UTC (rev 1376)
@@ -93,7 +93,7 @@
(4) Update rewrite rule signatures to contain all introduced
relations. Remove from the structures relations that are no longer
- used.
+ used; if [keep_predicates] is true, do not remove predicates.
*)
open Formula
@@ -130,7 +130,7 @@
module Tups = Structure.Tuples
-let simplify (game, state) =
+let simplify ?(keep_predicates=true) (game, state) =
let struc = state.Arena.struc in
let signat = Structure.rel_signature struc in
let nelems = Structure.Elems.cardinal struc.Structure.elements in
@@ -747,6 +747,7 @@
if DiscreteRule.special_rel_of rel = None then rel
else DiscreteRule.orig_rel_of rel in
let res =
+ (not keep_predicates || List.assoc rel signat > 1) &&
not (List.mem rel fluents) &&
not (List.mem_assoc rel game.Arena.defined_rels) &&
not (Aux.Strings.mem rel used_rels) in
Modified: trunk/Toss/GGP/GameSimpl.mli
===================================================================
--- trunk/Toss/GGP/GameSimpl.mli 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GameSimpl.mli 2011-03-21 23:38:06 UTC (rev 1376)
@@ -11,4 +11,5 @@
val niceness : Formula.formula -> int
val simplify :
+ ?keep_predicates:bool ->
Arena.game * Arena.game_state -> Arena.game * Arena.game_state
Modified: trunk/Toss/GGP/GameSimplTest.ml
===================================================================
--- trunk/Toss/GGP/GameSimplTest.ml 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/GameSimplTest.ml 2011-03-21 23:38:06 UTC (rev 1376)
@@ -59,23 +59,16 @@
| Some tests -> ignore (run_test_tt ~verbose:true tests)
| None -> ()
+(* The action below is used to regenerate the test targets when
+ {!GameSimpl.simplify} changes. *)
let a () =
- let breakthrough = state_of_file "./GGP/tests/breakthrough-raw.toss" in
- Printf.printf "\nINPUT:\n%s\n%!" (Arena.state_str breakthrough);
- GameSimpl.debug_level := 4;
- let res = GameSimpl.simplify breakthrough in
- let resf = open_out "./GGP/tests/breakthrough-simpl.toss" in
- let res_str = Arena.state_str res in
- output_string resf res_str;
- close_out resf;
- Printf.printf "\nRESULT:\n%s\n%!" res_str
+ let game_name = "tictactoe" in
-let a () =
- let connect5 = state_of_file "./GGP/tests/connect5-raw.toss" in
- Printf.printf "\nINPUT:\n%s\n%!" (Arena.state_str connect5);
+ let game = state_of_file ("./GGP/tests/"^game_name^"-raw.toss") in
+ Printf.printf "\nINPUT:\n%s\n%!" (Arena.state_str game);
GameSimpl.debug_level := 4;
- let res = GameSimpl.simplify connect5 in
- let resf = open_out "./GGP/tests/connect5-simpl.toss" in
+ let res = GameSimpl.simplify game in
+ let resf = open_out ("./GGP/tests/"^game_name^"-simpl.toss") in
let res_str = Arena.state_str res in
output_string resf res_str;
close_out resf;
Modified: trunk/Toss/GGP/tests/breakthrough-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/breakthrough-simpl.toss 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/tests/breakthrough-simpl.toss 2011-03-21 23:38:06 UTC (rev 1376)
@@ -525,16 +525,87 @@
(cellholds_1_3_MV1, cellholds_1_2_MV1);
(cellholds_1_2_MV1, cellholds_1_1_MV1)
};
+ cellholds_1_y2_MV1 {
+ cellholds_1_8_MV1; cellholds_1_7_MV1; cellholds_1_6_MV1;
+ cellholds_1_5_MV1; cellholds_1_4_MV1; cellholds_1_3_MV1;
+ cellholds_1_2_MV1; cellholds_1_1_MV1
+ };
+ cellholds_2_y2_MV1 {
+ cellholds_2_8_MV1; cellholds_2_7_MV1; cellholds_2_6_MV1;
+ cellholds_2_5_MV1; cellholds_2_4_MV1; cellholds_2_3_MV1;
+ cellholds_2_2_MV1; cellholds_2_1_MV1
+ };
+ cellholds_3_y2_MV1 {
+ cellholds_3_8_MV1; cellholds_3_7_MV1; cellholds_3_6_MV1;
+ cellholds_3_5_MV1; cellholds_3_4_MV1; cellholds_3_3_MV1;
+ cellholds_3_2_MV1; cellholds_3_1_MV1
+ };
+ cellholds_4_y2_MV1 {
+ cellholds_4_8_MV1; cellholds_4_7_MV1; cellholds_4_6_MV1;
+ cellholds_4_5_MV1; cellholds_4_4_MV1; cellholds_4_3_MV1;
+ cellholds_4_2_MV1; cellholds_4_1_MV1
+ };
+ cellholds_5_y2_MV1 {
+ cellholds_5_8_MV1; cellholds_5_7_MV1; cellholds_5_6_MV1;
+ cellholds_5_5_MV1; cellholds_5_4_MV1; cellholds_5_3_MV1;
+ cellholds_5_2_MV1; cellholds_5_1_MV1
+ };
+ cellholds_6_y2_MV1 {
+ cellholds_6_8_MV1; cellholds_6_7_MV1; cellholds_6_6_MV1;
+ cellholds_6_5_MV1; cellholds_6_4_MV1; cellholds_6_3_MV1;
+ cellholds_6_2_MV1; cellholds_6_1_MV1
+ };
+ cellholds_7_y2_MV1 {
+ cellholds_7_8_MV1; cellholds_7_7_MV1; cellholds_7_6_MV1;
+ cellholds_7_5_MV1; cellholds_7_4_MV1; cellholds_7_3_MV1;
+ cellholds_7_2_MV1; cellholds_7_1_MV1
+ };
+ cellholds_8_y2_MV1 {
+ cellholds_8_8_MV1; cellholds_8_7_MV1; cellholds_8_6_MV1;
+ cellholds_8_5_MV1; cellholds_8_4_MV1; cellholds_8_3_MV1;
+ cellholds_8_2_MV1; cellholds_8_1_MV1
+ };
cellholds_x2_1_MV1 {
cellholds_8_1_MV1; cellholds_7_1_MV1; cellholds_6_1_MV1;
cellholds_5_1_MV1; cellholds_4_1_MV1; cellholds_3_1_MV1;
cellholds_2_1_MV1; cellholds_1_1_MV1
};
+ cellholds_x2_2_MV1 {
+ cellholds_8_2_MV1; cellholds_7_2_MV1; cellholds_6_2_MV1;
+ cellholds_5_2_MV1; cellholds_4_2_MV1; cellholds_3_2_MV1;
+ cellholds_2_2_MV1; cellholds_1_2_MV1
+ };
+ cellholds_x2_3_MV1 {
+ cellholds_8_3_MV1; cellholds_7_3_MV1; cellholds_6_3_MV1;
+ cellholds_5_3_MV1; cellholds_4_3_MV1; cellholds_3_3_MV1;
+ cellholds_2_3_MV1; cellholds_1_3_MV1
+ };
+ cellholds_x2_4_MV1 {
+ cellholds_8_4_MV1; cellholds_7_4_MV1; cellholds_6_4_MV1;
+ cellholds_5_4_MV1; cellholds_4_4_MV1; cellholds_3_4_MV1;
+ cellholds_2_4_MV1; cellholds_1_4_MV1
+ };
+ cellholds_x2_5_MV1 {
+ cellholds_8_5_MV1; cellholds_7_5_MV1; cellholds_6_5_MV1;
+ cellholds_5_5_MV1; cellholds_4_5_MV1; cellholds_3_5_MV1;
+ cellholds_2_5_MV1; cellholds_1_5_MV1
+ };
+ cellholds_x2_6_MV1 {
+ cellholds_8_6_MV1; cellholds_7_6_MV1; cellholds_6_6_MV1;
+ cellholds_5_6_MV1; cellholds_4_6_MV1; cellholds_3_6_MV1;
+ cellholds_2_6_MV1; cellholds_1_6_MV1
+ };
+ cellholds_x2_7_MV1 {
+ cellholds_8_7_MV1; cellholds_7_7_MV1; cellholds_6_7_MV1;
+ cellholds_5_7_MV1; cellholds_4_7_MV1; cellholds_3_7_MV1;
+ cellholds_2_7_MV1; cellholds_1_7_MV1
+ };
cellholds_x2_8_MV1 {
cellholds_8_8_MV1; cellholds_7_8_MV1; cellholds_6_8_MV1;
cellholds_5_8_MV1; cellholds_4_8_MV1; cellholds_3_8_MV1;
cellholds_2_8_MV1; cellholds_1_8_MV1
};
+ cellholds_x2_y2_MV1:1 {};
cellholds_x2_y2_black {
cellholds_8_8_MV1; cellholds_8_7_MV1; cellholds_7_8_MV1;
cellholds_7_7_MV1; cellholds_6_8_MV1; cellholds_6_7_MV1;
@@ -552,6 +623,9 @@
cellholds_1_1_MV1
};
control_MV1 (control_MV1); control_black:1 {};
- control_white (control_MV1)
+ control_white (control_MV1); index__cellholds_x2_y2_MV1_x2:1 {};
+ index__cellholds_x2_y2_MV1_y2:1 {}; init__cellholds_x2_y2_MV1_x2:1 {};
+ init__cellholds_x2_y2_MV1_y2:1 {}; role__cellholds_x2_y2_MV1_x2:1 {};
+ role__cellholds_x2_y2_MV1_y2:1 {}
|
]
Modified: trunk/Toss/GGP/tests/connect5-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/connect5-simpl.toss 2011-03-21 10:39:44 UTC (rev 1375)
+++ trunk/Toss/GGP/tests/connect5-simpl.toss 2011-03-21 23:38:06 UTC (rev 1376)
@@ -756,6 +756,71 @@
(cell_b_c_MV1, cell_a_d_MV1); (cell_b_b_MV1, cell_a_c_MV1);
(cell_b_a_MV1, cell_a_b_MV1)
};
+ cell_a_y_MV1 {
+ cell_a_h_MV1; cell_a_g_MV1; cell_a_f_MV1; cell_a_e_MV1; cell_a_d_MV1;
+ cell_a_c_MV1; cell_a_b_MV1; cell_a_a_MV1
+ };
+ cell_b_y_MV1 {
+ cell_b_h_MV1; cell_b_g_MV1; cell_b_f_MV1; cell_b_e_MV1; cell_b_d_MV1;
+ cell_b_c_MV1; cell_b_b_MV1; cell_b_a_MV1
+ };
+ cell_c_y_MV1 {
+ cell_c_h_MV1; cell_c_g_MV1; cell_c_f_MV1; cell_c_e_MV1; cell_c_d_MV1;
+ cell_c_c_MV1; cell_c_b_MV1; cell_c_a_MV1
+ };
+ cell_d_y_MV1 {
+ cell_d_h_MV1; cell_d_g_MV1; cell_d_f_MV1; cell_d_e_MV1; cell_d_d_MV1;
+ cell_d_c_MV1; cell_d_b_MV1; cell_d_a_MV1
+ };
+ cell_e_y_MV1 {
+ cell_e_h_MV1; cell_e_g_MV1; cell_e_f_MV1; cell_e_e_MV1; cell_e_d_MV1;
+ cell_e_c_MV1; cell_e_b_MV1; cell_e_a_MV1
+ };
+ cell_f_y_MV1 {
+ cell_f_h_MV1; cell_f_g_MV1; cell_f_f_MV1; cell_f_e_MV1; cell_f_d_MV1;
+ cell_f_c_MV1; cell_f_b_MV1; cell_f_a_MV1
+ };
+ cell_g_y_MV1 {
+ cell_g_h_MV1; cell_g_g_MV1; cell_g_f_MV1; cell_g_e_MV1; cell_g_d_MV1;
+ cell_g_c_MV1; cell_g_b_MV1; cell_g_a_MV1
+ };
+ cell_h_y_MV1 {
+ cell_h_h_MV1; cell_h_g_MV1; cell_h_f_MV1; cell_h_e_MV1; cell_h_d_MV1;
+ cell_h_c_MV1; cell_h_b_MV1; cell_h_a_MV1
+ };
+ cell_x_a_MV1 {
+ cell_h_a_MV1; cell_g_a_MV1; cell_f_a_MV1; cell_e_a_MV1; cell_d_a_MV1;
+ cell_c_a_MV1; cell_b_a_MV1; cell_a_a_MV1
+ };
+ cell_x_b_MV1 {
+ cell_h_b_MV1; cell_g_b_MV1; cell_f_b_MV1; cell_e_b_MV1; cell_d_b_MV1;
+ cell_c_b_MV1; cell_b_b_MV1; cell_a_b_MV1
+ };
+ cell_x_c_MV1 {
+ cell_h_c_MV1; cell_g_c_MV1; cell_f_c_MV1; cell_e_c_MV1; cell_d_c_MV1;
+ cell_c_c_MV1; cell_b_c_MV1; cell_a_c_MV1
+ };
+ cell_x_d_MV1 {
+ cell_h_d_MV1; cell_g_d_MV1; cell_f_d_MV1; cell_e_d_MV1; cell_d_d_MV1;
+ cell_c_d_MV1; cell_b_d_MV1; cell_a_d_MV1
+ };
+ cell_x_e_MV1 {
+ cell_h_e_MV1; cell_g_e_MV1; cell_f_e_MV1; cell_e_e_MV1; cell_d_e_MV1;
+ cell_c_e_MV1; cell_b_e_MV1; cell_a_e_MV1
+ };
+ cell_x_f_MV1 {
+ cell_h_f_MV1; cell_g_f_MV1; cell_f_f_MV1; cell_e_f_MV1; cell_d_f_MV1;
+ cell_c_f_MV1; cell_b_f_MV1; cell_a_f_MV1
+ };
+ cell_x_g_MV1 {
+ cell_h_g_MV1; cell_g_g_MV1; cell_f_g_MV1; cell_e_g_MV1; cell_d_g_MV1;
+ cell_c_g_MV1; cell_b_g_MV1; cell_a_g_MV1
+ };
+ cell_x_h_MV1 {
+ cell_h_h_MV1; cell_g_h_MV1; cell_f_h_MV1; cell_e_h_MV1; cell_d_h_MV1;
+ cell_c_h_MV1; cell_b_h_MV1; cell_a_h_MV1
+ };
+ cell_x_y_MV1:1 {};
cell_x_y_b {
cell_h_h_MV1; cell_h_g_MV1; cell_h_f_MV1; cell_h_e_MV1; cell_h_d_MV1;
cell_h_c_MV1; cell_h_b_MV1; cell_h_a_MV1; cell_g_h_MV1; cell_g_g_MV1;
@@ -772,6 +837,9 @@
cell_a_d_MV1; cell_a_c_MV1; cell_a_b_MV1; cell_a_a_MV1
};
cell_x_y_o:1 {}; cell_x_y_x:1 {}; control_MV1 (control_MV1);
- control_o:1 {}; control_x (control_MV1)
+ control_o:1 {}; control_x (control_MV1); coordinate__cell_x_y_MV1_x:1 {};
+ coordinate__cell_x_y_MV1_y:1 {}; init__cell_x_y_MV1_x:1 {};
+ init__cell_x_y_MV1_y:1 {}; role__cell_x_y_MV1_x:1 {};
+ role__cell_x_y_MV1_y:1 {}
|
]
Added: trunk/Toss/GGP/tests/tictactoe-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/tictactoe-raw.toss (rev 0)
+++ trunk/Toss/GGP/tests/tictactoe-raw.toss 2011-03-21 23:38:06 UTC (rev 1376)
@@ -0,0 +1,552 @@
+PLAYERS xplayer, oplayer
+RULE mark_x_y_0:
+ [cell_x_y__blank_, control__blank_ |
+ _opt_cell_m_n_b (control__blank_);
+ _opt_cell_m_n_o {cell_x_y__blank_; control__blank_};
+ _opt_cell_m_n_x {cell_x_y__blank_; control__blank_};
+ _opt_control_oplayer (cell_x_y__blank_);
+ _opt_control_xplayer (cell_x_y__blank_); cell_m_n_b (cell_x_y__blank_);
+ control_xplayer (control__blank_)
+ |
+ ] ->
+ [cell_x_y__blank_, control__blank_ |
+ cell_m_n_x (cell_x_y__blank_); control_oplayer (control__blank_) |
+ ]
+ emb cell_m_n_b, cell_m_n_o, cell_m_n_x, control_oplayer, control_xplayer
+ pre
+ (not
+ ex cell_m43_3__blank_, cell_m43_2__blank_, cell_m43_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m43_1__blank_, cell_m43_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m43_1__blank_, cell_m43_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m43_2__blank_, cell_m43_3__blank_) and
+ cell_m_1_MV1(cell_m43_1__blank_) and
+ cell_m_2_MV1(cell_m43_2__blank_) and
+ cell_m_3_MV1(cell_m43_3__blank_) and
+ cell_m_n_x(cell_m43_1__blank_) and cell_m_n_x(cell_m43_2__blank_) and
+ cell_m_n_x(cell_m43_3__blank_)) and
+ not
+ ex cell_3_m44__blank_, cell_2_m44__blank_, cell_1_m44__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m44__blank_, cell_2_m44__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m44__blank_, cell_3_m44__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m44__blank_, cell_3_m44__blank_) and
+ cell_1_n_MV1(cell_1_m44__blank_) and
+ cell_2_n_MV1(cell_2_m44__blank_) and
+ cell_3_n_MV1(cell_3_m44__blank_) and
+ cell_m_n_x(cell_1_m44__blank_) and cell_m_n_x(cell_2_m44__blank_) and
+ cell_m_n_x(cell_3_m44__blank_)) and
+ not
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_x(cell_1_1__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_3__blank_)) and
+ not
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_x(cell_1_3__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_1__blank_)) and
+ not
+ ex cell_m45_3__blank_, cell_m45_2__blank_, cell_m45_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m45_1__blank_, cell_m45_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m45_1__blank_, cell_m45_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m45_2__blank_, cell_m45_3__blank_) and
+ cell_m_1_MV1(cell_m45_1__blank_) and
+ cell_m_2_MV1(cell_m45_2__blank_) and
+ cell_m_3_MV1(cell_m45_3__blank_) and
+ cell_m_n_o(cell_m45_1__blank_) and cell_m_n_o(cell_m45_2__blank_) and
+ cell_m_n_o(cell_m45_3__blank_)) and
+ not
+ ex cell_3_m46__blank_, cell_2_m46__blank_, cell_1_m46__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m46__blank_, cell_2_m46__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m46__blank_, cell_3_m46__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m46__blank_, cell_3_m46__blank_) and
+ cell_1_n_MV1(cell_1_m46__blank_) and
+ cell_2_n_MV1(cell_2_m46__blank_) and
+ cell_3_n_MV1(cell_3_m46__blank_) and
+ cell_m_n_o(cell_1_m46__blank_) and cell_m_n_o(cell_2_m46__blank_) and
+ cell_m_n_o(cell_3_m46__blank_)) and
+ not
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_o(cell_1_1__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_3__blank_)) and
+ not
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_o(cell_1_3__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_1__blank_)) and
+ ex cell_m47_n23__blank_ cell_m_n_b(cell_m47_n23__blank_))
+RULE mark_x_y_1:
+ [cell_x_y__blank_, control__blank_ |
+ _opt_cell_m_n_b (control__blank_);
+ _opt_cell_m_n_o {cell_x_y__blank_; control__blank_};
+ _opt_cell_m_n_x {cell_x_y__blank_; control__blank_};
+ _opt_control_oplayer (cell_x_y__blank_);
+ _opt_control_xplayer (cell_x_y__blank_); cell_m_n_b (cell_x_y__blank_);
+ control_oplayer (control__blank_)
+ |
+ ] ->
+ [cell_x_y__blank_, control__blank_ |
+ cell_m_n_o (cell_x_y__blank_); control_xplayer (control__blank_) |
+ ]
+ emb cell_m_n_b, cell_m_n_o, cell_m_n_x, control_oplayer, control_xplayer
+ pre
+ (not
+ ex cell_m43_3__blank_, cell_m43_2__blank_, cell_m43_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m43_1__blank_, cell_m43_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m43_1__blank_, cell_m43_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m43_2__blank_, cell_m43_3__blank_) and
+ cell_m_1_MV1(cell_m43_1__blank_) and
+ cell_m_2_MV1(cell_m43_2__blank_) and
+ cell_m_3_MV1(cell_m43_3__blank_) and
+ cell_m_n_x(cell_m43_1__blank_) and cell_m_n_x(cell_m43_2__blank_) and
+ cell_m_n_x(cell_m43_3__blank_)) and
+ not
+ ex cell_3_m44__blank_, cell_2_m44__blank_, cell_1_m44__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m44__blank_, cell_2_m44__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m44__blank_, cell_3_m44__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m44__blank_, cell_3_m44__blank_) and
+ cell_1_n_MV1(cell_1_m44__blank_) and
+ cell_2_n_MV1(cell_2_m44__blank_) and
+ cell_3_n_MV1(cell_3_m44__blank_) and
+ cell_m_n_x(cell_1_m44__blank_) and cell_m_n_x(cell_2_m44__blank_) and
+ cell_m_n_x(cell_3_m44__blank_)) and
+ not
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_x(cell_1_1__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_3__blank_)) and
+ not
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_x(cell_1_3__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_1__blank_)) and
+ not
+ ex cell_m45_3__blank_, cell_m45_2__blank_, cell_m45_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m45_1__blank_, cell_m45_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m45_1__blank_, cell_m45_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m45_2__blank_, cell_m45_3__blank_) and
+ cell_m_1_MV1(cell_m45_1__blank_) and
+ cell_m_2_MV1(cell_m45_2__blank_) and
+ cell_m_3_MV1(cell_m45_3__blank_) and
+ cell_m_n_o(cell_m45_1__blank_) and cell_m_n_o(cell_m45_2__blank_) and
+ cell_m_n_o(cell_m45_3__blank_)) and
+ not
+ ex cell_3_m46__blank_, cell_2_m46__blank_, cell_1_m46__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m46__blank_, cell_2_m46__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m46__blank_, cell_3_m46__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m46__blank_, cell_3_m46__blank_) and
+ cell_1_n_MV1(cell_1_m46__blank_) and
+ cell_2_n_MV1(cell_2_m46__blank_) and
+ cell_3_n_MV1(cell_3_m46__blank_) and
+ cell_m_n_o(cell_1_m46__blank_) and cell_m_n_o(cell_2_m46__blank_) and
+ cell_m_n_o(cell_3_m46__blank_)) and
+ not
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_o(cell_1_1__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_3__blank_)) and
+ not
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_o(cell_1_3__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_1__blank_)) and
+ ex cell_m47_n23__blank_ cell_m_n_b(cell_m47_n23__blank_))
+LOC 0 {
+ PLAYER xplayer
+ PAYOFF {
+ xplayer:
+ 50. +
+ -50. *
+ :(
+ ex cell_m7_3__blank_, cell_m7_2__blank_, cell_m7_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m7_1__blank_, cell_m7_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m7_1__blank_, cell_m7_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m7_2__blank_, cell_m7_3__blank_) and
+ cell_m_1_MV1(cell_m7_1__blank_) and
+ cell_m_2_MV1(cell_m7_2__blank_) and
+ cell_m_3_MV1(cell_m7_3__blank_) and
+ cell_m_n_o(cell_m7_1__blank_) and cell_m_n_o(cell_m7_2__blank_) and
+ cell_m_n_o(cell_m7_3__blank_)) or
+ ex cell_3_m8__blank_, cell_2_m8__blank_, cell_1_m8__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m8__blank_, cell_2_m8__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m8__blank_, cell_3_m8__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m8__blank_, cell_3_m8__blank_) and
+ cell_1_n_MV1(cell_1_m8__blank_) and
+ cell_2_n_MV1(cell_2_m8__blank_) and
+ cell_3_n_MV1(cell_3_m8__blank_) and
+ cell_m_n_o(cell_1_m8__blank_) and cell_m_n_o(cell_2_m8__blank_) and
+ cell_m_n_o(cell_3_m8__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and cell_m_n_o(cell_1_1__blank_) and
+ cell_m_n_o(cell_2_2__blank_) and cell_m_n_o(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and cell_m_n_o(cell_1_3__blank_) and
+ cell_m_n_o(cell_2_2__blank_) and cell_m_n_o(cell_3_1__blank_))
+ )
+ +
+ 50. *
+ :(
+ ex cell_m0_3__blank_, cell_m0_2__blank_, cell_m0_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m0_1__blank_, cell_m0_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m0_1__blank_, cell_m0_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m0_2__blank_, cell_m0_3__blank_) and
+ cell_m_1_MV1(cell_m0_1__blank_) and
+ cell_m_2_MV1(cell_m0_2__blank_) and
+ cell_m_3_MV1(cell_m0_3__blank_) and
+ cell_m_n_x(cell_m0_1__blank_) and cell_m_n_x(cell_m0_2__blank_) and
+ cell_m_n_x(cell_m0_3__blank_)) or
+ ex cell_3_m1__blank_, cell_2_m1__blank_, cell_1_m1__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m1__blank_, cell_2_m1__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m1__blank_, cell_3_m1__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m1__blank_, cell_3_m1__blank_) and
+ cell_1_n_MV1(cell_1_m1__blank_) and
+ cell_2_n_MV1(cell_2_m1__blank_) and
+ cell_3_n_MV1(cell_3_m1__blank_) and
+ cell_m_n_x(cell_1_m1__blank_) and cell_m_n_x(cell_2_m1__blank_) and
+ cell_m_n_x(cell_3_m1__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and cell_m_n_x(cell_1_1__blank_) and
+ cell_m_n_x(cell_2_2__blank_) and cell_m_n_x(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and cell_m_n_x(cell_1_3__blank_) and
+ cell_m_n_x(cell_2_2__blank_) and cell_m_n_x(cell_3_1__blank_))
+ );
+ oplayer:
+ 50. +
+ -50. *
+ :(
+ ex cell_m16_3__blank_, cell_m16_2__blank_, cell_m16_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m16_1__blank_, cell_m16_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m16_1__blank_, cell_m16_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m16_2__blank_, cell_m16_3__blank_) and
+ cell_m_1_MV1(cell_m16_1__blank_) and
+ cell_m_2_MV1(cell_m16_2__blank_) and
+ cell_m_3_MV1(cell_m16_3__blank_) and
+ cell_m_n_x(cell_m16_1__blank_) and
+ cell_m_n_x(cell_m16_2__blank_) and cell_m_n_x(cell_m16_3__blank_)) or
+ ex cell_3_m17__blank_, cell_2_m17__blank_, cell_1_m17__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m17__blank_, cell_2_m17__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m17__blank_, cell_3_m17__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m17__blank_, cell_3_m17__blank_) and
+ cell_1_n_MV1(cell_1_m17__blank_) and
+ cell_2_n_MV1(cell_2_m17__blank_) and
+ cell_3_n_MV1(cell_3_m17__blank_) and
+ cell_m_n_x(cell_1_m17__blank_) and
+ cell_m_n_x(cell_2_m17__blank_) and cell_m_n_x(cell_3_m17__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_x(cell_1_1__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_x(cell_1_3__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_1__blank_))
+ )
+ +
+ 50. *
+ :(
+ ex cell_m9_3__blank_, cell_m9_2__blank_, cell_m9_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m9_1__blank_, cell_m9_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m9_1__blank_, cell_m9_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m9_2__blank_, cell_m9_3__blank_) and
+ cell_m_1_MV1(cell_m9_1__blank_) and
+ cell_m_2_MV1(cell_m9_2__blank_) and
+ cell_m_3_MV1(cell_m9_3__blank_) and
+ cell_m_n_o(cell_m9_1__blank_) and cell_m_n_o(cell_m9_2__blank_) and
+ cell_m_n_o(cell_m9_3__blank_)) or
+ ex cell_3_m10__blank_, cell_2_m10__blank_, cell_1_m10__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m10__blank_, cell_2_m10__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m10__blank_, cell_3_m10__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m10__blank_, cell_3_m10__blank_) and
+ cell_1_n_MV1(cell_1_m10__blank_) and
+ cell_2_n_MV1(cell_2_m10__blank_) and
+ cell_3_n_MV1(cell_3_m10__blank_) and
+ cell_m_n_o(cell_1_m10__blank_) and
+ cell_m_n_o(cell_2_m10__blank_) and cell_m_n_o(cell_3_m10__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_o(cell_1_1__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_o(cell_1_3__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_1__blank_))
+ )
+ }
+ MOVES [mark_x_y_0 -> 1]
+ }
+LOC 1 {
+ PLAYER oplayer
+ PAYOFF {
+ xplayer:
+ 50. +
+ -50. *
+ :(
+ ex cell_m7_3__blank_, cell_m7_2__blank_, cell_m7_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m7_1__blank_, cell_m7_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m7_1__blank_, cell_m7_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m7_2__blank_, cell_m7_3__blank_) and
+ cell_m_1_MV1(cell_m7_1__blank_) and
+ cell_m_2_MV1(cell_m7_2__blank_) and
+ cell_m_3_MV1(cell_m7_3__blank_) and
+ cell_m_n_o(cell_m7_1__blank_) and cell_m_n_o(cell_m7_2__blank_) and
+ cell_m_n_o(cell_m7_3__blank_)) or
+ ex cell_3_m8__blank_, cell_2_m8__blank_, cell_1_m8__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m8__blank_, cell_2_m8__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m8__blank_, cell_3_m8__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m8__blank_, cell_3_m8__blank_) and
+ cell_1_n_MV1(cell_1_m8__blank_) and
+ cell_2_n_MV1(cell_2_m8__blank_) and
+ cell_3_n_MV1(cell_3_m8__blank_) and
+ cell_m_n_o(cell_1_m8__blank_) and cell_m_n_o(cell_2_m8__blank_) and
+ cell_m_n_o(cell_3_m8__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and cell_m_n_o(cell_1_1__blank_) and
+ cell_m_n_o(cell_2_2__blank_) and cell_m_n_o(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and cell_m_n_o(cell_1_3__blank_) and
+ cell_m_n_o(cell_2_2__blank_) and cell_m_n_o(cell_3_1__blank_))
+ )
+ +
+ 50. *
+ :(
+ ex cell_m0_3__blank_, cell_m0_2__blank_, cell_m0_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m0_1__blank_, cell_m0_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m0_1__blank_, cell_m0_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m0_2__blank_, cell_m0_3__blank_) and
+ cell_m_1_MV1(cell_m0_1__blank_) and
+ cell_m_2_MV1(cell_m0_2__blank_) and
+ cell_m_3_MV1(cell_m0_3__blank_) and
+ cell_m_n_x(cell_m0_1__blank_) and cell_m_n_x(cell_m0_2__blank_) and
+ cell_m_n_x(cell_m0_3__blank_)) or
+ ex cell_3_m1__blank_, cell_2_m1__blank_, cell_1_m1__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m1__blank_, cell_2_m1__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m1__blank_, cell_3_m1__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m1__blank_, cell_3_m1__blank_) and
+ cell_1_n_MV1(cell_1_m1__blank_) and
+ cell_2_n_MV1(cell_2_m1__blank_) and
+ cell_3_n_MV1(cell_3_m1__blank_) and
+ cell_m_n_x(cell_1_m1__blank_) and cell_m_n_x(cell_2_m1__blank_) and
+ cell_m_n_x(cell_3_m1__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and cell_m_n_x(cell_1_1__blank_) and
+ cell_m_n_x(cell_2_2__blank_) and cell_m_n_x(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and cell_m_n_x(cell_1_3__blank_) and
+ cell_m_n_x(cell_2_2__blank_) and cell_m_n_x(cell_3_1__blank_))
+ );
+ oplayer:
+ 50. +
+ -50. *
+ :(
+ ex cell_m16_3__blank_, cell_m16_2__blank_, cell_m16_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m16_1__blank_, cell_m16_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m16_1__blank_, cell_m16_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m16_2__blank_, cell_m16_3__blank_) and
+ cell_m_1_MV1(cell_m16_1__blank_) and
+ cell_m_2_MV1(cell_m16_2__blank_) and
+ cell_m_3_MV1(cell_m16_3__blank_) and
+ cell_m_n_x(cell_m16_1__blank_) and
+ cell_m_n_x(cell_m16_2__blank_) and cell_m_n_x(cell_m16_3__blank_)) or
+ ex cell_3_m17__blank_, cell_2_m17__blank_, cell_1_m17__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m17__blank_, cell_2_m17__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m17__blank_, cell_3_m17__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m17__blank_, cell_3_m17__blank_) and
+ cell_1_n_MV1(cell_1_m17__blank_) and
+ cell_2_n_MV1(cell_2_m17__blank_) and
+ cell_3_n_MV1(cell_3_m17__blank_) and
+ cell_m_n_x(cell_1_m17__blank_) and
+ cell_m_n_x(cell_2_m17__blank_) and cell_m_n_x(cell_3_m17__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_x(cell_1_1__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(cell_3_1__blank_) and
+ cell_3_n_MV1(cell_3_1__blank_) and
+ cell_m_n_x(cell_1_3__blank_) and cell_m_n_x(cell_2_2__blank_) and
+ cell_m_n_x(cell_3_1__blank_))
+ )
+ +
+ 50. *
+ :(
+ ex cell_m9_3__blank_, cell_m9_2__blank_, cell_m9_1__blank_
+ (EQ___cell_m_n_MV1_m(cell_m9_1__blank_, cell_m9_2__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m9_1__blank_, cell_m9_3__blank_) and
+ EQ___cell_m_n_MV1_m(cell_m9_2__blank_, cell_m9_3__blank_) and
+ cell_m_1_MV1(cell_m9_1__blank_) and
+ cell_m_2_MV1(cell_m9_2__blank_) and
+ cell_m_3_MV1(cell_m9_3__blank_) and
+ cell_m_n_o(cell_m9_1__blank_) and cell_m_n_o(cell_m9_2__blank_) and
+ cell_m_n_o(cell_m9_3__blank_)) or
+ ex cell_3_m10__blank_, cell_2_m10__blank_, cell_1_m10__blank_
+ (EQ___cell_m_n_MV1_n(cell_1_m10__blank_, cell_2_m10__blank_) and
+ EQ___cell_m_n_MV1_n(cell_1_m10__blank_, cell_3_m10__blank_) and
+ EQ___cell_m_n_MV1_n(cell_2_m10__blank_, cell_3_m10__blank_) and
+ cell_1_n_MV1(cell_1_m10__blank_) and
+ cell_2_n_MV1(cell_2_m10__blank_) and
+ cell_3_n_MV1(cell_3_m10__blank_) and
+ cell_m_n_o(cell_1_m10__blank_) and
+ cell_m_n_o(cell_2_m10__blank_) and cell_m_n_o(cell_3_m10__blank_)) or
+ ex cell_3_3__blank_, cell_2_2__blank_, cell_1_1__blank_
+ (cell_m_1_MV1(cell_1_1__blank_) and
+ cell_1_n_MV1(cell_1_1__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_3_MV1(cell_3_3__blank_) and
+ cell_3_n_MV1(cell_3_3__blank_) and
+ cell_m_n_o(cell_1_1__blank_) and cell_m_n_o(cell_2_2__blank_) and
+ cell_m_n_o(cell_3_3__blank_)) or
+ ex cell_3_1__blank_, cell_2_2__blank_, cell_1_3__blank_
+ (cell_m_3_MV1(cell_1_3__blank_) and
+ cell_1_n_MV1(cell_1_3__blank_) and
+ cell_m_2_MV1(cell_2_2__blank_) and
+ cell_2_n_MV1(cell_2_2__blank_) and
+ cell_m_1_MV1(c...
[truncated message content] |