Diff
Not logged in

Differences From Artifact [cc3cdceae20eed85]:

To Artifact [8a530414bd295205]:


102 interface Solver 102 interface Solver 103 { 103 { 104 // this(in Game g); 104 // this(in Game g); 105 char single_step(); 105 char single_step(); 106 void force(char c); 106 void force(char c); 107 } 107 } 108 108 > 109 /// > 110 /// Solver "Mountain": be immovable like a mountain. > 111 /// 109 class 不動如山 : Solver 112 class 不動如山 : Solver 110 { 113 { 111 this(in Game g) {} 114 this(in Game g) {} 112 char single_step() { return 'W'; } 115 char single_step() { return 'W'; } 113 void force(char c) {} 116 void force(char c) {} 114 } 117 } 115 118 > 119 /// > 120 /// Solver "Forest": shows contemplation. > 121 /// 116 class 徐如林 : Solver 122 class 徐如林 : Solver 117 { 123 { 118 int wait_count = 0; 124 int wait_count = 0; 119 int choke_count = 0; 125 int choke_count = 0; 120 126 121 Game g; 127 Game g; 122 this(in Game g) 128 this(in Game g) ................................................................................................................................................................................ 390 } 396 } 391 return []; 397 return []; 392 } 398 } 393 return (danger_ok ? [] : tryA()) ~ tryB() ~ tryC(); 399 return (danger_ok ? [] : tryA()) ~ tryB() ~ tryC(); 394 } 400 } 395 } 401 } 396 402 > 403 /// > 404 /// Solver "Fire": in raiding and plundering other solvers, be like fire. > 405 /// 397 class 侵掠如火(SubSolver) : Solver 406 class 侵掠如火(SubSolver) : Solver 398 { 407 { 399 // Parameters. 408 // Parameters. 400 int PredictFuture = 10; 409 int PredictFuture = 10; 401 const string[] RandomChoicePattern; // PF*RCP exhaustive search for RL s 410 const string[] RandomChoicePattern; // PF*RCP exhaustive search for RL s 402 const ReplanLength = 400; // O(PF*RCP*RL*SubSolver.single_step 411 const ReplanLength = 400; // O(PF*RCP*RL*SubSolver.single_step 403 412 ................................................................................................................................................................................ 597 t pop() { 606 t pop() { 598 t v = cur[0]; cur = cur[1..$]; 607 t v = cur[0]; cur = cur[1..$]; 599 if(cur.empty) { cur = next; next = null; } 608 if(cur.empty) { cur = next; next = null; } 600 return v; 609 return v; 601 } 610 } 602 } 611 } 603 612 > 613 /// > 614 /// Solver "Wind": let your rapidity be that of the wind. > 615 /// 604 class 疾如風 : Solver 616 class 疾如風 : Solver 605 { 617 { 606 Game g; 618 Game g; 607 this(in Game g) 619 this(in Game g) 608 { 620 { 609 this.g = g.clone(); 621 this.g = g.clone(); 610 } 622 }