[Toss-devel-svn] SF.net SVN: toss:[1646] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2012-01-19 03:06:16
|
Revision: 1646
http://toss.svn.sourceforge.net/toss/?rev=1646&view=rev
Author: lukaszkaiser
Date: 2012-01-19 03:06:07 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
More game learning.
Modified Paths:
--------------
trunk/Toss/Formula/FormulaParser.mly
trunk/Toss/Learn/Distinguish.ml
trunk/Toss/Learn/Distinguish.mli
trunk/Toss/Learn/LearnGame.ml
trunk/Toss/Learn/LearnGame.mli
trunk/Toss/Learn/LearnGameTest.ml
trunk/Toss/Learn/Makefile
trunk/Toss/Learn/examples/Tic-Tac-Toe001_01.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_01.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe001_01.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe001_02.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_02.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe001_02.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe001_03.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_03.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe001_03.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe001_04.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_04.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe001_04.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe001_05.nwn
Added Paths:
-----------
trunk/Toss/Learn/examples/Connect4001_01.nwn
trunk/Toss/Learn/examples/Connect4001_01.wn0
trunk/Toss/Learn/examples/Connect4001_01.wn1
trunk/Toss/Learn/examples/Connect4001_01.wrg
trunk/Toss/Learn/examples/Connect4001_02.nwn
trunk/Toss/Learn/examples/Connect4001_02.wn0
trunk/Toss/Learn/examples/Connect4001_02.wn1
trunk/Toss/Learn/examples/Connect4001_02.wrg
trunk/Toss/Learn/examples/Connect4001_03.nwn
trunk/Toss/Learn/examples/Connect4001_03.wn0
trunk/Toss/Learn/examples/Connect4001_03.wn1
trunk/Toss/Learn/examples/Connect4001_03.wrg
trunk/Toss/Learn/examples/Connect4001_04.nwn
trunk/Toss/Learn/examples/Connect4001_04.wn0
trunk/Toss/Learn/examples/Connect4001_04.wn1
trunk/Toss/Learn/examples/Connect4001_04.wrg
trunk/Toss/Learn/examples/Connect4001_05.nwn
trunk/Toss/Learn/examples/Connect4001_06.nwn
trunk/Toss/Learn/examples/Connect4001_07.nwn
trunk/Toss/Learn/examples/Connect4001_08.nwn
trunk/Toss/Learn/examples/Connect4001_09.nwn
trunk/Toss/Learn/examples/Connect4001_10.nwn
trunk/Toss/Learn/examples/Connect4001_11.nwn
trunk/Toss/Learn/examples/Connect4001_12.nwn
trunk/Toss/Learn/examples/Connect4001_13.nwn
trunk/Toss/Learn/examples/Gomoku001_01.nwn
trunk/Toss/Learn/examples/Gomoku001_01.wn0
trunk/Toss/Learn/examples/Gomoku001_01.wn1
trunk/Toss/Learn/examples/Gomoku001_02.nwn
trunk/Toss/Learn/examples/Gomoku001_02.wn0
trunk/Toss/Learn/examples/Gomoku001_02.wn1
trunk/Toss/Learn/examples/Gomoku001_03.nwn
trunk/Toss/Learn/examples/Gomoku001_03.wn0
trunk/Toss/Learn/examples/Gomoku001_03.wn1
trunk/Toss/Learn/examples/Gomoku001_04.nwn
trunk/Toss/Learn/examples/Gomoku001_04.wn0
trunk/Toss/Learn/examples/Gomoku001_04.wn1
trunk/Toss/Learn/examples/Gomoku001_05.nwn
trunk/Toss/Learn/examples/Gomoku001_06.nwn
trunk/Toss/Learn/examples/Gomoku001_07.nwn
trunk/Toss/Learn/examples/Gomoku001_08.nwn
trunk/Toss/Learn/examples/Gomoku001_09.nwn
trunk/Toss/Learn/examples/Pawn-Whopping001_01.nwn
trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn0
trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn1
trunk/Toss/Learn/examples/Pawn-Whopping001_01.wrg
trunk/Toss/Learn/examples/Pawn-Whopping001_02.nwn
trunk/Toss/Learn/examples/Pawn-Whopping001_02.wrg
trunk/Toss/Learn/examples/Pawn-Whopping001_03.nwn
trunk/Toss/Learn/examples/Pawn-Whopping001_04.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_06.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_07.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_08.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_09.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_10.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_11.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_12.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_13.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_14.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_15.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_16.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe001_17.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe002_01.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe002_01.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe002_01.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe002_02.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe002_02.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe002_02.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe002_03.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe002_03.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe002_03.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe002_04.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe002_04.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe002_04.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe002_05.nwn
trunk/Toss/Learn/examples/Tic-Tac-Toe002_05.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe002_05.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe002_06.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe002_06.wn1
Removed Paths:
-------------
trunk/Toss/Learn/examples/Tic-Tac-Toe001_05.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe001_05.wn1
trunk/Toss/Learn/examples/Tic-Tac-Toe001_06.wn0
trunk/Toss/Learn/examples/Tic-Tac-Toe001_06.wn1
Modified: trunk/Toss/Formula/FormulaParser.mly
===================================================================
--- trunk/Toss/Formula/FormulaParser.mly 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Formula/FormulaParser.mly 2012-01-19 03:06:07 UTC (rev 1646)
@@ -96,6 +96,8 @@
| TC ID COMMA ID formula_expr { FormulaSubst.make_lfp_tc $2 $4 $5 }
| TC IN_MOD ID COMMA ID formula_expr { FormulaSubst.make_mso_tc $3 $5 $6 }
| TC INT ID COMMA ID formula_expr { FormulaSubst.make_fo_tc_conj $2 $3 $5 $6 }
+ | TC PLUS INT ID COMMA ID formula_expr
+ { FormulaSubst.make_fo_tc_disj ~reflexive:false $3 $4 $6 $7 }
| LFP ID OPEN fo_var_list CLOSE EQ formula_expr
{ let vs = Array.of_list $4 in if Array.length vs <> 1 then
raise (Parsing_error "Monadic LFP with not one variable")
Modified: trunk/Toss/Learn/Distinguish.ml
===================================================================
--- trunk/Toss/Learn/Distinguish.ml 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Learn/Distinguish.ml 2012-01-19 03:06:07 UTC (rev 1646)
@@ -225,6 +225,9 @@
| Some n -> Some (n, f) in
Aux.map_some max_n_chosen choices
+(* Number of steps and base formulas if distinguish returns a TC. *)
+let distinguish_result_tc = ref None
+
(* Find a upto-[n]-step transitive closures of two-variable [?positive] atomic
formulas that hold on all [pos_strucs] and on no [neg_strucs]. *)
let tc_atomic_distinguish ?(positive=false) ?(repeat_vars=true) pos neg n =
@@ -238,9 +241,16 @@
let cmp (n1, f1) (n2, f2) =
if n1 <> n2 then n1-n2 else Formula.compare f1 f2 in
let (k, phi) = List.hd (List.sort cmp l) in
- tc k phi in
- try Some (Or (List.rev_map (fun s -> choose (tcs s)) pos)) with
- Not_found -> None
+ let phi = Formula.flatten_sort phi in
+ match !distinguish_result_tc with
+ | None -> distinguish_result_tc := Some [(k, phi)]; tc k phi
+ | Some l -> distinguish_result_tc := Some ((k, phi) :: l); tc k phi in
+ try distinguish_result_tc := None;
+ let res = Some (Or (List.rev_map (fun s -> choose (tcs s)) pos)) in
+ match !distinguish_result_tc with
+ | None -> res
+ | Some l -> distinguish_result_tc := Some (Aux.unique_sorted l); res
+ with Not_found -> distinguish_result_tc := None; None
(* - Distinguishing Structure Sets - *)
Modified: trunk/Toss/Learn/Distinguish.mli
===================================================================
--- trunk/Toss/Learn/Distinguish.mli 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Learn/Distinguish.mli 2012-01-19 03:06:07 UTC (rev 1646)
@@ -68,7 +68,10 @@
Structure.structure list -> Structure.structure list -> int ->
Formula.formula option
+(** Number of steps and base formula if distinguish returns a TC. *)
+val distinguish_result_tc : (int * Formula.formula) list option ref
+
(** {2 Distinguishing Structure Sets} *)
(** Order on types that we use to select the minimal ones. *)
Modified: trunk/Toss/Learn/LearnGame.ml
===================================================================
--- trunk/Toss/Learn/LearnGame.ml 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Learn/LearnGame.ml 2012-01-19 03:06:07 UTC (rev 1646)
@@ -13,30 +13,40 @@
evens ~acc:[1] k
-let winFormula winningStates notWinningStates =
+let winFormula ?(nicetc=true) winningStates notWinningStates =
if !debug_level > 0 then
print_endline (
"Searching WIN:\n" ^
(String.concat "\n" (List.map Structure.str winningStates)) ^ "\nNOT\n"^
(String.concat "\n" (List.map Structure.str notWinningStates)));
- FormulaOps.tnf_fv (Distinguish.distinguish winningStates notWinningStates)
+ let res = Distinguish.distinguish winningStates notWinningStates in
+ let print_tc (i,f) = Printf.sprintf "(tc+ %i x0 x1 (%s))" i (Formula.str f) in
+ match !Distinguish.distinguish_result_tc with
+ | None | Some [(1, _)] -> Formula.str (FormulaOps.tnf_fv res)
+ | Some l -> if not nicetc then Formula.str (FormulaOps.tnf_fv res) else
+ "ex x0, x1 (\n " ^ (String.concat " or\n " (List.map print_tc l)) ^ " )"
+
let cleanStructure struc =
let funs = ref [] in
let append_fun f _ = funs := f :: !funs in
Structure.StringMap.iter append_fun (Structure.functions struc);
- let struc = StructureParser.parse_structure Lexer.lex (Lexing.from_string (Structure.str struc)) in
- Structure.replace_names (List.fold_left
- (fun x y ->
- Structure.clear_fun x y)
- struc !funs) Structure.StringMap.empty
- Structure.IntMap.empty
+ let struc = StructureParser.parse_structure Lexer.lex
+ (Lexing.from_string (Structure.str struc)) in (* elems now from 1 *)
+ let nofun_struc =
+ List.fold_left (fun x y -> Structure.clear_fun x y) struc !funs in
+ let bind_name (sm, im) i =
+ (Structure.StringMap.add ("e" ^ (string_of_int i)) i sm,
+ Structure.IntMap.add i ("e" ^ (string_of_int i)) im) in
+ let bind_names l = List.fold_left bind_name
+ (Structure.StringMap.empty, Structure.IntMap.empty) l in
+ let (sm,im)= bind_names (Aux.range ~from:1 ((Structure.nbr_elems struc)+1)) in
+ Structure.replace_names nofun_struc sm im
let move struct1 struct2 =
- let changed = (Aux.unique_sorted
- ( List.map fst
- (Structure.diff_elems struct1 struct2 )) ) in
+ let changed =
+ Aux.unique_sorted (List.map fst (Structure.diff_elems struct1 struct2)) in
let strucBefore =
fst (Structure.del_elems struct1
(Aux.list_diff
@@ -47,27 +57,46 @@
(Aux.list_diff
(Aux.unique_sorted (Structure.elements struct2))
changed )) in
- ((cleanStructure strucBefore) , (cleanStructure strucAfter))
-
+ (struct1,struct2, ((cleanStructure strucBefore), (cleanStructure strucAfter)))
+
let movesi i partylist =
- Aux.unique_sorted
- ~cmp: (fun (s1,s2) (t1,t2) ->
- let c = ( Structure.compare s1 t1) in
- if c != 0 then c
- else (Structure.compare s2 t2))
- (List.fold_left
+ (List.fold_left
(fun acc party ->
List.append acc
(List.fold_left
- (fun prev i ->
- if (i < ((List.length party)-1)) then
- let m = move (List.nth party i) (List.nth party (i+1)) in
- (List.append prev [m])
- else
- (List.append prev []))
- [] (evens ~acc:[i] (List.length party)) ) )
- [] partylist)
+ (fun prev i ->
+ if (i < ((List.length party)-1)) then
+ (move (List.nth party i) (List.nth party (i+1))) :: prev
+ else prev) [] (evens ~acc:[i] (List.length party)))
+ ) [] partylist)
+
+let movecmp (s1,s2) (t1,t2) =
+ let c = (Structure.compare s1 t1) in
+ if c != 0 then c else (Structure.compare s2 t2)
+
+let add_precond moves wrong m =
+ let mwrong = List.filter (fun (l, r, x) -> movecmp x m = 0) wrong in
+ if mwrong = [] then (m, Formula.And []) else
+ let mright = List.filter (fun (l, r, x) -> movecmp x m = 0) moves in
+ let mark (l, r, _) =
+ let chg = Aux.unique_sorted (List.map fst (Structure.diff_elems l r)) in
+ Structure.add_rels l "chg" (List.map (fun e -> [|e|]) chg) in
+ let (good, bad) = (List.map mark mright, List.map mark mwrong) in
+ if !debug_level > 0 then (
+ List.iter Structure.print good;
+ List.iter Structure.print bad;
+ print_endline "";
+ );
+ let pre = Distinguish.distinguish good bad in
+ if !debug_level > 0 then print_endline (Formula.str pre);
+ let elems = Aux.range ~from:1 ((Structure.nbr_elems (fst m)) + 1) in
+ let eqs = List.map (fun i -> "x = e" ^ (string_of_int i)) elems in
+ let let_part = "let chg(x) = " ^ (String.concat " or " eqs) ^ " in " in
+ let phi = FormulaParser.parse_formula Lexer.lex
+ (Lexing.from_string (let_part ^ (Formula.str pre))) in
+ (m, FormulaOps.tnf_fv phi)
+
let learnFromParties ~win0 ~win1 ~notwon ~wrong =
let win0f = winFormula
(List.map (fun x -> List.hd (List.rev x)) win0)
@@ -76,40 +105,53 @@
let win1f = winFormula
(List.map (fun x -> List.hd (List.rev x)) win1)
(List.flatten ((List.map (fun x-> List.tl (List.rev x))
- win1) @ win0 @ notwon)) in
+ win1) @ win0 @ notwon)) in
- let moves0 = movesi 0 (win0 @ win1 @ notwon) in
- let moves1 = movesi 1 (win0 @ win1 @ notwon) in
+ let fullMoves0 = movesi 0 (win0 @ win1 @ notwon) in
+ let fullMoves1 = movesi 1 (win0 @ win1 @ notwon) in
+ let wrongPairs =
+ Aux.map_some (fun play -> if List.length play < 2 then None else
+ let r = List.rev play in Some (List.hd (List.tl r), List.hd r)) wrong in
+ let wrongMoves = List.map (fun (l, r) -> move l r) wrongPairs in
+
+ let moves0 = Aux.unique_sorted ~cmp:movecmp (List.map Aux.trd3 fullMoves0) in
+ let moves1 = Aux.unique_sorted ~cmp:movecmp (List.map Aux.trd3 fullMoves1) in
+
+ let moves0 = List.map (add_precond fullMoves0 wrongMoves) moves0 in
+ let moves1 = List.map (add_precond fullMoves1 wrongMoves) moves1 in
+
let cmpll l1 l2 = (List.length l2) - (List.length l1) in
let longest = List.hd (List.sort cmpll (win0 @ win1 @ notwon)) in
+ let mvlst pre post l = String.concat "; " (List.map (
+ fun i -> pre ^ (string_of_int i) ^ post) (Aux.range (List.length l))) in
"PLAYERS 1, 2\n" ^
- "REL Win1() = "^ (Formula.sprint win0f) ^"\n"^
- "REL Win2() = "^ (Formula.sprint win1f) ^"\n"^
+ "REL Win1() = "^ win0f ^ "\n"^
+ "REL Win2() = "^ win1f ^ "\n"^
(fst (List.fold_left
- (fun (old, i) x ->
+ (fun (old, i) ((l, r), pre) ->
(old ^ "\n" ^ "RULE Mv1-" ^ (string_of_int i) ^ ": \n" ^
- (Structure.str (fst x)) ^ " -> " ^ (Structure.str (snd x)) ^ "\nemb "^
- (String.concat "," (List.map fst (Structure.rel_signature (fst x)) ))^
- "\npre not Win2()"), i+1)
+ (Structure.str l) ^ " -> " ^ (Structure.str r) ^ "\nemb " ^
+ (String.concat "," (List.map fst (Structure.rel_signature l))) ^
+ "\npre (" ^ (Formula.str pre) ^ ") and not Win2()"), i+1)
("", 0) moves0)) ^ "\n\n" ^
(fst (List.fold_left
- (fun (old, i) x ->
+ (fun (old, i) ((l, r), pre) ->
(old ^ "\n" ^ "RULE Mv2-" ^ (string_of_int i) ^ ": \n" ^
- (Structure.str (fst x)) ^ " -> " ^ (Structure.str (snd x)) ^ "\nemb "^
- (String.concat "," (List.map fst (Structure.rel_signature (fst x)) ))^
- "\npre not Win1()"), i+1)
+ (Structure.str l) ^ " -> " ^ (Structure.str r) ^ "\nemb "^
+ (String.concat "," (List.map fst (Structure.rel_signature l))) ^
+ "\npre (" ^ (Formula.str pre) ^ ") and not Win1()"), i+1)
("",0) moves1)) ^ "\n\n" ^
"LOC 0 {
PLAYER 1 { PAYOFF : (Win1()) - :(Win2())
- MOVES [Mv1 -> 1]}
+ MOVES [" ^ (mvlst "Mv1-" " -> 1" moves0) ^ "]}
PLAYER 2 { PAYOFF : (Win2()) - :(Win1()) }
}
LOC 1 {
PLAYER 1 { PAYOFF :(Win1()) - :(Win2()) }
PLAYER 2 { PAYOFF :(Win2()) - :(Win1())
- MOVES [Mv2 -> 0] }
-}" ^"\n" ^
- "MODEL "^(Structure.str (List.hd longest))
+ MOVES [" ^ (mvlst "Mv2-" " -> 0" moves1) ^ "] }
+}" ^ "\n" ^
+ "MODEL "^(Structure.str (List.hd longest))
Modified: trunk/Toss/Learn/LearnGame.mli
===================================================================
--- trunk/Toss/Learn/LearnGame.mli 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Learn/LearnGame.mli 2012-01-19 03:06:07 UTC (rev 1646)
@@ -1,7 +1,5 @@
(** Module for learning games from examples. *)
-val move: Structure.structure -> Structure.structure ->
- Structure.structure * Structure.structure
(** Learn a two-player win-lose-or-tie game given 4 sets of plays of another
game [source]: [wins0] which are now supposed to be won by Player 0,
Modified: trunk/Toss/Learn/LearnGameTest.ml
===================================================================
--- trunk/Toss/Learn/LearnGameTest.ml 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Learn/LearnGameTest.ml 2012-01-19 03:06:07 UTC (rev 1646)
@@ -50,25 +50,25 @@
REL Win2() = ex x1 (Q(x1) and ex x0 R(x0, x1))
RULE Mv1-0:
-[1 | P:1 {}; Q:1 {}; R:2 {} | ] -> [1 | P (1); Q:1 {}; R:2 {} | ]
+[e1 | P:1 {}; Q:1 {}; R:2 {} | ] -> [e1 | P (e1); Q:1 {}; R:2 {} | ]
emb R,Q,P
-pre not Win2()
+pre (true) and not Win2()
RULE Mv2-0:
-[1 | P:1 {}; Q:1 {}; R:2 {} | ] -> [1 | P:1 {}; Q (1); R:2 {} | ]
+[e1 | P:1 {}; Q:1 {}; R:2 {} | ] -> [e1 | P:1 {}; Q (e1); R:2 {} | ]
emb R,Q,P
-pre not Win1()
+pre (true) and not Win1()
LOC 0 {
PLAYER 1 { PAYOFF : (Win1()) - :(Win2())
- MOVES [Mv1 -> 1]}
+ MOVES [Mv1-0 -> 1]}
PLAYER 2 { PAYOFF : (Win2()) - :(Win1()) }
}
LOC 1 {
PLAYER 1 { PAYOFF :(Win1()) - :(Win2()) }
PLAYER 2 { PAYOFF :(Win2()) - :(Win1())
- MOVES [Mv2 -> 0] }
+ MOVES [Mv2-0 -> 0] }
}
MODEL [ | P:1 {}; Q:1 {} | ] R R \"
@@ -87,8 +87,10 @@
match bound with None-> Str.split r s | Some b-> Str.bounded_split r s b in
let cl = String.index s '\n' in
let pref, st_s = String.sub s 0 cl, String.sub s cl ((String.length s)-cl) in
- let s = List.filter (fun s -> s <> "") (split_list "\n\n" st_s) in
- List.map (fun s -> struc_of_string ~diag:true (pref ^ " \n\"" ^ s ^"\n\"")) s
+ let strucstr s = pref ^ " \n\"" ^ s ^ "\n\"" in
+ let getstruc s = let st = strucstr s in try struc_of_string ~diag:true st
+ with e -> print_endline st; raise e in
+ List.map getstruc (List.filter (fun s -> s <> "") (split_list "\n\n" st_s))
let main () =
Aux.set_optimized_gc ();
@@ -108,8 +110,9 @@
let tfiles = List.map (fun fn -> !dir ^ "/" ^ fn)
(List.sort compare (List.filter is_test (AuxIO.list_dir !dir))) in
let is_group g fn = String.sub fn ((String.length fn) - 4) 4 = "." ^ g in
- let strucs_of_files fs =
- List.map (fun fn -> get_strucs (AuxIO.input_fname fn)) fs in
+ let get_struc fn = try get_strucs (AuxIO.input_fname fn) with
+ err -> print_endline ("Error in " ^ fn); raise err in
+ let strucs_of_files fs = List.map get_struc fs in
let (win0, win1, notwon, wrong) =
(strucs_of_files (List.filter (is_group "wn0") tfiles),
strucs_of_files (List.filter (is_group "wn1") tfiles),
Modified: trunk/Toss/Learn/Makefile
===================================================================
--- trunk/Toss/Learn/Makefile 2012-01-18 02:45:45 UTC (rev 1645)
+++ trunk/Toss/Learn/Makefile 2012-01-19 03:06:07 UTC (rev 1646)
@@ -25,7 +25,11 @@
learntests:
make Tic-Tac-Toe001.learn
- make Breakthrough001.learn
+ make Tic-Tac-Toe002.learn
+ #make Breakthrough001.learn
+ make Gomoku001.learn
+ make Connect4001.learn
+ make Pawn-Whopping001.learn
.PHONY: clean
Added: trunk/Toss/Learn/examples/Connect4001_01.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_01.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_01.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,43 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ...Q ... ...
+
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+...P ...Q ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_01.wn0
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_01.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_01.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ Q..Q Q..Q ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_01.wn1
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_01.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_01.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ P..P P..P ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_01.wrg
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_01.wrg (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_01.wrg 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,29 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_02.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_02.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_02.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...Q Q..Q ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_02.wn0
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_02.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_02.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_02.wn1
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_02.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_02.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...P ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...P ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_02.wrg
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_02.wrg (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_02.wrg 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,29 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_03.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_03.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_03.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_03.wn0
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_03.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_03.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ...
+ ... Q.. ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ Q.. ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_03.wn1
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_03.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_03.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... P.. ...
+ ... ... ...
+ ... P.. ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ P.. ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_03.wrg
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_03.wrg (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_03.wrg 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,41 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P..Q ... ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P..Q ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_04.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_04.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_04.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ...
+ ... Q.. ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_04.wn0
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_04.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_04.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ... Q.. ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ...
+ ... ... Q..
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_04.wn1
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_04.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_04.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ... P.. ...
+... ... ... ...
+... ... P.. ...
+ ... ... ...
+ ... ... P..
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_04.wrg
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_04.wrg (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_04.wrg 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,41 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. Q.. ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. Q.. ...
+
Added: trunk/Toss/Learn/examples/Connect4001_05.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_05.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_05.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ... Q.. ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_06.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_06.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_06.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...P P..P ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_07.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_07.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_07.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...P ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...P ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_08.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_08.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_08.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... P.. ...
+ ... ... ...
+ ... P.. ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_09.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_09.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_09.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,15 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ... P.. ...
+... ... ... ...
+... ... P.. ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_10.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_10.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_10.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,29 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_11.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_11.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_11.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,29 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_12.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_12.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_12.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,41 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P..Q ... ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...P ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P..Q ... ...
+
Added: trunk/Toss/Learn/examples/Connect4001_13.nwn
===================================================================
--- trunk/Toss/Learn/examples/Connect4001_13.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Connect4001_13.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,41 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. ... ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. Q.. ...
+
+ ... ... ...
+ ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ...
+ ...P ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ...
+ ...Q ... ...
+... ... ... ...
+... P.. Q.. ...
+
Added: trunk/Toss/Learn/examples/Gomoku001_01.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_01.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_01.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,70 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ...Q ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ...Q ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ...P ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ...Q Q.. ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ...P ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Gomoku001_01.wn0
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_01.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_01.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+...Q Q..Q Q..Q ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_01.wn1
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_01.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_01.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+...P P..P P..P ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_02.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_02.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_02.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... Q..Q Q..Q ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_02.wn0
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_02.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_02.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ...Q ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ...Q ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_02.wn1
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_02.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_02.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ...P ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ...P ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_03.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_03.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_03.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ...Q ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ...Q ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_03.wn0
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_03.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_03.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... Q.. ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ... ...
+ ... Q.. ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ Q.. ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_03.wn1
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_03.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_03.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... P.. ...
+... ... ... ...
+... ... P.. ...
+ ... ... ... ...
+ ... P.. ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ P.. ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_04.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_04.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_04.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... Q.. ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ... ...
+ ... Q.. ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_04.wn0
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_04.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_04.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ Q.. ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ... Q.. ... ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ... ...
+ ... ... Q.. ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_04.wn1
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_04.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_04.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ P.. ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ... P.. ... ...
+... ... ... ...
+... ... P.. ...
+ ... ... ... ...
+ ... ... P.. ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_05.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_05.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_05.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ Q.. ... ... ...
+... ... ... ...
+... Q.. ... ...
+ ... ... ... ...
+ ... Q.. ... ...
+... ... ... ...
+... ... Q.. ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_06.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_06.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_06.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... P..P P..P ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_07.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_07.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_07.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ...P ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ...P ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_08.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_08.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_08.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... P.. ...
+... ... ... ...
+... ... P.. ...
+ ... ... ... ...
+ ... P.. ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Gomoku001_09.nwn
===================================================================
--- trunk/Toss/Learn/examples/Gomoku001_09.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Gomoku001_09.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,18 @@
+[ | P:1 {}; Q:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... P.. ... ...
+ ... ... ... ...
+ ... P.. ... ...
+... ... ... ...
+... ... P.. ...
+ ... ... ... ...
+ ... ... P.. ...
+... ... ... ...
+... ... ... ...
Added: trunk/Toss/Learn/examples/Pawn-Whopping001_01.nwn
===================================================================
--- trunk/Toss/Learn/examples/Pawn-Whopping001_01.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Pawn-Whopping001_01.nwn 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,199 @@
+[ | B:1 {}; W:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B B..B B..B B..B
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W W..W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B B..B B..B B..B
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... W.. ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ...W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ...B B..B B..B
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... B.. ... ...
+ ... ... ... ...
+ ... W.. ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ...W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ...B B..B B..B
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... W.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ...W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... B..B B..B
+ ... ... ... ...
+ ... B.. ... ...
+... ... ... ...
+... W.. ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ...W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... B..B B..B
+ ... ... ... ...
+ ... W.. ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ...W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... ...B B..B
+ ... ... ... ...
+ ... B.. ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ...W W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... ...B B..B
+ ... ... ... ...
+ ... B.. ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ...W ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ... W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... ...B ...B
+ ... ... ... ...
+ ... B.. ...B ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ...W ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ... W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... ...B ...B
+ ... ... ... ...
+ ... B.. ...B ...
+... ... ... ...
+... ... W.. ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ... W..W W..
+... ... ... ...
+... ... ... ...
+
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B..B ... ...B ...B
+ ... ... ... ...
+ ... ... ...B ...
+... ... ... ...
+... ... B.. ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+W W..W ... W..W W..
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn0
===================================================================
--- trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn0 (rev 0)
+++ trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn0 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,19 @@
+[ | B:1 {}; W:1 {} | ]
+
+ ... ... ... ...
+ ... W.. ... ...
+... ... ... ...
+B.. ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ...W ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn1
===================================================================
--- trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn1 (rev 0)
+++ trunk/Toss/Learn/examples/Pawn-Whopping001_01.wn1 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,19 @@
+[ | B:1 {}; W:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+B.. ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ...W ...
+... ... ... ...
+... ...B ... ...
+
Added: trunk/Toss/Learn/examples/Pawn-Whopping001_01.wrg
===================================================================
--- trunk/Toss/Learn/examples/Pawn-Whopping001_01.wrg (rev 0)
+++ trunk/Toss/Learn/examples/Pawn-Whopping001_01.wrg 2012-01-19 03:06:07 UTC (rev 1646)
@@ -0,0 +1,36 @@
+[ | B:1 {}; W:1 {} | ]
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... W.. ... ...
+... ... ... ...
+... ... ... ...
+
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ...W ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+ ... ... ... ...
+ ... ... ... ...
+... ... ... ...
+... ... ... ...
+
Added: trunk/Toss/Learn/examples/Pawn-Whopping001_02.nwn
===================================================================
--- trunk/Toss/Learn/examples/Pawn-Whopping001_02.nwn (rev 0)
+++ trunk/Toss/Learn/examples/Pawn-W...
[truncated message content] |