[Toss-devel-svn] SF.net SVN: toss:[1663] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
From: <luk...@us...> - 2012-02-05 01:24:15
|
Revision: 1663 http://toss.svn.sourceforge.net/toss/?rev=1663&view=rev Author: lukaszkaiser Date: 2012-02-05 01:24:07 +0000 (Sun, 05 Feb 2012) Log Message: ----------- Pre-release preparations and bugfixes. Modified Paths: -------------- trunk/Toss/Arena/Arena.ml trunk/Toss/Arena/Arena.mli trunk/Toss/Play/Play.ml trunk/Toss/Server/DB.ml trunk/Toss/Server/DB.mli trunk/Toss/Server/ReqHandler.ml trunk/Toss/Server/Server.ml trunk/Toss/Solver/Assignments.ml trunk/Toss/Solver/Solver.ml trunk/Toss/WebClient/Login.js trunk/Toss/WebClient/Main.js trunk/Toss/WebClient/Style.css trunk/Toss/WebClient/index.html trunk/Toss/WebClient/profile.html trunk/Toss/www/create.xml trunk/Toss/www/develop.xml trunk/Toss/www/docs.xml trunk/Toss/www/examples.xml trunk/Toss/www/img/Breakthrough.png trunk/Toss/www/img/Checkers.png trunk/Toss/www/img/Connect4.png trunk/Toss/www/img/Gomoku.png trunk/Toss/www/img/Pawn-Whopping.png trunk/Toss/www/img/Tic-Tac-Toe.png trunk/Toss/www/index.xml trunk/Toss/www/navigation.xml Removed Paths: ------------- trunk/Toss/www/gui_interface.xml Modified: trunk/Toss/Arena/Arena.ml =================================================================== --- trunk/Toss/Arena/Arena.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Arena/Arena.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -59,8 +59,6 @@ history : (move * float option) list ; } - - let zero_loc = { payoff = Formula.Const 0. ; view = (Formula.And [], []); heur = []; @@ -81,8 +79,14 @@ cur_loc = 0 ; history = [] ; } - +let equal_state gs1 gs2 = + if gs1 == gs2 then true else + if gs1.time <> gs2.time || gs1.cur_loc <> gs2.cur_loc || + gs1.history <> gs2.history then false else + Structure.equal gs1.struc gs2.struc + + (* -------------------- PARSER HELPER ------------------------------ *) let matching_of_names (game, state) rname match_str = Modified: trunk/Toss/Arena/Arena.mli =================================================================== --- trunk/Toss/Arena/Arena.mli 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Arena/Arena.mli 2012-02-05 01:24:07 UTC (rev 1663) @@ -55,6 +55,7 @@ } val empty_state : game * game_state +val equal_state : game_state -> game_state -> bool (** Make a move in a game. *) val make_move : move -> game * game_state -> game * game_state Modified: trunk/Toss/Play/Play.ml =================================================================== --- trunk/Toss/Play/Play.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Play/Play.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -69,6 +69,11 @@ (Aux.gettimeofday() -. !timeout) msg; (t, mvs) +let equal_moves m1 m2 = + if m1 == m2 then true else + let (mv1, gs1), (mv2, gs2) = m1, m2 in + if mv1 <> mv2 then false else Arena.equal_state gs1 gs2 + (* Maximax unfold upto depth and choose move. *) let maximax_unfold_choose ?(check_stable=3) count game state heur = let ab = Heuristic.is_constant_sum heur in (* TODO: payoffs as well! *) @@ -87,7 +92,7 @@ let rec ord_sub = function | ([], _) -> true | (x :: xs, []) -> false - | (x :: xs, y :: ys) when x = y -> ord_sub (xs, ys) + | (x :: xs, y :: ys) when equal_moves x y -> ord_sub (xs, ys) | (x :: xs, y :: ys) -> ord_sub (x :: xs, ys) in let nbr mv = List.length (List.filter (fun m -> ord_sub (mv,m)) last_mvs) in let mvs_votes = List.map (fun m -> (m, nbr m)) last_mvs in Modified: trunk/Toss/Server/DB.ml =================================================================== --- trunk/Toss/Server/DB.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Server/DB.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -113,8 +113,9 @@ let get_table dbfile ?(select="") tbl = fst (apply_cmd dbfile select ("select * from " ^ tbl)) -let count_table dbfile ?(select="") tbl = - let (rows, _) = apply_cmd dbfile select ("select count(*) from " ^ tbl) in +let max_in_table ~field dbfile ?(select="") tbl = + let (rows, _) = + apply_cmd dbfile select ("select max(" ^ field ^ ") from " ^ tbl) in int_of_string (List.hd rows).(0) let insert_table dbfile tbl schm vals = Modified: trunk/Toss/Server/DB.mli =================================================================== --- trunk/Toss/Server/DB.mli 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Server/DB.mli 2012-02-05 01:24:07 UTC (rev 1663) @@ -15,7 +15,7 @@ val get_table : string -> ?select : string -> string -> string array list -val count_table : string -> ?select : string -> string -> int +val max_in_table : field:string -> string -> ?select : string -> string -> int val insert_table : string -> string -> string -> string list -> unit Modified: trunk/Toss/Server/ReqHandler.ml =================================================================== --- trunk/Toss/Server/ReqHandler.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Server/ReqHandler.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -503,7 +503,7 @@ let app_plays plays g = plays ^ "@" ^ (list_plays g uid) in let plays = List.fold_left app_plays "" !DB.tGAMES in uid ^ "@" ^ name ^ plays in - let get_free_id () = (DB.count_table dbFILE "cur_states") + 1 in + let get_free_id() = (DB.max_in_table ~field:"playid" dbFILE "cur_states")+1 in let db_cur_insert game p1 p2 pid move toss loc info svg_str = DB.insert_table dbFILE "cur_states" "playid, game, player1, player2, move, toss, loc, info, svg" Modified: trunk/Toss/Server/Server.ml =================================================================== --- trunk/Toss/Server/Server.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Server/Server.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -26,7 +26,8 @@ let rec accept_sock n s = if n < 1 then failwith "Accept Sock Failed" else - try Unix.accept s with _ -> accept_sock (n-1) s + try Unix.accept s with _ -> + if n mod 3 = 0 then Unix.sleep 1; accept_sock (n-1) s let start_server f port addr_s = (* Unix.establish_server f (Unix.ADDR_INET (get_inet_addr (addr_s), port)) @@ -39,7 +40,7 @@ Unix.listen sock 9; (* maximally 9 pending requests *) let continue = ref true in while !continue do - let (cl_sock, _) = accept_sock 99 sock in + let (cl_sock, _) = accept_sock 98 sock in continue := f (Unix.in_channel_of_descr cl_sock) (Unix.out_channel_of_descr cl_sock); Unix.close cl_sock; Modified: trunk/Toss/Solver/Assignments.ml =================================================================== --- trunk/Toss/Solver/Assignments.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Solver/Assignments.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -380,7 +380,7 @@ and complement_map_rev elems acc = function | ([], []) -> acc - | ([], _) -> failwith "more assigned elements as elements at all" + | ([], _) -> failwith "more assigned elements than elements at all" | (e::es, []) -> complement_map_rev elems ((e, Any)::acc) (es, []) | (e1 :: es, (e2, a) :: ms) -> match compare_elems e1 e2 with @@ -426,9 +426,9 @@ | (Empty, _) | (_, Any) -> Empty | (Any, a) -> complement elems a | (a, Empty) -> a - | (FO (v1, map1), FO (v2, map2)) when v1 = v2 -> + | (FO (`FO v1, map1), FO (`FO v2, map2)) when String.compare v1 v2 = 0 -> let resm = List.rev (complement_join_map_rev elems [] (map1, map2)) in - if resm = [] then Empty else FO (v1, resm) + if resm = [] then Empty else FO (`FO v1, resm) | (FO _, FO _) -> join aset (complement elems a) (* TODO: improve! *) | _ -> join aset (complement elems a) @@ -454,9 +454,10 @@ (* Helper function for assignment creation below. *) let make_assign vl tuple = + if Array.length vl <> Array.length tuple then failwith "make_assign <>length"; let compare_asvs (v1, e1) (v2, e2) = let c = compare_vars (v1 :> Formula.var) (v2 :> Formula.var) in - if c != 0 then -c else compare_elems e1 e2 in + if c != 0 then -c else compare_elems e1 e2 in List.sort compare_asvs (Array.to_list (Aux.array_combine vl tuple)) (* Create an assignment set out of a list of variables and assigned tuples. *) Modified: trunk/Toss/Solver/Solver.ml =================================================================== --- trunk/Toss/Solver/Solver.ml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/Solver/Solver.ml 2012-02-05 01:24:07 UTC (rev 1663) @@ -303,7 +303,7 @@ let app_re = function Fun _ -> raise Not_found | x -> x in try let _ = FormulaMap.map_to_atoms_full app_rel app_re phi in - let rs = Aux.unique_sorted !rels in + let rs = Aux.unique_sorted ~cmp:String.compare !rels in if !debug_level > 1 then print_endline ("F: " ^ (Formula.str phi) ^" "^ (String.concat ", " rs)); Some rs Modified: trunk/Toss/WebClient/Login.js =================================================================== --- trunk/Toss/WebClient/Login.js 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/WebClient/Login.js 2012-02-05 01:24:07 UTC (rev 1663) @@ -166,8 +166,8 @@ } } -function login_onenter () { - if (window.event && window.event.keyCode == 13) { login() } +function login_onenter (ev) { + if (ev && ev.keyCode == 13) { login() } } // Logout Modified: trunk/Toss/WebClient/Main.js =================================================================== --- trunk/Toss/WebClient/Main.js 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/WebClient/Main.js 2012-02-05 01:24:07 UTC (rev 1663) @@ -202,7 +202,7 @@ par.completed_shown = false; } else { par.closed_play_list.style.display = "block"; - par.learn_button.style.display = "inline"; + //par.learn_button.style.display = "inline"; skip for now par.completed_button.innerHTML = "Completed games (Hide)"; par.completed_shown = true; } Modified: trunk/Toss/WebClient/Style.css =================================================================== --- trunk/Toss/WebClient/Style.css 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/WebClient/Style.css 2012-02-05 01:24:07 UTC (rev 1663) @@ -202,6 +202,7 @@ } .loginput { + font-size: 0.8em; border-color: #fff1d4; border-radius: 4px; -moz-border-radius: 4px; @@ -234,6 +235,7 @@ } .play_select { + display: none; position: relative; top: -0.1em; color: #260314; @@ -249,12 +251,14 @@ } .play_select_opt { + display: none; color: #260314; background-color: #fff1d4; border-width: 0px; } .play_learn { + display: none; color: #260314; font-family: Verdana, 'TeXGyreHerosRegular', sans; font-size: 0.8em; @@ -297,6 +301,7 @@ } #loginbt { + font-size: 0.8em; position: relative; top: -2px; font-weight: bold; @@ -336,13 +341,13 @@ #login2 { position: absolute; top: 0px; - left: 18em; + left: 17em; } #login3 { position: absolute; top: 0.3em; - left: 28em; + left: 27em; } #logo { Modified: trunk/Toss/WebClient/index.html =================================================================== --- trunk/Toss/WebClient/index.html 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/WebClient/index.html 2012-02-05 01:24:07 UTC (rev 1663) @@ -35,12 +35,12 @@ <form id="loginform" style="display: inline;" action=""> <div id="login1"> <p class="loginsmall">Username:</p> -<input class="loginput" type="text" name="username" id="username" size="15" /> +<input class="loginput" type="text" name="username" id="username" size="12" /> </div> <div id="login2"> <p class="loginsmall">Password:</p> -<input class="loginput" type="password" name="password" id="password" size="15" - onkeypress="login_onenter()" /> +<input class="loginput" type="password" name="password" id="password" size="12" + onkeypress="login_onenter(event)" /> </div> <div id="login3"> <p class="loginchk"> @@ -177,6 +177,15 @@ <div id="news"> <h3>News</h3> <ul id="welcome-list-news" class="welcome-list"> +<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> Modified: trunk/Toss/WebClient/profile.html =================================================================== --- trunk/Toss/WebClient/profile.html 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/WebClient/profile.html 2012-02-05 01:24:07 UTC (rev 1663) @@ -25,11 +25,11 @@ <form id="loginform" style="display: inline;" action=""> <div id="login1"> <p class="loginsmall">Username:</p> -<input class="loginput" type="text" name="username" id="username" size="15" /> +<input class="loginput" type="text" name="username" id="username" size="12" /> </div> <div id="login2"> <p class="loginsmall">Password:</p> -<input class="loginput" type="password" name="password" id="password" size="15" +<input class="loginput" type="password" name="password" id="password" size="12" onkeypress="login_onenter()" /> </div> <div id="login3"> Modified: trunk/Toss/www/create.xml =================================================================== --- trunk/Toss/www/create.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/create.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -12,132 +12,6 @@ <link id="create" href="/create.html">Create</link> </history> - - <section title="Two Ways to Create a New Game" lang="en"> - <par>When you are done playing the games already defined in Toss, it's - time to start the real fun – create your own game! - There are two ways to create a game in Toss.</par> - <itemize> - <item>You can use the GUI to edit and create games.</item> - <item>You can edit the .toss files directly.</item> - </itemize> - <par>If you plan to make small changes or an easy experiment, the GUI might - be the better option. For larger or completely new games, it is more - convenient to edit the files in your favorite text editor.</par> - </section> - - <section title="Zwei Methoden um ein neues Spiel in Toss zu erzeugen" - lang="de"> - <par>Wenn man genug online gespielt hat, kann man mit dem wirklichen - Spass in Toss anfangen und ein neues Spiel erschaffen. Zwei Wege - kann man dazu nutzen.</par> - <itemize> - <item>Die Toss GUI erlaubt es, Spiele zu erzeugen.</item> - <item>Die .toss Files kann man auch direkt editieren.</item> - </itemize> - <par>Um kleine Änderungen zu machen oder ein einfaches Beispiel zu - definieren kann man die GUI benutzen. Um kompliziertere Spiele zu - erzeugen und ganz neue Ideen zu realisieren ist es bequemer, die .toss - Files direkt in einem Editor zu bearbeiten.</par> - </section> - - <section title="Dwa Sposoby Tworzenia Nowych Gier w Tossie" lang="pol"> - <par>Gdy już znudzi Ci się granie online, czas na prawdziwą zabawę - z Tossem – stwórz swoją własną grę! W Tossie są dwa sposoby - na tworzenie własnych gier.</par> - <itemize> - <item>Można użyć interfejsu graficznego Tossa (GUI).</item> - <item>Możliwa jest też bezpośrednia edycja plików .toss.</item> - </itemize> - <par>Do małych zmian i prostych eksperymentów wystarczy użycie GUI, - natomiast dla nowych i bardziej skomplikowanych gier wygodniej jest - bezpośrednio edytować pliki .toss w edytorze tekstu.</par> - </section> - - <section title="Deux Façons de Créer un Nouveau Jeu" lang="fr"> - <par>Si vous avez fini de jouer les jeux déjà définis dans Toss, - il est temps de commencer le vrai plaisir – créez votre propre jeu! - Il y a deux façons de créer un jeu dans Toss.</par> - <itemize> - <item>Vous pouvez utiliser l'interface graphique pour éditer - et créer des jeux.</item> - <item>Vous pouvez éditer les fichiers .toss directement.</item> - </itemize> - <par>Si vous prévoyez de faire de petits changements ou une jeu facile, - l'interface graphique pourrait être la meilleure option. Pour les - grandes ou complètement nouveaux jeux, il est plus commode de modifier - les fichiers dans votre éditeur de texte favori.</par> - </section> - - - <section title="Creating Games the in the Toss GUI" lang="en"> - <par>To start the Toss GUI do the following.</par> - <itemize> - <item><em>Download</em> Toss from the - <a href="http://sourceforge.net/project/showfiles.php?group_id=115606"> - SourceForge Download Page</a>.</item> - <item><em>Run Toss</em> by clicking <em>Toss.py</em>. - You can start by opening a file from the <em>examples</em> - directory.</item> - </itemize> - <par>When you have the GUI running, we recommend that you watch the - <a href="http://vimeo.com/10110495">Toss Tutorial</a> below, which - shows all the steps needed to define a simple game in Toss and explains - several other features.<br/></par> - <par><br/><toss-video/></par> - </section> - <section title="Spiele in das Toss GUI Erzeugen" lang="de"> - <par>Um die Toss GUI zu starten, muss man:</par> - <itemize> - <item>Toss <em>runterladen</em> von der - <a href="http://sourceforge.net/project/showfiles.php?group_id=115606"> - SourceForge Seite</a>.</item> - <item><em>Toss ausführen</em>, indem man auf <em>Toss.py</em> clickt. - Man kann am Anfang einer der Files im <em>examples</em> Verzeichnis - öffnen.</item> - </itemize> - <par>Wenn die GUI schon läuft, kann man am besten das - <a href="http://vimeo.com/10110495">Toss Tutorial</a> unten angucken, - wo gezeigt wird, wie man ein einfaches Spiel in Toss vollständig - definiert und auch andere Features erklärt sind.<br/></par> - <par><br/><toss-video/></par> - </section> - <section title="Tworzenie Gier w Interfejsie Graficznym Tossa" lang="pol"> - <par>Aby uruchomić interfejs graficzny Tossa:</par> - <itemize> - <item><em>Ściągnij</em> Tossa ze - <a href="http://sourceforge.net/project/showfiles.php?group_id=115606"> - strony SourceForge</a>.</item> - <item><em>Uruchom Tossa</em> klikając na <em>Toss.py</em>. - Na początek najlepiej otworzyć przykład z katalogu <em>examples</em>. - </item> - </itemize> - <par>Gdy GUI Tossa już działa, polecamy obejrzeć i wykonać poniższy - <a href="http://vimeo.com/10110495">Toss Tutorial</a>. - Pokazane tam są wszystkie kroki do zdefiniowania prostej gry w Tossie, - a także wyjaśnione niektóre bardziej zaawansowane możliwości.<br/></par> - <par><br/><toss-video/></par> - </section> - <section title="Créer des Jeux dans l'Interface Graphique de Toss" lang="fr"> - <par>Pour démarrer l'interface graphique de Toss, procédez comme suit.</par> - <itemize> - <item><em>Téléchargez</em> Toss sur la - <a href="http://sourceforge.net/project/showfiles.php?group_id=115606"> - SourceForge Télécharger Site</a>.</item> - <item><em>Exécutez Toss</em> en cliquant <em>Toss.py</em>. - Vous pouvez commencer par l'ouverture d'un fichier dans du répertoire - <em>examples</em>.</item> - </itemize> - <par> - Lorsque vous avez le bon GUI, nous vous recommandons de regarder le - <a href="http://vimeo.com/10110495">Toss Tutoriel</a> ci-dessous, - qui montre toutes les étapes nécessaires pour définir un jeu simple - en Toss et explique plusieurs autres fonctions. - <br/></par> - <par><br/><toss-video/></par> - </section> - - <section title="Creating Games in your Text Editor" lang="en"> <par>For larger games, we find it easier to edit them in text form than from the GUI. To understand the meaning of the fields @@ -148,9 +22,9 @@ simply edit the .toss file, maybe starting with one of these. </par> <itemize> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss?revision=1349">Breakthrough</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss?revision=1349">Chess</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss?revision=1349">Tic-Tac-Toe</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss">Breakthrough</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss">Chess</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss">Tic-Tac-Toe</a></item> </itemize> </section> <section title="Spiele in Text Form erschaffen" lang="de"> @@ -165,9 +39,9 @@ bearbeiten, mit einer des folgenden kann man gut anfangen. </par> <itemize> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss?revision=1349">Breakthrough</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss?revision=1349">Chess</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss?revision=1349">Tic-Tac-Toe</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss">Breakthrough</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss">Chess</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss">Tic-Tac-Toe</a></item> </itemize> </section> <section title="Tworzenie Gier w Edytorze Tekstu" lang="pol"> @@ -181,9 +55,9 @@ edytować pliki .toss, być może zaczynając od jednego z tych. </par> <itemize> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss?revision=1349">Breakthrough</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss?revision=1349">Chess</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss?revision=1349">Tic-Tac-Toe</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss">Breakthrough</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss">Chess</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss">Tic-Tac-Toe</a></item> </itemize> </section> <section title="La Création de Jeux dans l'Éditeur de Texte" lang="fr"> @@ -197,9 +71,9 @@ éditer le fichier .toss, peut-être en commençant par l'un de ces. </par> <itemize> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss?revision=1349">Breakthrough</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss?revision=1349">Chess</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss?revision=1349">Tic-Tac-Toe</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss">Breakthrough</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss">Chess</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss">Tic-Tac-Toe</a></item> </itemize> </section> Modified: trunk/Toss/www/develop.xml =================================================================== --- trunk/Toss/www/develop.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/develop.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -40,10 +40,6 @@ </item> <item>In the Toss directory run <em>make</em> and check that it succeeds.</item> - <item>Go through our <a href="/ocaml.html">Mini OCaml Tutorial</a> to - see how we organise OCaml code in general.</item> - <item>In the <a href="/codebasics.html">Toss Code Basics Tutorial</a> you - will learn to code basic operations with Toss.</item> </itemize> </section> <section title="Vorbereitung" lang="de"> @@ -75,10 +71,6 @@ </item> <item>Führe <em>make</em> aus im Toss Verzeichnis und überprüfe, dass es erfolgreich funktioniert hat.</item> - <item>Unser <a href="/ocaml.html">Mini OCaml Tutorial</a> zeigt, - wie wir OCaml Code organisieren.</item> - <item>Das <a href="/codebasics.html">Toss Code Basics Tutorial</a> zeigt, - wie man einfache Toss-Funktionen ausführt.</item> </itemize> </section> <section title="Przygotowanie" lang="pol"> @@ -109,10 +101,6 @@ </item> <item>W katalogu Toss uruchom <em>make</em> i sprawdź czy dobrze zadziałało.</item> - <item>Nasz <a href="/ocaml.html">Mini OCaml Tutorial</a> pokazuje, - jak organizujemy kod OCamla.</item> - <item><a href="/codebasics.html">Toss Code Basics Tutorial</a> pokazuje - podstawowe wywołania funkcji Tossa.</item> </itemize> </section> <section title="Préparation" lang="fr"> @@ -141,10 +129,48 @@ </item> <item>Dans le répertoire Toss exécuter <em>make</em> et vérifier que c'est bien.</item> + </itemize> + </section> + + + <section title="Tutorials" lang="en"> + <itemize> + <item>Visit <a href="http://try.ocamlpro.com">try.ocamlpro.com</a> + to refresh your basic OCaml skills.</item> + <item>Go through our <a href="/ocaml.html">Mini OCaml Tutorial</a> to + see how we organise OCaml code in general.</item> + <item>In the <a href="/codebasics.html">Toss Code Basics Tutorial</a> you + will learn to code basic operations with Toss.</item> + </itemize> + </section> + <section title="Tutorials" lang="de"> + <itemize> + <item>Besuche <a href="http://try.ocamlpro.com">try.ocamlpro.com</a> + um die Grundlagen von OCaml zu lernen.</item> + <item>Unser <a href="/ocaml.html">Mini OCaml Tutorial</a> zeigt, + wie wir OCaml Code organisieren.</item> + <item>Das <a href="/codebasics.html">Toss Code Basics Tutorial</a> zeigt, + wie man einfache Toss-Funktionen ausführt.</item> + </itemize> + </section> + <section title="Tutoriale" lang="pol"> + <itemize> + <item>Na <a href="http://try.ocamlpro.com">try.ocamlpro.com</a> + możesz szybko nauczyć się OCamla na przykładach.</item> + <item>Nasz <a href="/ocaml.html">Mini OCaml Tutorial</a> pokazuje, + jak organizujemy kod OCamla.</item> + <item><a href="/codebasics.html">Toss Code Basics Tutorial</a> pokazuje + podstawowe wywołania funkcji Tossa.</item> + </itemize> + </section> + <section title="Tutoriaux" lang="fr"> + <itemize> + <item>Visitez <a href="http://try.ocamlpro.com">try.ocamlpro.com</a> + pour actualiser vos compétences en OCaml.</item> <item>Notre <a href="/ocaml.html">Mini OCaml Tutorial</a> montre - comment nous organiser le code OCaml.</item> + comment nous organiser le code OCaml.</item> <item>Le <a href="/codebasics.html">Toss Code Basics Tutorial</a> montre - comment on utilise les fonctions de base Toss.</item> + comment on utilise les fonctions de base Toss.</item> </itemize> </section> Modified: trunk/Toss/www/docs.xml =================================================================== --- trunk/Toss/www/docs.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/docs.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -14,28 +14,19 @@ <section title="Using Toss" lang="en"> <par>If you want to learn how to use Toss to create games, - go to the <a href="create.html">Create Games</a> page - or just watch the video tutorial below to get started.<br/></par> - <par><br/><toss-video/></par> + go to the <a href="create.html">Create Games</a> page.</par> </section> <section title="Toss Benutzen" lang="de"> <par>Um zu lernen, wie man Toss benutzt um neue Spiele zu erschaffen, - besuche die <a href="create.html">Neue Spiele Erzeugen</a> Seite oder - fange mit dem Video Tutorial unten an.<br/></par> - <par><br/><toss-video/></par> + besuche die <a href="create.html">Neue Spiele Erzeugen</a> Seite.</par> </section> <section title="Używanie Tossa" lang="pol"> <par>Żeby nauczyć się tworzyć gry w Tossie najlepiej odwiedzić stronę - o <a href="create.html">Tworzeniu Nowych Gier</a> albo szybko obejrzeć - poniższy tutorial.<br/></par> - <par><br/><toss-video/></par> + o <a href="create.html">Tworzeniu Nowych Gier</a>.</par> </section> <section title="Utilisation de Toss" lang="fr"> <par>Si vous voulez apprendre à utiliser Toss pour créer des jeux, - aller à la <a href="create.html">Créez des Jeux</a> site ou - simplement regarder la vidéo tutoriel ci-dessous pour commencer. - <br/></par> - <par><br/><toss-video/></par> + aller à la <a href="create.html">Créez des Jeux</a> site.</par> </section> @@ -43,34 +34,26 @@ <par>The Toss Design and Specification reference is an evolving document in which we try to describe the high-level mathematical model of Toss and the main ideas used in the implementation. The document is best - viewed as <a href="reference/reference.pdf">reference.pdf</a> but - a <a href="reference/">html version</a> is available as well - for fast fact-checking.</par> + viewed as <a href="reference/reference.pdf">reference.pdf</a>.</par> </section> <section title="Referenz" lang="de"> <par><em>Toss Design and Specification</em> ist ein ständig aktuliesiertes Dokument, in dem wir versuchen, eine Übersicht über die mathematische Grundlagen von Toss und die Hauptideen der Algorithmen, die wir implementiert haben, zu geben. Es ist am besten als - <a href="reference/reference.pdf">reference.pdf</a> zu lesen, aber - eine <a href="reference/">html Version</a> mit niedrigerer Qualität - steht auch zur Verfügung, falls man etwas ganz schnell finden muss.</par> + <a href="reference/reference.pdf">reference.pdf</a> zu lesen.</par> </section> <section title="Opis" lang="pol"> <par>"Toss Design and Specification" to ciągle zmieniający się dokument, w którym próbujemy opisać matematyczny model Tossa i najważniejsze idee i algorytmy użyte w implementacji. Najlepiej oglądać ten opis - jako <a href="reference/reference.pdf">reference.pdf</a>, ale wersja - <a href="reference/">html</a> w niższej jakości też jest dostępna gdy - trzeba coś szybko sprawdzić.</par> + jako <a href="reference/reference.pdf">reference.pdf</a>.</par> </section> <section title="Référence" lang="fr"> <par>Le Toss Design et Spécification est un document dans lequel nous essayons de décrire le modèle mathématique de Toss et les idées principales utilisées dans Toss. Le document est le meilleur lire - comme <a href="reference/reference.pdf">Reference.pdf</a>, mais - une <a href="reference/">version html</a> est disponible ainsi, - pour vérifier les faits rapidement.</par> + comme <a href="reference/reference.pdf">Reference.pdf</a>.</par> </section> Modified: trunk/Toss/www/examples.xml =================================================================== --- trunk/Toss/www/examples.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/examples.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -158,12 +158,12 @@ <section> <itemize> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss?revision=1349">Breakthrough</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Checkers.toss?revision=1349">Checkers</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss?revision=1349">Chess</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Connect4.toss?revision=1349">Connect4</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Gomoku.toss?revision=1349">Gomoku</a></item> - <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss?revision=1349">Tic-Tac-Toe</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Breakthrough.toss">Breakthrough</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Checkers.toss">Checkers</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Chess.toss">Chess</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Connect4.toss">Connect4</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Gomoku.toss">Gomoku</a></item> + <item><a href="http://toss.svn.sourceforge.net/viewvc/toss/trunk/Toss/examples/Tic-Tac-Toe.toss">Tic-Tac-Toe</a></item> </itemize> </section> Deleted: trunk/Toss/www/gui_interface.xml =================================================================== --- trunk/Toss/www/gui_interface.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/gui_interface.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE lecture SYSTEM "xsl/xhtml1-lat1.ent"> - -<?xml-stylesheet type="text/xsl" href="xsl/main.xsl" charset="UTF-8"?> - -<personal> - <title lang="en">GUI Interface Guide</title> - <title lang="de">GUI Interface Guide (auf Englisch)</title> - <title lang="pol">GUI Interface Guide (po angielsku)</title> - <title lang="fr">Guide de Interface Graphique (à anglais)</title> - <history> - <link id="create" href="/create.html">Create New Games</link> - <link id="examples" href="/examples.html">Examples</link> - </history> - - - - <section title="Changing Elements"> - <itemize> - <item> - <image src="move.png" title="hand"/> - <em>The move cursor</em> can shift the whole structure (your view-point) - and give more information about elements when you hover over them - (such as name, position and speed of the element). - </item> - - <item> - <image src="draw.png" title="pointer"/> - <em>The pointer</em> can be used for three things: - <itemize> - <item>adding new elements (click on the desired spot and a circle - appears)</item> - <item>selecting and deselecting existing elements - (circle becomes disc when selected)</item> - <item>moving elements (when these are selected)</item> - </itemize> - </item> - - <item> - <image src="erase.png" title="eraser"/> - <em>The eraser</em> has two functions: - <itemize> - <item>removing an element (click on the desired circle - or disc)</item> - <item>removing a relation between elements (click on the arrow - between two elements).</item> - </itemize> - </item> - - <item> - <image src="redraw.png" title="redraw"/> - <em>The redraw button</em> should be used whenever the picture - becomes garbled. As you can imagine an overcrowded region with - many inter-crossing arrows may easily become messed up. - </item> - </itemize> - </section> - - <section title="Editing Relations"> - <par>In the <em>Relations</em> panel you can create a new relation by - clicking <em>New</em>.</par> - - <par>Establishing relations between existing elements is done - with the pointer:</par> - <itemize> - <item>In order to establish a unary relation, select exactly one element - with the pointer and then click the name of the unary relation.</item> - <item>In order to establish a binary relation, select exactly - two elements with the pointer keeping in mind which of the elements - is selected first (relations are not reflexive by default) and - click the name of the relation.</item> - <item>In a similar way you can create relations with arbitrary - arity.</item> - </itemize> - </section> - - <section title="Adding and Applying Rules"> - <itemize> - <item> - <image src="add_rule.png" title="add rule"/> - <em>The add rule</em> button is used to declare a new rewrite rule. - </item> - - <item>For moving, you can use the - <em>Match</em>, <em>Apply</em>, <em>Hint</em>, and - <em>Toss</em>, <em>Toss Run</em>, and <em>Hint Run</em> buttons. - </item> - - <item><image src="match.png" title="match"/> - <em>The match button</em> - finds an embedding of the left-hand model from a rewrite rule in one - of currently allowed moves into the main model and marks it in red. - There may be many such embeddings. Pressing Match repeatedly switches to - another embedding (similarly to the <em>Find Next</em> function - in text editors). - </item> - - <item><image src="rewrite.png" title="rewrite"/> - <em>The apply button</em> - applies the rewrite rule according to the embedding previously marked - in red. Note that players can also match and apply a rule using mouse - gestures: for this write appropriate shape in the - <em>Matching Shape</em> field of a rule (basic shapes like circle, - line, square, triangle etc. are recognized). - </item> - - <item><image src="move.png" title="hint"/> - <em>The hint button</em> - can be used to get move suggestion from our AI engine. - Increase the number of iterations to improve the quality of hints, - and decrease it if getting a hint takes too much time. - </item> - - <item><image src="toss.png" title="toss"/> - <em>The toss button</em> finds a random move and applies it.</item> - - <item><image src="run_toss.png" title="toss run"/> - <em>The toss run button</em> repeats the function of the toss button - a prescribed number of times.</item> - - <item><image src="run_hint.png" title="hint run"/> - <em>The hint run button</em> repeats taking a hint and applying it - a prescribed number of times.</item> - </itemize> - </section> - - <section title="What happens after a rewrite rule is applied"> - <itemize> - <item>The marked elements move as prescribed by the differential equations - in the rule <em>Dynamics</em> panel.</item> - <item>The elements marked in red are removed.</item> - <item>Elements from the right-hand model are added, preserving their own - relations.</item> - <item>Relations previously going to the left elements are connected to - the new right elements as prescribed by the <em>Correspondence</em> - field of the rule.</item> - <item>Values like position and speed are updated as given by - the <em>Update</em> equations in the rule.</item> - </itemize> - </section> -</personal> Modified: trunk/Toss/www/img/Breakthrough.png =================================================================== (Binary files differ) Modified: trunk/Toss/www/img/Checkers.png =================================================================== (Binary files differ) Modified: trunk/Toss/www/img/Connect4.png =================================================================== (Binary files differ) Modified: trunk/Toss/www/img/Gomoku.png =================================================================== (Binary files differ) Modified: trunk/Toss/www/img/Pawn-Whopping.png =================================================================== (Binary files differ) Modified: trunk/Toss/www/img/Tic-Tac-Toe.png =================================================================== (Binary files differ) Modified: trunk/Toss/www/index.xml =================================================================== --- trunk/Toss/www/index.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/index.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -52,57 +52,38 @@ <games-section> <game-div> - <game-link game="Breakthrough"/> - <game-link game="Checkers"/> + <game-link game="Pawn-Whopping"/> <game-link game="Connect4"/> + <game-link game="Breakthrough"/> </game-div> <game-div> <game-link game="Gomoku"/> - <game-link game="Pawn-Whopping"/> + <game-link game="Checkers"/> <game-link game="Tic-Tac-Toe"/> </game-div> </games-section> <section title="Create New Games" lang="en"> - <par>The <a href="http://vimeo.com/10110495">Toss Tutorial</a> below - shows all the steps needed to define a simple game in Toss and explains - several other features. With Toss, you can make your game ideas come - true! Go to the <a href="create.html">Create Games</a> page to learn - how to build new games with Toss. - <br/></par> - <par><br/><toss-video/></par> + <par>Go to the <a href="create.html.en">Create Games</a> page to learn + how to build new games with Toss.</par> </section> <section title="Neue Spiele Erzeugen" lang="de"> - <par>Das <a href="http://vimeo.com/10110495">Toss Tutorial</a> unten - zeigt, wie man in Toss ein einfaches Spiel definieren kann, und - erklärt auch einige andere Features von Toss. Mit Toss ist es möglich, - Deine Spielideen zu realisieren! Lerne wie man mit Toss neue - <a href="create.html">Spiele erzeugt.</a> - <br/></par> - <par><br/><toss-video/></par> + <par> + Lerne wie man mit Toss neue <a href="create.html.de">Spiele erzeugt.</a> + </par> </section> <section title="Stwórz Nową Grę" lang="pol"> - <par><a href="http://vimeo.com/10110495">Tutorial Tossa</a> poniżej - pokazuje, jak zdefiniować prostą grę w Kółko i Krzyżyk w Tossie, - wyjaśnia też inne możliwości Tossa. Dzięki Tossowi możesz zrealizować - swój pomysł na nową grę! Zobacz poniższą stronę i dowiedz się jak - <a href="create.html">stworzyć nową grę</a>. - <br/></par> - <par><br/><toss-video/></par> + <par>Zobacz jak <a href="create.html.pol">stworzyć nową grę</a>.</par> </section> <section title="Créez de Noveaux Jeux" lang="fr"> - <par>Le <a href="http://vimeo.com/10110495">Toss Tutoriel</a> ci-dessous - montre toutes les étapes nécessaires pour définir un jeu simple en Toss, - et il explique plusieurs autres caractéristiques aussi. Avec Toss, - vous pouvez réaliser de vos idées de jeu! - Visitez le site <a href="create.html">Créer des Jeux</a> pour en savoir + <par> + Visitez le site <a href="create.html.fr">Créer des Jeux</a> pour en savoir comment on construit de nouveaux jeux avec Toss. - <br/></par> - <par><br/><toss-video/></par> + </par> </section> Modified: trunk/Toss/www/navigation.xml =================================================================== --- trunk/Toss/www/navigation.xml 2012-02-04 01:07:09 UTC (rev 1662) +++ trunk/Toss/www/navigation.xml 2012-02-05 01:24:07 UTC (rev 1663) @@ -9,14 +9,11 @@ <item href="http://sourceforge.net/project/showfiles.php?group_id=115606" >Download Toss</item> <menu title="Create Games" href="/create.html" id="create"> - <item href="http://vimeo.com/10110495" id="tut">Video Tutorial</item> <item href="/examples.html" id="examples">Examples</item> - <item href="/gui_interface.html" id="gui_interface">GUI Interface Guide</item> </menu> <item href="/play.html" id="play">Watch Toss Play</item> <menu title="Documentation" href="/docs.html" id="docs"> <item href="/reference/reference.pdf" id="refpdf">Reference (pdf)</item> - <item href="/reference/" id="refhtml">Reference (html)</item> </menu> <item href="/Publications/" id="Publications">Papers and Talks</item> <menu title="Develop Toss" href="/develop.html" id="develop"> @@ -35,14 +32,11 @@ <item href="http://sourceforge.net/project/showfiles.php?group_id=115606" >Toss Runterladen</item> <menu title="Spiele Erzeugen" href="/create.html" id="create"> - <item href="http://vimeo.com/10110495" id="tut">Video Tutorial</item> <item href="/examples.html" id="examples">Beispiele</item> - <item href="/gui_interface.html" id="gui_interface">GUI Interface Guide</item> </menu> <item href="/play.html" id="play">Wie Toss Spielt</item> <menu title="Dokumentation" href="/docs.html" id="docs"> <item href="/reference/reference.pdf" id="refpdf">Referenz (pdf)</item> - <item href="/reference/" id="refhtml">Referenz (html)</item> </menu> <item href="/Publications/" id="Publications">Papers und Talks</item> <menu title="Toss Programmieren" href="/develop.html" id="develop"> @@ -61,14 +55,11 @@ <item href="http://sourceforge.net/project/showfiles.php?group_id=115606" >Ściągnij Tossa</item> <menu title="Twórz Nowe Gry" href="/create.html" id="create"> - <item href="http://vimeo.com/10110495" id="tut">Tutorial Video</item> <item href="/examples.html" id="examples">Przykłady</item> - <item href="/gui_interface.html" id="gui_interface">Interfejs GUI</item> </menu> <item href="/play.html" id="play">Jak Toss Gra</item> <menu title="Dokumentacja" href="/docs.html" id="docs"> <item href="/reference/reference.pdf" id="refpdf">Opis (pdf)</item> - <item href="/reference/" id="refhtml">Opis (html)</item> </menu> <item href="/Publications/" id="Publications">Prace i Referaty</item> <menu title="Programuj Tossa" href="/develop.html" id="develop"> @@ -87,15 +78,11 @@ <item href="http://sourceforge.net/project/showfiles.php?group_id=115606" >Téléchargez Toss</item> <menu title="Créez des Jeux" href="/create.html" id="create"> - <item href="http://vimeo.com/10110495" id="tut">Vidéo Tutoriel</item> <item href="/examples.html" id="examples">Exemples</item> - <item href="/gui_interface.html" id="gui_interface"> - Interface Graphique</item> </menu> <item href="/play.html" id="play">Regardez Toss Jouer</item> <menu title="Documentation" href="/docs.html" id="docs"> <item href="/reference/reference.pdf" id="refpdf">Référence (pdf)</item> - <item href="/reference/" id="refhtml">Référence (html)</item> </menu> <item href="/Publications/" id="Publications">Papiers, Entretiens</item> <menu title="Développez Toss" href="/develop.html" id="develop"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |