Check-in [e784787a7c]
Not logged in
Overview
SHA1 Hash:e784787a7cf76942f1d1c224492367dde70ac830
Date: 2012-07-16 13:28:04
User: kinaba
Comment:Renamed solvers.
Timelines: family | ancestors | descendants | both | trunk
Diffs: redesign
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified src/solver.d from [7de11f2564488051] to [ee76621ab7188714].

1 +// 2 +// http://en.wikipedia.org/wiki/F%C5%ABrinkazan 3 +// 1 4 import util; 2 5 import game; 3 6 4 7 bool is_spacy(char c) 5 8 { 6 9 return c==' ' || c=='.' || c=='R' || c=='!' || c=='\\' || c=='O'; 7 10 } ................................................................................ 99 102 interface Solver 100 103 { 101 104 // this(in Game g); 102 105 char single_step(); 103 106 void force(char c); 104 107 } 105 108 106 -class Solver_0 : Solver 109 +class 不動如山 : Solver 107 110 { 108 111 this(in Game g) {} 109 112 char single_step() { return 'W'; } 110 113 void force(char c) {} 111 114 } 112 115 113 -class Solver_1 : Solver 116 +class 徐如林 : Solver 114 117 { 115 118 int wait_count = 0; 116 119 int choke_count = 0; 117 120 118 121 Game g; 119 122 this(in Game g) 120 123 { ................................................................................ 387 390 } 388 391 return []; 389 392 } 390 393 return (danger_ok ? [] : tryA()) ~ tryB() ~ tryC(); 391 394 } 392 395 } 393 396 394 -class Solver_2(SubSolver) : Solver 397 +class 侵掠如火(SubSolver) : Solver 395 398 { 396 399 // Parameters. 397 400 int PredictFuture = 10; 398 401 const string[] RandomChoicePattern; // PF*RCP exhaustive search for RL steps 399 402 const ReplanLength = 400; // O(PF*RCP*RL*SubSolver.single_step) 400 403 401 404 Game current_game; ................................................................................ 594 597 t pop() { 595 598 t v = cur[0]; cur = cur[1..$]; 596 599 if(cur.empty) { cur = next; next = null; } 597 600 return v; 598 601 } 599 602 } 600 603 601 -class Solver_3 : Solver 604 +class 疾如風 : Solver 602 605 { 603 606 Game g; 604 607 this(in Game g) 605 608 { 606 609 this.g = g.clone(); 607 610 } 608 611 ................................................................................ 661 664 } 662 665 } 663 666 } 664 667 return 'A'; 665 668 } 666 669 } 667 670 668 -//alias Solver_3 MainSolver; 669 -alias Solver_2!(Solver_1) MainSolver; 670 -//alias Solver_1 MainSolver; 671 -//alias Solver_0 MainSolver; 671 +//alias 侵掠如火!(疾如風) MainSolver; 672 +alias 侵掠如火!(徐如林) MainSolver; 673 +//alias 疾如風 MainSolver; 674 +//alias 徐如林 MainSolver; 675 +//alias 不動如山 MainSolver;