[Toss-devel-svn] SF.net SVN: toss:[1689] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2012-03-11 00:30:20
|
Revision: 1689
http://toss.svn.sourceforge.net/toss/?rev=1689&view=rev
Author: lukaszkaiser
Date: 2012-03-11 00:30:10 +0000 (Sun, 11 Mar 2012)
Log Message:
-----------
Changing MODEL to START, debugging and website updates.
Modified Paths:
--------------
trunk/Toss/Arena/Arena.ml
trunk/Toss/Arena/ArenaParser.mly
trunk/Toss/Arena/ArenaTest.ml
trunk/Toss/Client/Style.css
trunk/Toss/Client/index.html
trunk/Toss/Formula/Formula.ml
trunk/Toss/Formula/FormulaOpsTest.ml
trunk/Toss/Formula/FormulaTest.ml
trunk/Toss/Formula/Lexer.mll
trunk/Toss/Formula/Tokens.mly
trunk/Toss/GGP/tests/2player_normal_form_2010-raw.toss
trunk/Toss/GGP/tests/2player_normal_form_2010-simpl.toss
trunk/Toss/GGP/tests/2player_normal_form_joint-raw.toss
trunk/Toss/GGP/tests/2player_normal_form_joint-simpl.toss
trunk/Toss/GGP/tests/asteroids-scrambled-raw.toss
trunk/Toss/GGP/tests/asteroids-scrambled-simpl.toss
trunk/Toss/GGP/tests/breakthrough-raw.toss
trunk/Toss/GGP/tests/breakthrough-simpl.toss
trunk/Toss/GGP/tests/connect4-raw.toss
trunk/Toss/GGP/tests/connect4-simpl.toss
trunk/Toss/GGP/tests/connect5-raw.toss
trunk/Toss/GGP/tests/connect5-simpl.toss
trunk/Toss/GGP/tests/pacman3p-raw.toss
trunk/Toss/GGP/tests/pacman3p-simpl.toss
trunk/Toss/GGP/tests/pawn_whopping-raw.toss
trunk/Toss/GGP/tests/pawn_whopping-simpl.toss
trunk/Toss/GGP/tests/tictactoe-other-raw.toss
trunk/Toss/GGP/tests/tictactoe-other-simpl.toss
trunk/Toss/GGP/tests/tictactoe-raw.toss
trunk/Toss/GGP/tests/tictactoe-simpl.toss
trunk/Toss/Learn/LearnGame.ml
trunk/Toss/Learn/LearnGameTest.ml
trunk/Toss/Makefile
trunk/Toss/Play/Heuristic.ml
trunk/Toss/Play/PlayTest.ml
trunk/Toss/Server/Server.ml
trunk/Toss/examples/Breakthrough.toss
trunk/Toss/examples/Checkers.toss
trunk/Toss/examples/Chess.toss
trunk/Toss/examples/Concurrent-Tic-Tac-Toe.toss
trunk/Toss/examples/Connect4.toss
trunk/Toss/examples/Entanglement.toss
trunk/Toss/examples/Gomoku.toss
trunk/Toss/examples/Gomoku19x19.toss
trunk/Toss/examples/PacMan.toss
trunk/Toss/examples/Pawn-Whopping.toss
trunk/Toss/examples/Tic-Tac-Toe.toss
trunk/Toss/examples/bounce.toss
trunk/Toss/examples/rewriting_example.toss
trunk/Toss/www/contact.xml
trunk/Toss/www/ideas.xml
trunk/Toss/www/index.xml
trunk/Toss/www/navigation.xml
trunk/Toss/www/scripts/main.js
trunk/Toss/www/styles/common.css
trunk/Toss/www/xsl/common.xsl
Added Paths:
-----------
trunk/Toss/Client/img/logo.png
trunk/Toss/www/img/appstore-small.png
Removed Paths:
-------------
trunk/Toss/Client/img/toss.png
Modified: trunk/Toss/Arena/Arena.ml
===================================================================
--- trunk/Toss/Arena/Arena.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Arena/Arena.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -154,7 +154,7 @@
cur_loc = cur_loc;
history = hist;
} =
- Format.fprintf ppf "@[<1>MODEL@ %a@]@ "
+ Format.fprintf ppf "@[<1>START@ %a@]@ "
(if ext_struct then (Structure.fprint_ext_structure ~show_empty:true) else
(Structure.fprint ~show_empty:true)) struc;
if (hist <> []) then
@@ -206,7 +206,7 @@
Array.iteri (fun loc_id loc ->
Format.fprintf ppf "@[<0>LOC@ %d@ {@,@[<2> %a@]@]@,}@ "
loc_id (fprint_loc_body struc player_names) loc) graph;
- Format.fprintf ppf "@[<1>MODEL@ %a@]@ "
+ Format.fprintf ppf "@[<1>START@ %a@]@ "
(if ext_struct then (Structure.fprint_ext_structure ~show_empty:true) else
(Structure.fprint ~show_empty:true)) struc;
if (hist <> []) then
Modified: trunk/Toss/Arena/ArenaParser.mly
===================================================================
--- trunk/Toss/Arena/ArenaParser.mly 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Arena/ArenaParser.mly 2012-03-11 00:30:10 UTC (rev 1689)
@@ -10,7 +10,6 @@
%}
%start parse_game_defs parse_game_state
-%type <Arena.struct_loc> struct_location
%type <(string * int) list -> int * Arena.player_loc array> location
%type <Arena.definition> parse_game_defs
%type <Arena.game * Arena.game_state> parse_game_state game_state
@@ -123,9 +122,9 @@
EQ
body = formula_expr_err
{ DefRel (rel, arg, body) }
- | MODEL_SPEC model = struct_expr
+ | START model = struct_expr
{ StateStruc model }
- | MODEL_SPEC model = struct_expr WITH
+ | START model = struct_expr WITH
defs = separated_list (SEMICOLON, rel_def_simple)
{ StateStruc (Arena.add_def_rels model defs) }
| MOVES moves = separated_list (SEMICOLON, game_move_timed)
@@ -155,11 +154,6 @@
move_expr:
| ID { Arena.empty_move with rule = $1 }
-struct_location:
- | MODEL_SPEC { Struct }
- | RULE_SPEC id_int LEFT_SPEC { Arena.Left ($2) }
- | RULE_SPEC id_int RIGHT_SPEC { Arena.Right ($2) }
-
parse_game_defs:
game_defs EOF { $1 };
Modified: trunk/Toss/Arena/ArenaTest.ml
===================================================================
--- trunk/Toss/Arena/ArenaTest.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Arena/ArenaTest.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -11,7 +11,7 @@
let s = "PLAYERS white, black
RULE finish: [ | R(a, b) | ] -> [ | R(a, c); R(c, b) | ] emb R
with [a<-a, b<-b]
-MODEL [a, b | R(a, b) | ]
+START [a, b | R(a, b) | ]
REL P(x) {ex y R(x, y)}
REL Q(x) {ex y R(y, x)}
TIME 7.
@@ -37,7 +37,7 @@
LOC 1 {
PLAYER white { PAYOFF 0.3 } PLAYER black { PAYOFF :(ex x ex y R(y, x)) }
}
-MODEL [a, b | R (a, b) | ]
+START [a, b | R (a, b) | ]
STATE LOC 1
TIME 7.
" in
@@ -58,7 +58,7 @@
LOC 1 {
PLAYER white { PAYOFF 0.3 } PLAYER black { PAYOFF :(ex x ex y R(y, x)) }
}
-MODEL [a, b | R (a, b) | ]
+START [a, b | R (a, b) | ]
STATE LOC 1
TIME 7.
" in
Modified: trunk/Toss/Client/Style.css
===================================================================
--- trunk/Toss/Client/Style.css 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Client/Style.css 2012-03-11 00:30:10 UTC (rev 1689)
@@ -132,6 +132,12 @@
text-decoration: underline;
}
+#appstorelink {
+ position: absolute;
+ right: 1em;
+ top: 0.5em;
+}
+
.reglabel {
float: left;
clear: left;
Copied: trunk/Toss/Client/img/logo.png (from rev 1688, trunk/Toss/Client/img/toss.png)
===================================================================
(Binary files differ)
Deleted: trunk/Toss/Client/img/toss.png
===================================================================
(Binary files differ)
Modified: trunk/Toss/Client/index.html
===================================================================
--- trunk/Toss/Client/index.html 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Client/index.html 2012-03-11 00:30:10 UTC (rev 1689)
@@ -22,12 +22,17 @@
<div id="top">
<div id="logo">
<a id="leftupperlogo-link" href="index.html">
- <img id="leftupperlogo-img" src="img/toss.png" alt="tPlay" />
+ <img id="leftupperlogo-img" src="img/logo.png" alt="tPlay" />
</a>
</div>
<span id="localdown" style="position:relative; top: 0.7em;">
<span id="topuser"></span>
</span>
+
+<span id="appstorelink">
+<a href="http://itunes.apple.com/us/app/tplay/id438620686"
+ ><img style="height: 24px;" src="img/appstore-small.png" /></a>
+</span>
</div>
<div id="welcome">
@@ -128,46 +133,8 @@
<li>Challenge your friends or play a fast game against the computer for fun</li>
</ul>
-<div id="news">
-<h3>News</h3>
-<ul id="welcome-list-news" class="welcome-list">
-<li><b>09/03/12</b> First completely working mostly-JS Toss version</li>
-<li><b>05/03/12</b> Fully integrated OCaml and JS debugging and logs</li>
-<li><b>27/02/12</b> Compiled resources to access files from JS</li>
-<li><b>18/02/12</b> Integrating OCaml and JS unit tests</li>
-<li><b>11/02/12</b> Starting systematic unit tests of JS interface</li>
-<li><b>06/02/12</b> Toss release 0.7 with many improvements</li>
-<li><b>04/02/12</b> Definitions use play history: new Chess toss file</li>
-<li><b>02/02/12</b> Improved stand-alone JS interface with menhirLib</li>
-<li><b>31/01/12</b> First stand-alone JS interface (with js_of_ocaml)</li>
-<li><b>22/01/12</b> Learning Connect4 and Gomoku from videos</li>
-<li><b>21/01/12</b> Learning Breakthrough and Pawn-Whopping videos</li>
-<li><b>17/01/12</b> Integrating game learning logic and video stuff</li>
-<li><b>06/01/12</b> Parametrized grid detection for video</li>
-<li><b>28/12/11</b> Game video recognition improved with Hough lines</li>
-<li><b>10/12/11</b> Starting work on game recognition from video</li>
-<li><b>24/10/11</b> Learning games from examples in web interface</li>
-<li><b>19/10/11</b> Games learning engine and first buttons in the UI</li>
-<li><b>14/09/11</b> Simple editing of games added to web interface</li>
-<li><b>31/07/11</b> Store date and time of moves in games</li>
-<li><b>30/07/11</b> Corrected opponent lists in the Profile tab</li>
-<li><b>03/07/11</b> Added game descriptions viewable when playing</li>
-<li><b>30/06/11</b> View previous moves in a play</li>
-<li><b>27/06/11</b> Tabs and searching opponents in the profile page</li>
-<li><b>22/06/11</b> Better organized lists of plays</li>
-<li><b>19/06/11</b> News section on the front page of tPlay</li>
-<li><b>15/06/11</b> Bug with underscores in user names corrected</li>
-<li><b>10/06/11</b> New register site handles forgotten passwords</li>
-<li><b>05/06/11</b> Pre-caching client states improves response times</li>
-<li><b>03/06/11</b> Corrected tPlay 1.1 app accepted on App Store</li>
-<li><b>30/05/11</b> Large restructuring of JavaScript code finished</li>
-<li><b>24/05/11</b> Breakthrough generation from examples in SVN</li>
-<li><b>23/05/11</b> First tPlay application accepted on App Store</li>
-</ul>
</div>
-</div>
-
<div id="nosvg">
<p style="padding-left: 1.2em; font-size: 1.2em;"><b>SVG Support Missing</b></p>
<p>Your browser does not seem to support SVG,
Modified: trunk/Toss/Formula/Formula.ml
===================================================================
--- trunk/Toss/Formula/Formula.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Formula/Formula.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -179,7 +179,7 @@
Format.fprintf f "%a(%a)" fprint_var r
(Aux.fprint_sep_list "," fprint_var) (Array.to_list vars)
| RealExpr (p, s) ->
- Format.fprintf f "@[(%a %s)@]" (fprint_real_prec 0) p (sign_op_str s)
+ Format.fprintf f "@[(%a%s)@]" (fprint_real_prec 0) p (sign_op_str s)
| Not phi ->
let lb, rb =
if prec > 2 then "(", ")" else "", "" in
@@ -224,7 +224,7 @@
| Plus (r1, Times (Const fl, r2)) when fl = -1. -> (* r1 - r2 short *)
let lb, rb = if prec > 0 then "(", ")" else "", "" in
Format.fprintf f "@[<1>%s%a@ -@ %a%s@]" lb
- (fprint_real_prec 0) r1 (fprint_real_prec 0) r2 rb
+ (fprint_real_prec 0) r1 (fprint_real_prec 1) r2 rb
| Times (r1, r2) ->
let lb, rb =
if prec > 2 then "(", ")" else "", "" in
@@ -455,10 +455,19 @@
and flatten_re_f f_or f_and = function
| RVar _ | Const _ | Fun _ as re -> re
+ | Plus (re1, re2) ->
+ (match flatten_re_f f_or f_and re1, flatten_re_f f_or f_and re2 with
+ | (Const 0., flat2) -> flat2
+ | (flat1, Const 0.) -> flat1
+ | (flat1, flat2) -> Plus (flat1, flat2)
+ )
| Times (re1, re2) ->
- Times (flatten_re_f f_or f_and re1, flatten_re_f f_or f_and re2)
- | Plus (re1, re2) ->
- Plus (flatten_re_f f_or f_and re1, flatten_re_f f_or f_and re2)
+ (match flatten_re_f f_or f_and re1, flatten_re_f f_or f_and re2 with
+ | (Const 0., _) | (_, Const 0.) -> Const 0.
+ | (Const 1., flat2) -> flat2
+ | (flat1, Const 1.) -> flat1
+ | (flat1, flat2) -> Times (flat1, flat2)
+ )
| Char (phi) -> Char (flatten_f f_or f_and phi)
| Sum (vl, phi, r) ->
Sum (vl, flatten_f f_or f_and phi, flatten_re_f f_or f_and r)
Modified: trunk/Toss/Formula/FormulaOpsTest.ml
===================================================================
--- trunk/Toss/Formula/FormulaOpsTest.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Formula/FormulaOpsTest.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -27,7 +27,6 @@
"nnf and parsing" >::
(fun () ->
let nnf_eq phi1 phi2 = formula_eq id phi2 FormulaOps.nnf phi1 in
- nnf_eq "true" "true";
nnf_eq "(not false)" "true";
nnf_eq "not (P(x) and not Q(x))" "not P(x) or Q(x)";
nnf_eq "tc 1 x, y R(x, y)" "x = y or R(x, y)";
Modified: trunk/Toss/Formula/FormulaTest.ml
===================================================================
--- trunk/Toss/Formula/FormulaTest.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Formula/FormulaTest.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -1,8 +1,12 @@
open OUnit
open Formula
+let formula_of_string s =
+ FormulaParser.parse_formula Lexer.lex (Lexing.from_string s)
+
let rel r i = Rel (r, Array.make i (`FO "x"))
+
let tests = "Formula" >::: [
"basic flatten" >::
(fun () ->
@@ -37,5 +41,16 @@
assert_equal ~printer:string_of_bool false
(syntax_ok (Lfp (`MSO "X", [|`FO "x"|], Not(In (`FO "x", `MSO "X")))));
);
+
+ "printing and parsing" >::
+ (fun () ->
+ let test_pp f_s = assert_equal ~printer:(fun x -> x) f_s
+ (str (flatten (formula_of_string f_s))) in
+ test_pp "true";
+ test_pp "P(x)";
+ test_pp "ex y (R(x, y) and P(y))";
+ test_pp "all y (R(x, y) or not P(y))";
+ test_pp "(:x - (:y + :z) < 0)";
+ );
]
Modified: trunk/Toss/Formula/Lexer.mll
===================================================================
--- trunk/Toss/Formula/Lexer.mll 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Formula/Lexer.mll 2012-03-11 00:30:10 UTC (rev 1689)
@@ -67,7 +67,7 @@
| GET_CMD
| SET_CMD
| LET_CMD
- | EVAL_CMD
+ | START
| ELEM_MOD
| ELEMS_MOD
| REL_MOD
@@ -84,8 +84,6 @@
| MODEL_SPEC
| RULE_SPEC
| STATE_SPEC
- | LEFT_SPEC
- | RIGHT_SPEC
| CLASS
| LFP
| GFP
@@ -212,7 +210,7 @@
| "set" { SET_CMD }
| "LET" { LET_CMD }
| "let" { LET_CMD }
- | "EVAL" { EVAL_CMD }
+ | "START" { START }
| "ELEM" { ELEM_MOD }
| "ELEMS" { ELEMS_MOD }
| "REL" { REL_MOD }
@@ -229,8 +227,6 @@
| "MODEL" { MODEL_SPEC }
| "RULE" { RULE_SPEC }
| "STATE" { STATE_SPEC }
- | "LEFT" { LEFT_SPEC }
- | "RIGHT" { RIGHT_SPEC }
| "class" { CLASS }
| "LFP" { LFP }
| "lfp" { LFP }
Modified: trunk/Toss/Formula/Tokens.mly
===================================================================
--- trunk/Toss/Formula/Tokens.mly 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Formula/Tokens.mly 2012-03-11 00:30:10 UTC (rev 1689)
@@ -9,9 +9,9 @@
%token OPENCUR CLOSECUR OPENSQ CLOSESQ OPEN CLOSE
%token IN_MOD AND OR XOR NOT EX ALL TC
%token WITH EMB PRE BEFORE INV POST UPDATE DYNAMICS TRUE FALSE ASSOC COND PAYOFF
-%token MOVES MATCH ADD_CMD DEL_CMD GET_CMD SET_CMD LET_CMD EVAL_CMD
+%token MOVES MATCH ADD_CMD DEL_CMD GET_CMD SET_CMD LET_CMD START
%token ELEM_MOD ELEMS_MOD REL_MOD RELS_MOD ALLOF_MOD SIG_MOD FUN_MOD DATA_MOD LOC_MOD TIMEOUT_MOD TIME_MOD PLAYER_MOD PLAYERS_MOD
-%token MODEL_SPEC RULE_SPEC STATE_SPEC LEFT_SPEC RIGHT_SPEC CLASS LFP GFP EOF
+%token MODEL_SPEC RULE_SPEC STATE_SPEC CLASS LFP GFP EOF
/* List in order of increasing precedence. */
%nonassoc LET_CMD
Modified: trunk/Toss/GGP/tests/2player_normal_form_2010-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/2player_normal_form_2010-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/2player_normal_form_2010-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -160,7 +160,7 @@
)
MOVES [m2 -> 0] }
}
-MODEL
+START
[did__BLANK__c1, did__BLANK__c2, did__BLANK__c3, did__BLANK__r1,
did__BLANK__r2, did__BLANK__r3, val__0, val__10, val__100, val__20,
val__30, val__40, val__50, val__80, val__90, val__column, val__row,
Modified: trunk/Toss/GGP/tests/2player_normal_form_2010-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/2player_normal_form_2010-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/2player_normal_form_2010-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -159,7 +159,7 @@
)
MOVES [m2 -> 0] }
}
-MODEL
+START
[did__BLANK__c1, did__BLANK__c2, did__BLANK__c3, did__BLANK__r1,
did__BLANK__r2, did__BLANK__r3, val__0, val__10, val__100, val__20,
val__30, val__40, val__50, val__80, val__90, val__column, val__row,
Modified: trunk/Toss/GGP/tests/2player_normal_form_joint-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/2player_normal_form_joint-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/2player_normal_form_joint-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -160,7 +160,7 @@
)
MOVES [m2 -> 0] }
}
-MODEL
+START
[did__BLANK__c1, did__BLANK__c2, did__BLANK__c3, did__BLANK__r1,
did__BLANK__r2, did__BLANK__r3, val__0, val__10, val__100, val__20,
val__30, val__40, val__50, val__80, val__90, val__column, val__row,
Modified: trunk/Toss/GGP/tests/2player_normal_form_joint-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/2player_normal_form_joint-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/2player_normal_form_joint-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -159,7 +159,7 @@
)
MOVES [m2 -> 0] }
}
-MODEL
+START
[did__BLANK__c1, did__BLANK__c2, did__BLANK__c3, did__BLANK__r1,
did__BLANK__r2, did__BLANK__r3, val__0, val__10, val__100, val__20,
val__30, val__40, val__50, val__80, val__90, val__column, val__row,
Modified: trunk/Toss/GGP/tests/asteroids-scrambled-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/asteroids-scrambled-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/asteroids-scrambled-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -424,7 +424,7 @@
turn_counter1 -> 0]; [turn_counter2 -> 0]
}
}
-MODEL
+START
[val__1, val__10, val__11, val__12, val__13, val__14, val__15, val__16,
val__17, val__18, val__19, val__2, val__20, val__21, val__22, val__23,
val__24, val__25, val__26, val__27, val__28, val__29, val__3, val__30,
Modified: trunk/Toss/GGP/tests/asteroids-scrambled-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/asteroids-scrambled-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/asteroids-scrambled-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -370,7 +370,7 @@
turn_counter1 -> 0]; [turn_counter2 -> 0]
}
}
-MODEL
+START
[val__1, val__10, val__11, val__12, val__13, val__14, val__15, val__16,
val__17, val__18, val__19, val__2, val__20, val__21, val__22, val__23,
val__24, val__25, val__26, val__27, val__28, val__29, val__3, val__30,
Modified: trunk/Toss/GGP/tests/breakthrough-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/breakthrough-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/breakthrough-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -192,7 +192,7 @@
noop_move_x7_y9_x8_y10 -> 0]
}
}
-MODEL
+START
[cellholds_1_1__BLANK_, cellholds_1_2__BLANK_, cellholds_1_3__BLANK_,
cellholds_1_4__BLANK_, cellholds_1_5__BLANK_, cellholds_1_6__BLANK_,
cellholds_1_7__BLANK_, cellholds_1_8__BLANK_, cellholds_2_1__BLANK_,
Modified: trunk/Toss/GGP/tests/breakthrough-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/breakthrough-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/breakthrough-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -121,7 +121,7 @@
noop_move_x7_y9_x8_y10 -> 0]
}
}
-MODEL
+START
[cellholds_1_1__BLANK_, cellholds_1_2__BLANK_, cellholds_1_3__BLANK_,
cellholds_1_4__BLANK_, cellholds_1_5__BLANK_, cellholds_1_6__BLANK_,
cellholds_1_7__BLANK_, cellholds_1_8__BLANK_, cellholds_2_1__BLANK_,
Modified: trunk/Toss/GGP/tests/connect4-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/connect4-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/connect4-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -238,7 +238,7 @@
70. * :((not line__r() and not line__w() and open() and true))
MOVES [noop_drop_c12 -> 0] }
}
-MODEL
+START
[cell_1_0__BLANK_, cell_1_1__BLANK_, cell_1_2__BLANK_, cell_1_3__BLANK_,
cell_1_4__BLANK_, cell_1_5__BLANK_, cell_1_6__BLANK_, cell_2_0__BLANK_,
cell_2_1__BLANK_, cell_2_2__BLANK_, cell_2_3__BLANK_, cell_2_4__BLANK_,
Modified: trunk/Toss/GGP/tests/connect4-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/connect4-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/connect4-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -113,7 +113,7 @@
70. * :((open() and not line__r() and not line__w()))
MOVES [noop_drop_c12 -> 0] }
}
-MODEL
+START
[cell_1_0__BLANK_, cell_1_1__BLANK_, cell_1_2__BLANK_, cell_1_3__BLANK_,
cell_1_4__BLANK_, cell_1_5__BLANK_, cell_1_6__BLANK_, cell_2_0__BLANK_,
cell_2_1__BLANK_, cell_2_2__BLANK_, cell_2_3__BLANK_, cell_2_4__BLANK_,
Modified: trunk/Toss/GGP/tests/connect5-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/connect5-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/connect5-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -377,7 +377,7 @@
50. * :((not exists_line_of_five() and true))
MOVES [noop_mark_x6_y6 -> 0] }
}
-MODEL
+START
[cell_a_a__BLANK_, cell_a_b__BLANK_, cell_a_c__BLANK_, cell_a_d__BLANK_,
cell_a_e__BLANK_, cell_a_f__BLANK_, cell_a_g__BLANK_, cell_a_h__BLANK_,
cell_b_a__BLANK_, cell_b_b__BLANK_, cell_b_c__BLANK_, cell_b_d__BLANK_,
Modified: trunk/Toss/GGP/tests/connect5-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/connect5-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/connect5-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -112,7 +112,7 @@
PLAYER o { PAYOFF 100. * :(conn5__o()) + 50. * :(not exists_line_of_five())
MOVES [noop_mark_x6_y6 -> 0] }
}
-MODEL
+START
[cell_a_a__BLANK_, cell_a_b__BLANK_, cell_a_c__BLANK_, cell_a_d__BLANK_,
cell_a_e__BLANK_, cell_a_f__BLANK_, cell_a_g__BLANK_, cell_a_h__BLANK_,
cell_b_a__BLANK_, cell_b_b__BLANK_, cell_b_c__BLANK_, cell_b_d__BLANK_,
Modified: trunk/Toss/GGP/tests/pacman3p-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/pacman3p-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/pacman3p-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -522,7 +522,7 @@
move_west1 -> 0]; [move_nowhere1 -> 0]
}
}
-MODEL
+START
[location__BLANK__1_1, location__BLANK__1_2, location__BLANK__1_3,
location__BLANK__1_4, location__BLANK__1_5, location__BLANK__1_6,
location__BLANK__1_7, location__BLANK__1_8, location__BLANK__2_1,
Modified: trunk/Toss/GGP/tests/pacman3p-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/pacman3p-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/pacman3p-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -393,7 +393,7 @@
move_west1 -> 0]; [move_nowhere1 -> 0]
}
}
-MODEL
+START
[location__BLANK__1_1, location__BLANK__1_2, location__BLANK__1_3,
location__BLANK__1_4, location__BLANK__1_5, location__BLANK__1_6,
location__BLANK__1_7, location__BLANK__1_8, location__BLANK__2_1,
Modified: trunk/Toss/GGP/tests/pawn_whopping-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/pawn_whopping-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/pawn_whopping-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -183,7 +183,7 @@
noop_move_pv12_pv13_pv14_pv15 -> 0]
}
}
-MODEL
+START
[cell_1_1__BLANK_, cell_1_2__BLANK_, cell_1_3__BLANK_, cell_1_4__BLANK_,
cell_1_5__BLANK_, cell_1_6__BLANK_, cell_1_7__BLANK_, cell_1_8__BLANK_,
cell_2_1__BLANK_, cell_2_2__BLANK_, cell_2_3__BLANK_, cell_2_4__BLANK_,
Modified: trunk/Toss/GGP/tests/pawn_whopping-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/pawn_whopping-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/pawn_whopping-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -124,7 +124,7 @@
noop_move_pv12_pv13_pv14_pv15 -> 0]
}
}
-MODEL
+START
[cell_1_1__BLANK_, cell_1_2__BLANK_, cell_1_3__BLANK_, cell_1_4__BLANK_,
cell_1_5__BLANK_, cell_1_6__BLANK_, cell_1_7__BLANK_, cell_1_8__BLANK_,
cell_2_1__BLANK_, cell_2_2__BLANK_, cell_2_3__BLANK_, cell_2_4__BLANK_,
Modified: trunk/Toss/GGP/tests/tictactoe-other-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/tictactoe-other-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/tictactoe-other-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -154,7 +154,7 @@
:((not LINE__XPLAYER() and not LINE__OPLAYER() and not OPEN() and true))
MOVES [nOOP_mARK_X10_Y10 -> 0] }
}
-MODEL
+START
[cELL_1_1__BLANK_, cELL_1_2__BLANK_, cELL_1_3__BLANK_, cELL_2_1__BLANK_,
cELL_2_2__BLANK_, cELL_2_3__BLANK_, cELL_3_1__BLANK_, cELL_3_2__BLANK_,
cELL_3_3__BLANK_, val__B, val__OPLAYER, val__XPLAYER, cONTROL__BLANK_ |
Modified: trunk/Toss/GGP/tests/tictactoe-other-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/tictactoe-other-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/tictactoe-other-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -99,7 +99,7 @@
50. * :((not LINE__OPLAYER() and not LINE__XPLAYER() and not OPEN()))
MOVES [nOOP_mARK_X10_Y10 -> 0] }
}
-MODEL
+START
[cELL_1_1__BLANK_, cELL_1_2__BLANK_, cELL_1_3__BLANK_, cELL_2_1__BLANK_,
cELL_2_2__BLANK_, cELL_2_3__BLANK_, cELL_3_1__BLANK_, cELL_3_2__BLANK_,
cELL_3_3__BLANK_, val__B, val__OPLAYER, val__XPLAYER, cONTROL__BLANK_ |
Modified: trunk/Toss/GGP/tests/tictactoe-raw.toss
===================================================================
--- trunk/Toss/GGP/tests/tictactoe-raw.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/tictactoe-raw.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -175,7 +175,7 @@
50. * :((not line__x() and not line__o() and not open() and true))
MOVES [noop_mark_x7_y0 -> 0] }
}
-MODEL
+START
[cell_1_1__BLANK_, cell_1_2__BLANK_, cell_1_3__BLANK_, cell_2_1__BLANK_,
cell_2_2__BLANK_, cell_2_3__BLANK_, cell_3_1__BLANK_, cell_3_2__BLANK_,
cell_3_3__BLANK_, val__b, val__o, val__oplayer, val__x, val__xplayer,
Modified: trunk/Toss/GGP/tests/tictactoe-simpl.toss
===================================================================
--- trunk/Toss/GGP/tests/tictactoe-simpl.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/GGP/tests/tictactoe-simpl.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -92,7 +92,7 @@
50. * :((not line__o() and not line__x() and not open()))
MOVES [noop_mark_x7_y0 -> 0] }
}
-MODEL
+START
[cell_1_1__BLANK_, cell_1_2__BLANK_, cell_1_3__BLANK_, cell_2_1__BLANK_,
cell_2_2__BLANK_, cell_2_3__BLANK_, cell_3_1__BLANK_, cell_3_2__BLANK_,
cell_3_3__BLANK_, val__b, val__o, val__oplayer, val__x, val__xplayer,
Modified: trunk/Toss/Learn/LearnGame.ml
===================================================================
--- trunk/Toss/Learn/LearnGame.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Learn/LearnGame.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -148,4 +148,4 @@
PLAYER 2 { PAYOFF :(Win2()) - :(Win1())
MOVES [" ^ (mvlst "Mv2r" " -> 0" moves1) ^ "]}
}" ^ "\n" ^
- "MODEL "^(Structure.str (List.hd longest))
+ "START "^(Structure.str (List.hd longest))
Modified: trunk/Toss/Learn/LearnGameTest.ml
===================================================================
--- trunk/Toss/Learn/LearnGameTest.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Learn/LearnGameTest.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -5,7 +5,7 @@
let struc_of_string ?(diag=false) s =
if diag then
- let s = "MODEL " ^ s ^ " with Da (x, y) = ex u (R(x, u) and C(u, y));" ^
+ let s = "START " ^ s ^ " with Da (x, y) = ex u (R(x, u) and C(u, y));" ^
" Db (x, y) = ex u (C(x, u) and R(y, u))" in
match ArenaParser.parse_game_defs Lexer.lex (Lexing.from_string s) with
| Arena.StateStruc struc -> struc
@@ -70,7 +70,7 @@
PLAYER 2 { PAYOFF :(Win2()) - :(Win1())
MOVES [Mv2r0 -> 0]}
}
-MODEL [ | P:1 {}; Q:1 {} | ] R R \"
+START [ | P:1 {}; Q:1 {} | ] R R \"
. .
\"" in
Modified: trunk/Toss/Makefile
===================================================================
--- trunk/Toss/Makefile 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Makefile 2012-03-11 00:30:10 UTC (rev 1689)
@@ -48,6 +48,7 @@
@echo " CONDITIONAL COMPILATION USES"
@grep IFDEF $(ALLMLFILES)
@echo ""
+ @grep MODEL $(ALLMLFILES)
# ------ NON OCAMLBUILD DEPENDENCIES --------
@@ -114,7 +115,6 @@
FormulaINCSatINC=MenhirLib,Formula
FormulaINC=MenhirLib,Formula,Formula/Sat,Formula/Sat/dpll
SolverINC=MenhirLib,Formula,Formula/Sat,Formula/Sat/dpll,Solver/RealQuantElim,Solver/Num
-SolverINCNumINC=MenhirLib,Formula,Formula/Sat,Formula/Sat/dpll,Solver/RealQuantElim,Solver/Num
SolverINCRealQuantElimINC=MenhirLib,Formula,Formula/Sat,Formula/Sat/dpll,Solver/RealQuantElim,Solver/Num
ArenaINC=MenhirLib,Formula,Formula/Sat,Formula/Sat/dpll,Solver/RealQuantElim,Solver/Num,Solver
PlayINC=MenhirLib,Formula,Formula/Sat,Formula/Sat/dpll,Solver/RealQuantElim,Solver/Num,Solver,Arena
@@ -159,9 +159,6 @@
_build/$<
gprof _build/$< > $@.log
-pi_5000: Solver/Num/pi_num.native
- time _build/Solver/Num/pi_num.native 5000
-
# Formula tests
FormulaTests: TossServer
OCAMLRUNPARAM=b; export OCAMLRUNPARAM; \
Modified: trunk/Toss/Play/Heuristic.ml
===================================================================
--- trunk/Toss/Play/Heuristic.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Play/Heuristic.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -257,7 +257,7 @@
{!Heuristic.default_heuristic_old}). *)
let force_competitive = ref false
(* TODO: not exporting these in the API as global variables? *)
-let default_nonmonot_adv_ratio = 2.0
+let default_nonmonot_adv_ratio = 3.0
let default_monot_adv_ratio = 5.0
let suggest_expansion_coef = 0.5
Modified: trunk/Toss/Play/PlayTest.ml
===================================================================
--- trunk/Toss/Play/PlayTest.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Play/PlayTest.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -1,5 +1,4 @@
open OUnit
-
open Play
let raw_state_of_file s =
@@ -20,12 +19,12 @@
(g, { Arena.struc = structure; time = time; cur_loc = loc; history = [] })
-let test_maximax ?(debug=0) ?(advr=4.) ?(struc="") ?(time=0.) ?(loc=0)
+let test_maximax ?(debug=0) ?advr ?(struc="") ?(time=0.) ?(loc=0)
~iters ~game ?(msg="") ?(nomove=false) cond =
let (g, s) = state_of_file ("./examples/"^game^".toss") ~struc ~time ~loc in
AuxIO.set_debug_level "GameTree" debug;
AuxIO.set_debug_level "Play" debug;
- let h = Heuristic.default_heuristic ~struc:s.Arena.struc ~advr g in
+ let h = Heuristic.default_heuristic ~struc:s.Arena.struc ?advr g in
let res_mvs = Play.maximax_unfold_choose iters g s h in
if res_mvs <> [] then
List.iter (fun (m, ns) ->
@@ -38,10 +37,10 @@
else
assert_bool "No Move: Test Failed!" false
-let test_algo algo ~game ~iters ?(advr=4.) ?(debug=0)
+let test_algo algo ~game ~iters ?advr ?(debug=0)
?(struc="") ?(time=0.) ?(loc=0) ?(nomove=false) ?(msg="") cond =
if algo = "Maximax" then
- test_maximax ~debug ~advr ~struc ~time ~loc ~iters ~game ~nomove ~msg cond
+ test_maximax ~debug ?advr ~struc ~time ~loc ~iters ~game ~nomove ~msg cond
else failwith "Unsupported play algorithm"
@@ -55,7 +54,7 @@
"maximax unfold once, node_info" >::
(fun () ->
let (g, s) = state_of_file "./examples/Tic-Tac-Toe.toss" in
- let h = Heuristic.default_heuristic ~struc:s.Arena.struc ~advr:4. g in
+ let h = Heuristic.default_heuristic ~struc:s.Arena.struc g in
let t = GameTree.init g s (fun _ _ _ -> 0) h in
let u = Play.unfold_maximax g h t in
assert_equal ~printer:(fun x -> string_of_int x) 1 (GameTree.node_info u);
@@ -64,7 +63,7 @@
"maximax unfold upto depth, size" >::
(fun () ->
let (g, s) = state_of_file "./examples/Tic-Tac-Toe.toss" in
- let h = Heuristic.default_heuristic ~struc:s.Arena.struc ~advr:4. g in
+ let h = Heuristic.default_heuristic ~struc:s.Arena.struc g in
let t = GameTree.init g s (fun _ _ _ -> 0) h in
let (u, _) = Play.unfold_maximax_upto 50 g h (t, []) in
assert_equal ~printer:(fun x -> string_of_int x) 250 (GameTree.size u);
@@ -78,12 +77,12 @@
let tictactoe_tests algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Tic-Tac-Toe" ~iters ~advr:5. in
+ test_algo algo ~game:"Tic-Tac-Toe" ~iters in
("Tic-Tac-Toe (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
- "basic defense" >::
+ "basic defense 1" >::
(fun () ->
- let struc = "MODEL [ | P:1 {}; Q:1 {} | ] \"
+ let struc = "START [ | P:1 {}; Q:1 {} | ] \"
. . .
@@ -94,9 +93,25 @@
test_do ~struc ~loc:1 (fun s -> s = "[Circle 0.1 -> 0 emb a: b3]")
);
+(* "basic defense 2" >::
+ (fun () ->
+ let struc = "START [ | P:1 {}; Q:1 {} | ] \"
+
+ . . Q
+
+ P P Q
+
+ . . .
+\"" in
+ for i = 1 to 1000 do
+ Random.self_init ();
+ test_do ~struc ~loc:0 (fun s -> s = "[Cross 0.1 -> 1 emb a: c1]")
+ done;
+ ); *)
+
"basic tie" >::
(fun () ->
- let struc = "MODEL [ | P:1 { }; Q:1 { } | ] \"
+ let struc = "START [ | P:1 { }; Q:1 { } | ] \"
Q P P
@@ -110,7 +125,7 @@
"suggest optimal single" >::
(fun () ->
- let struc = "MODEL [ | P:1 { }; Q:1 { } | ] \"
+ let struc = "START [ | P:1 { }; Q:1 { } | ] \"
. . .
@@ -124,7 +139,7 @@
"suggest optimal multi" >::
(fun () ->
- let struc = "MODEL [ | P:1 { }; Q:1 { } | ] \"
+ let struc = "START [ | P:1 { }; Q:1 { } | ] \"
. . .
@@ -141,7 +156,7 @@
"avoid endgame diagonal" >::
(fun () ->
- let struc = "MODEL [ | P:1 { }; Q:1 { } | ] \"
+ let struc = "START [ | P:1 { }; Q:1 { } | ] \"
Q . P
@@ -155,7 +170,7 @@
"avoid endgame straight" >::
(fun () ->
- let struc = "MODEL [ | P:1 { }; Q:1 { } | ] \"
+ let struc = "START [ | P:1 { }; Q:1 { } | ] \"
. P Q
@@ -169,7 +184,7 @@
"basic win" >::
(fun () ->
- let struc = "MODEL [ | P:1 { }; Q:1 { } | ] \"
+ let struc = "START [ | P:1 { }; Q:1 { } | ] \"
P . .
@@ -184,12 +199,11 @@
let breakthrough_tests algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Breakthrough" ~iters ~advr:2. in
+ test_algo algo ~game:"Breakthrough" ~iters in
("Breakthrough (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
-
"avoid endgame" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
B B..B B..B B..B B..
... ... ... ...
@@ -206,7 +220,7 @@
... W..W ...W W..
... ... ... ...
W..W ...W W..W W..W
-\"" in
+\"" (* with Diag (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y))) *) in
test_do ~struc ~loc:0 ~msg:"W shouldn't move from b1"
(fun mov_s ->
not (List.mem mov_s
@@ -217,7 +231,7 @@
"endgame attack" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
B B..B B..B B..B B..
... ... ... ...
@@ -234,13 +248,13 @@
W.. W..W ...W W..
... ... ... ...
W.. ...W W..W W..W
-\"" in
+\"" (* with Diag (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y))) *) in
test_do ~struc ~loc:1 ~msg:"B should attack left"
(fun mov_s -> "[BlackDiag 0.1 -> 0 emb a: b3, b: a2]" = mov_s));
"midgame capture" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
B..B B.. B..B ...
... ... ... ...
@@ -257,13 +271,13 @@
... ... ... ...
... ... ... ...
W..W ...W ...W W..W
-\"" in
- test_do ~struc ~loc:0 ~msg:"W should beat the lower B"
+\"" (* with Diag (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y))) *) in
+ test_do ~iters:(iters+1) ~struc ~loc:0 ~msg:"W should beat the lower B"
(fun mov_s -> "[WhiteDiag 0.1 -> 1 emb a: e3, b: f4]" = mov_s));
-
+
"too big adv_ratio" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
B B..B B..B B..B B..
... ... ... ...
@@ -280,7 +294,7 @@
W W.. W..W W.. W..
... ... ... ...
W..W W..W W..W W..W
-\"" in
+\"" (* with Diag (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y))) *) in
test_do ~struc ~loc:0 ~msg:"W should play cool"
(fun mov_s ->
mov_s <> "[WhiteDiag 0.1 -> 1 emb a: e4, b: f5]"
@@ -288,7 +302,7 @@
"preserve piece" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
B ...B ...B B..B B..
... ... ... ...
@@ -305,8 +319,8 @@
... ... W..W W..
... ... ... ...
W..W W..W W..W W..W
-\"" in
- test_do ~struc ~loc:0 ~msg:"W should not lose the piece"
+\"" (* with Diag (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y))) *) in
+ test_do ~struc ~iters:(10*iters) ~loc:0 ~msg:"W should not lose piece"
(fun mov_s ->
mov_s <> "[WhiteDiag 0.1 -> 1 emb a: d5, b: e6]"
&& mov_s <> "[WhiteDiag 0.1 -> 1 emb a: d5, b: c6]"
@@ -317,12 +331,12 @@
let gomoku8x8_tests algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Gomoku" ~iters ~advr:5. in
+ test_algo algo ~game:"Gomoku" ~iters in
("Gomoku8x8 (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
"simple attack" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
... ... ... ...
... ... ... ...
@@ -350,12 +364,12 @@
let connect4_tests algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Connect4" ~iters ~advr:5. ~debug:0 in
+ test_algo algo ~game:"Connect4" ~iters ~debug:0 in
("Connect4 (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
"simple attack" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
. . . . . . .
@@ -376,7 +390,7 @@
"avoid losing" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ...
... ... ...
... ... ... ...
@@ -397,7 +411,7 @@
(Printf.sprintf "endgame (%i iters)" (30*iters)) >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
. . . . . . .
@@ -420,7 +434,7 @@
let checkers_tests algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Checkers" ~iters ~advr:2. in
+ test_algo algo ~game:"Checkers" ~iters in
("Checkers (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
"any first move" >::
@@ -434,7 +448,7 @@
let tests = "Play" >::: [
basic_tests;
tictactoe_tests "Maximax" 4;
- breakthrough_tests "Maximax" 6;
+ breakthrough_tests "Maximax" 4;
gomoku8x8_tests "Maximax" 4;
connect4_tests "Maximax" 4;
checkers_tests "Maximax" 4;
@@ -447,12 +461,12 @@
let gomoku8x8_tests_big algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Gomoku" ~advr:5. ~iters in
+ test_algo algo ~game:"Gomoku" ~iters in
("Gomoku8x8 (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
"avoid endgame 1" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
... ... ... ...
... ... ... ...
@@ -477,7 +491,7 @@
"avoid endgame 2" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
... ... ... ...
... ... ... ...
@@ -503,7 +517,7 @@
"block gameover" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
... ... ... ...
... ... ... ...
@@ -529,7 +543,7 @@
"more pieces" >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
... ... ... ...
P ... ... ... ...
... ... ... ...
@@ -554,7 +568,7 @@
"defense 1" >::
(fun () ->
- let struc = "MODEL [ | P:1 {}; Q:1 {} | ] \"
+ let struc = "START [ | P:1 {}; Q:1 {} | ] \"
... ... ... ...
... ... ... ...
... ... ... ...
@@ -579,7 +593,7 @@
"defense 2" >::
(fun () ->
- let struc = "MODEL [ | P:1 {}; Q:1 {} | ] \"
+ let struc = "START [ | P:1 {}; Q:1 {} | ] \"
... ... ... ...
P.. ... ... ...
... ... ... ...
@@ -604,7 +618,7 @@
"stability under iterations (long)" >::
(fun () ->
- let struc = "MODEL [ | P:1 {}; Q:1 {} | ] \"
+ let struc = "START [ | P:1 {}; Q:1 {} | ] \"
... ... ... ...
... ... ... ...
... ... ... ...
@@ -632,7 +646,7 @@
let connect4_tests_big algo (i_from, i_to, i_step) =
- let test_do = test_algo algo ~game:"Connect4" ~advr:5. ~debug:0 in
+ let test_do = test_algo algo ~game:"Connect4" ~debug:0 in
let rec range f t s = if t < f then [] else f :: (range (f+s) t s) in
let create_tests test_create_f =
(Printf.sprintf "Connect4 (%s %i-%i by %i)" algo i_from i_to i_step) >:::
@@ -640,7 +654,7 @@
let make_test i =
[(Printf.sprintf "endgame (%i)" i) >::
(fun () ->
- let struc = "MODEL [ | | ] \"
+ let struc = "START [ | | ] \"
. . . . . . .
@@ -663,7 +677,7 @@
let chess_tests_big algo iters =
let test_do ?(iters=iters) =
- test_algo algo ~game:"Chess" ~advr:2. ~iters in
+ test_algo algo ~game:"Chess" ~iters in
("Chess (" ^ algo ^ " " ^ (string_of_int iters) ^ ")") >::: [
"random first move" >::
@@ -679,7 +693,7 @@
"detect draw" >::
(fun () ->
let struc =
- "MODEL [ | bB:1 {}; wB:1 {}; wN:1 {}; wP:1 {}; wQ:1 {}; wR:1 {} | ] \"
+ "START [ | bB:1 {}; wB:1 {}; wN:1 {}; wP:1 {}; wQ:1 {}; wR:1 {} | ] \"
... ... ... ...
... ... +bN ...
... ... ... ...
@@ -705,7 +719,7 @@
let bigtests = "PlayBig" >::: [
- connect4_tests_big "Maximax" (100, 300, 10);
+ connect4_tests_big "Maximax" (150, 300, 10);
gomoku8x8_tests_big "Maximax" 6;
chess_tests_big "Maximax" 1;
]
Modified: trunk/Toss/Server/Server.ml
===================================================================
--- trunk/Toss/Server/Server.ml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/Server/Server.ml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -139,7 +139,7 @@
("<html>\n<head><title>Toss: Page Not Found</title></head>\n" ^
"<body><p>Not found: " ^ fname_in ^ "</p></body>\n</html>")
-let handle_http_post cmd head msg ck =
+let handle_http_post msg =
let split_msg = Aux.split_charprop (fun c -> c = '#') msg in
LOG 1 "move suggest request";
LOG 2 "%s" (String.concat "\n\n" split_msg);
@@ -169,16 +169,14 @@
if String.sub cmd 0 5 = "GET /" then
Aux.Left (rstate, handle_http_get cmd head msg ck)
else if String.length cmd > 13 && String.sub cmd 0 13 = "POST /Handler" then
- (* if http_post_ok_concurrent msg then *)
- Aux.Right (rstate, fun () -> handle_http_post cmd head msg ck)
- (* else Aux.Left (rstate, handle_http_post cmd head msg ck) *)
+ Aux.Right (rstate, fun () -> handle_http_post msg)
else try Aux.Left (req_handle rstate
(GDLParser.parse_request KIFLexer.lex
(Lexing.from_string msg)))
with Parsing.Parse_error | Lexer.Parsing_error _ |
Failure "lexing: empty token" ->
print_endline (head ^ "\n" ^ cmd);
- Aux.Right (rstate, fun () -> handle_http_post cmd head msg ck)
+ Aux.Right (rstate, fun () -> handle_http_post msg)
(* ------- Full Request Handler (both Html and Generic Toss) ------- *)
@@ -391,8 +389,8 @@
("-d", Arg.Int (fun i -> set_debug_level i), "Toss server debug log level");
("-s", Arg.String (fun s -> (server := s)), " server (default: localhost)");
("-p", Arg.Int (fun i -> (port := i)), " port number (default: 8110)");
- ("-eof", Arg.Unit (fun () -> quit_on_eof := false),
- "do not quit server on end of file of requests");
+ (* ("-eof", Arg.Unit (fun () -> quit_on_eof := false),
+ "do not quit server on end of file of requests"); *)
("-f", Arg.String (fun s -> set_state_from_file s), " open file");
("-test", Arg.String (fun s -> test_s := s), "unit tests for given path");
("-fulltest", Arg.String (fun s -> test_s := s; test_full := true),
Modified: trunk/Toss/examples/Breakthrough.toss
===================================================================
--- trunk/Toss/examples/Breakthrough.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Breakthrough.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -1,67 +1,56 @@
PLAYERS 1, 2
-REL DiagW (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y)))
-REL DiagB (x, y) = ex z (C(z, x) and (R(y, z) or R(z, y)))
+REL WinW () = ex x (W(x) and not ex y C(x, y))
+REL WinB () = ex x (B(x) and not ex y C(y, x))
+REL Diag (x, y) = ex z (C(x, z) and (R(y, z) or R(z, y)))
RULE WhiteDiag:
- [ a, b | W { a }; _opt_B { b } | - ]
- ->
- [ a, b | W { b } | - ]
- emb W, B pre DiagW(a, b) and not ex x (B(x) and not ex y C(y, x))
+ [ a, b | W { a }; _opt_B { b } | - ] -> [ a, b | W { b } | - ] emb W, B
+ pre Diag (a, b) and not WinB ()
RULE WhiteStraight:
[ | B:1 {}; R:2 {} | ] "
.
W
-" -> [ | B:1 {}; R:2 {} |
- ] "
+" -> [ | B:1 {}; R:2 {} | ] "
W
.
-" emb W, B pre not ex x (B(x) and not ex y C(y, x))
+" emb W, B pre not WinB ()
RULE BlackDiag:
- [ a, b | B { a }; _opt_W { b } | - ]
- ->
- [ a, b | B { b } | - ]
- emb W, B pre DiagB(a, b) and not ex x (W(x) and not ex y C(x, y))
+ [ a, b | B { a }; _opt_W { b } | - ] -> [ a, b | B { b } | - ] emb W, B
+ pre Diag (b, a) and not WinW ()
RULE BlackStraight:
[ | R:2 {}; W:1 {} | ] "
B
.
-" -> [ | R:2 {}; W:1 {} |
- ] "
+" -> [ | R:2 {}; W:1 {} | ] "
.
B
-" emb W, B pre not ex x (W(x) and not ex y C(x, y))
+" emb W, B pre not WinW()
LOC 0 {
- PLAYER 1 {
- PAYOFF
- :(ex x (W(x) and not ex y C(x, y))) - :(ex x (B(x) and not ex y C(y, x)))
- MOVES
- [WhiteDiag -> 1]; [WhiteStraight -> 1]
+ PLAYER 1 {
+ PAYOFF :(WinW ()) - :(WinB ())
+ MOVES [WhiteDiag -> 1]; [WhiteStraight -> 1]
}
PLAYER 2 {
- PAYOFF
- :(ex x (B(x) and not ex y C(y, x))) - :(ex x (W(x) and not ex y C(x, y)))
+ PAYOFF :(WinB ()) - :(WinW ())
}
}
LOC 1 {
PLAYER 1 {
- PAYOFF
- :(ex x (W(x) and not ex y C(x, y))) - :(ex x (B(x) and not ex y C(y, x)))
+ PAYOFF :(WinW ()) - :(WinB ())
}
PLAYER 2 {
- PAYOFF
- :(ex x (B(x) and not ex y C(y, x))) - :(ex x (W(x) and not ex y C(x, y)))
- MOVES
- [BlackDiag -> 0]; [BlackStraight -> 0]
+ PAYOFF :(WinB ()) - :(WinW ())
+ MOVES [BlackDiag -> 0]; [BlackStraight -> 0]
}
}
-MODEL [ | | ] "
+START [ | | ] "
... ... ... ...
B B..B B..B B..B B..
... ... ... ...
Modified: trunk/Toss/examples/Checkers.toss
===================================================================
--- trunk/Toss/examples/Checkers.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Checkers.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -115,8 +115,7 @@
[WhiteBeatBoth -> 0]; [WhiteBeatPromote -> 0]; [WhiteBeatBothCont -> 3]
}
}
-MODEL [ | Wq:1 { }; Bq:1 { } |
- ] "
+START [ | Wq:1 { }; Bq:1 { } | ] "
... ... ... ...
B.. B.. B.. B..
... ... ... ...
Modified: trunk/Toss/examples/Chess.toss
===================================================================
--- trunk/Toss/examples/Chess.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Chess.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -373,7 +373,7 @@
PAYOFF :(CheckB()) - :(CheckW())
}
}
-MODEL [ | | ] "
+START [ | | ] "
... ... ... ...
bR bN.bB bQ.bK bB.bN bR.
... ... ... ...
Modified: trunk/Toss/examples/Concurrent-Tic-Tac-Toe.toss
===================================================================
--- trunk/Toss/examples/Concurrent-Tic-Tac-Toe.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Concurrent-Tic-Tac-Toe.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -19,7 +19,7 @@
PLAYER 2 { PAYOFF :(WinQ()) - :(WinP())
MOVES [Circle -> 0] }
}
-MODEL [ | P:1 {}; Q:1 {} | ] "
+START [ | P:1 {}; Q:1 {} | ] "
. . .
Modified: trunk/Toss/examples/Connect4.toss
===================================================================
--- trunk/Toss/examples/Connect4.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Connect4.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -34,7 +34,7 @@
MOVES [Circle -> 0]
}
}
-MODEL [ | P:1 {}; Q:1 {} | ] "
+START [ | P:1 {}; Q:1 {} | ] "
... ... ...
... ... ...
... ... ... ...
Modified: trunk/Toss/examples/Entanglement.toss
===================================================================
--- trunk/Toss/examples/Entanglement.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Entanglement.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -38,4 +38,4 @@
MOVES [Run -> 0]
}
}
-MODEL [ d4, a2, a1, b1, b2, e4, c2, c1, f4, d2, d1, f1, f2, g1, g2, h1, h2, e1, e2, i1, i2 | C { (d4); (e4); (f4) }; E { (a2, a1); (a2, b2); (a1, a2); (a1, b1); (b1, a1); (b1, b2); (b1, c1); (b2, a2); (b2, b1); (b2, c2); (c2, b2); (c2, c1); (c2, d2); (c1, b1); (c1, c2); (c1, d1); (d2, c2); (d2, d1); (d2, e1); (d1, c1); (d1, d2); (d1, e2); (f1, f2); (f1, g1); (f1, e1); (f2, f1); (f2, g2); (f2, e2); (g1, f1); (g1, g2); (g1, h1); (g2, f2); (g2, g1); (g2, h2); (h1, g1); (h1, h2); (h1, i1); (h2, g2); (h2, h1); (h2, i2); (e1, d2); (e1, f1); (e1, e2); (e2, d1); (e2, f2); (e2, e1); (i1, h1); (i1, i2); (i2, h2); (i2, i1) }; R { (e1) }; _opt_C:1 { } | vx { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; vy { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; x { d4->100., a2->-50., a1->-50., b1->0., b2->0., e4->150., c2->50., c1->50., f4->200., d2->100., d1->100., f1->200., f2->200., g1->250., g2->250., h1->300., h2->300., e1->150., e2->150., i1->350., i2->350. }; y { d4->-150., a2->-100., a1->-50., b1->-50., b2->-100., e4->0., c2->-100., c1->-50., f4->-150., d2->-100., d1->-50., f1->-100., f2->-50., g1->-100., g2->-50., h1->-100., h2->-50., e1->-100., e2->-50., i1->-100., i2->-50. } ]
+START [ d4, a2, a1, b1, b2, e4, c2, c1, f4, d2, d1, f1, f2, g1, g2, h1, h2, e1, e2, i1, i2 | C { (d4); (e4); (f4) }; E { (a2, a1); (a2, b2); (a1, a2); (a1, b1); (b1, a1); (b1, b2); (b1, c1); (b2, a2); (b2, b1); (b2, c2); (c2, b2); (c2, c1); (c2, d2); (c1, b1); (c1, c2); (c1, d1); (d2, c2); (d2, d1); (d2, e1); (d1, c1); (d1, d2); (d1, e2); (f1, f2); (f1, g1); (f1, e1); (f2, f1); (f2, g2); (f2, e2); (g1, f1); (g1, g2); (g1, h1); (g2, f2); (g2, g1); (g2, h2); (h1, g1); (h1, h2); (h1, i1); (h2, g2); (h2, h1); (h2, i2); (e1, d2); (e1, f1); (e1, e2); (e2, d1); (e2, f2); (e2, e1); (i1, h1); (i1, i2); (i2, h2); (i2, i1) }; R { (e1) }; _opt_C:1 { } | vx { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; vy { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; x { d4->100., a2->-50., a1->-50., b1->0., b2->0., e4->150., c2->50., c1->50., f4->200., d2->100., d1->100., f1->200., f2->200., g1->250., g2->250., h1->300., h2->300., e1->150., e2->150., i1->350., i2->350. }; y { d4->-150., a2->-100., a1->-50., b1->-50., b2->-100., e4->0., c2->-100., c1->-50., f4->-150., d2->-100., d1->-50., f1->-100., f2->-50., g1->-100., g2->-50., h1->-100., h2->-50., e1->-100., e2->-50., i1->-100., i2->-50. } ]
Modified: trunk/Toss/examples/Gomoku.toss
===================================================================
--- trunk/Toss/examples/Gomoku.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Gomoku.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -35,7 +35,7 @@
MOVES [Circle -> 0]
}
}
-MODEL [ | P:1 {}; Q:1 {} | ] "
+START [ | P:1 {}; Q:1 {} | ] "
... ... ... ...
... ... ... ...
... ... ... ...
Modified: trunk/Toss/examples/Gomoku19x19.toss
===================================================================
--- trunk/Toss/examples/Gomoku19x19.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Gomoku19x19.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -35,7 +35,7 @@
MOVES [Circle -> 0]
}
}
-MODEL [ | P:1 {}; Q:1 {} | ] "
+START [ | P:1 {}; Q:1 {} | ] "
.......................................................
. . . . . . . . . . . . . . . . . . .
Modified: trunk/Toss/examples/PacMan.toss
===================================================================
--- trunk/Toss/examples/PacMan.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/PacMan.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -42,4 +42,4 @@
PLAYER 2 { PAYOFF 1. }
PLAYER 3 { PAYOFF 1. }
}
-MODEL [ a1, a2, b1, b2, c1, c2, d1, d2, f1, f2, g1, g2, h1, h2, e1, e2, i1, i2 | C { (a1) }; C2 { (a2) }; E { (a2, a1); (a2, b2); (a1, a2); (a1, b1); (b1, a1); (b1, b2); (b1, c1); (b2, a2); (b2, b1); (b2, c2); (c2, b2); (c2, c1); (c2, d2); (c1, b1); (c1, c2); (c1, d1); (d2, c2); (d2, d1); (d2, e1); (d1, c1); (d1, d2); (d1, e2); (f1, f2); (f1, g1); (f1, e1); (f2, f1); (f2, g2); (f2, e2); (g1, f1); (g1, g2); (g1, h1); (g2, f2); (g2, g1); (g2, h2); (h1, g1); (h1, h2); (h1, i1); (h2, g2); (h2, h1); (h2, i2); (e1, d2); (e1, f1); (e1, e2); (e2, d1); (e2, f2); (e2, e1); (i1, h1); (i1, i2); (i2, h2); (i2, i1) }; R { (e1) }; _opt_C:1 { } | vx { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; vy { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; x { d4->100., a2->-50., a1->-50., b1->0., b2->0., e4->150., c2->50., c1->50., f4->200., d2->100., d1->100., f1->200., f2->200., g1->250., g2->250., h1->300., h2->300., e1->150., e2->150., i1->350., i2->350. }; y { d4->-150., a2->-100., a1->-50., b1->-50., b2->-100., e4->0., c2->-100., c1->-50., f4->-150., d2->-100., d1->-50., f1->-100., f2->-50., g1->-100., g2->-50., h1->-100., h2->-50., e1->-100., e2->-50., i1->-100., i2->-50. } ]
+START [ a1, a2, b1, b2, c1, c2, d1, d2, f1, f2, g1, g2, h1, h2, e1, e2, i1, i2 | C { (a1) }; C2 { (a2) }; E { (a2, a1); (a2, b2); (a1, a2); (a1, b1); (b1, a1); (b1, b2); (b1, c1); (b2, a2); (b2, b1); (b2, c2); (c2, b2); (c2, c1); (c2, d2); (c1, b1); (c1, c2); (c1, d1); (d2, c2); (d2, d1); (d2, e1); (d1, c1); (d1, d2); (d1, e2); (f1, f2); (f1, g1); (f1, e1); (f2, f1); (f2, g2); (f2, e2); (g1, f1); (g1, g2); (g1, h1); (g2, f2); (g2, g1); (g2, h2); (h1, g1); (h1, h2); (h1, i1); (h2, g2); (h2, h1); (h2, i2); (e1, d2); (e1, f1); (e1, e2); (e2, d1); (e2, f2); (e2, e1); (i1, h1); (i1, i2); (i2, h2); (i2, i1) }; R { (e1) }; _opt_C:1 { } | vx { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; vy { d4->0., a2->0., a1->0., b1->0., b2->0., e4->0., c2->0., c1->0., f4->0., d2->0., d1->0., f1->0., f2->0., g1->0., g2->0., h1->0., h2->0., e1->0., e2->0., i1->0., i2->0. }; x { d4->100., a2->-50., a1->-50., b1->0., b2->0., e4->150., c2->50., c1->50., f4->200., d2->100., d1->100., f1->200., f2->200., g1->250., g2->250., h1->300., h2->300., e1->150., e2->150., i1->350., i2->350. }; y { d4->-150., a2->-100., a1->-50., b1->-50., b2->-100., e4->0., c2->-100., c1->-50., f4->-150., d2->-100., d1->-50., f1->-100., f2->-50., g1->-100., g2->-50., h1->-100., h2->-50., e1->-100., e2->-50., i1->-100., i2->-50. } ]
Modified: trunk/Toss/examples/Pawn-Whopping.toss
===================================================================
--- trunk/Toss/examples/Pawn-Whopping.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Pawn-Whopping.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -151,7 +151,7 @@
[BlackRightPassant -> 0]; [BlackLeftPassant -> 0]
}
}
-MODEL [ | | ] "
+START [ | | ] "
... ... ... ...
... ... ... ...
... ... ... ...
Modified: trunk/Toss/examples/Tic-Tac-Toe.toss
===================================================================
--- trunk/Toss/examples/Tic-Tac-Toe.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/Tic-Tac-Toe.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -23,7 +23,7 @@
PLAYER 2 { PAYOFF :(WinQ()) - :(WinP())
MOVES [Circle -> 0] }
}
-MODEL [ | P:1 {}; Q:1 {} | ] "
+START [ | P:1 {}; Q:1 {} | ] "
. . .
Modified: trunk/Toss/examples/bounce.toss
===================================================================
--- trunk/Toss/examples/bounce.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/bounce.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -21,6 +21,6 @@
PLAYER 1 { PAYOFF 0. MOVES [Move, t: 3. -- 3. -> 0] }
PLAYER 2 { PAYOFF 0. }
}
-MODEL [ 1, 2, 3 | G { (2, 3); (3, 2) } |
+START [ 1, 2, 3 | G { (2, 3); (3, 2) } |
vx { 1->0., 2->0., 3->0. }; vy { 1->27., 2->0., 3->0. };
x { 1->-140., 2->-160., 3->-120. }; y { 1->-40.2673662018, 2->3.5, 3->3.5 } ]
Modified: trunk/Toss/examples/rewriting_example.toss
===================================================================
--- trunk/Toss/examples/rewriting_example.toss 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/examples/rewriting_example.toss 2012-03-11 00:30:10 UTC (rev 1689)
@@ -39,7 +39,7 @@
PLAYER 1 { PAYOFF 0. MOVES [Rewrite, t: 1. -- 1. -> 0] }
PLAYER 2 { PAYOFF 0. }
}
-MODEL
+START
[1, 2, 3, 4, 5, 6, 7, 9, 10, 11 |
R (1, 2);
S {(1, 4); (1, 11); (2, 6); (2, 10); (3, 1); (5, 2); (7, 1); (9, 2)}
Modified: trunk/Toss/www/contact.xml
===================================================================
--- trunk/Toss/www/contact.xml 2012-03-09 22:49:49 UTC (rev 1688)
+++ trunk/Toss/www/contact.xml 2012-03-11 00:30:10 UTC (rev 1689)
@@ -280,6 +280,7 @@
<itemize>
<item>Łukasz Kaiser (<mailto address="luk...@gm..."/>)</item>
<item>Łukasz Stafiniak</item>
+ <item>Michał Wójcik</item>
</itemize>
<par>Friends who helped us a lot with discussion and code.</par>
<itemize>
@@ -288,7 +289,6 @@
<item>Diana Fischer</item>
...
[truncated message content] |