Check-in [8acc8e6c78]
Not logged in
Overview
SHA1 Hash:8acc8e6c78ff200ae4c6da882e29acc222ffc840
Date: 2012-07-15 16:02:32
User: kinaba
Comment:Prioritize distant lambda.
Timelines: family | ancestors | descendants | both | trunk
Diffs: redesign
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified score_memo.txt from [a7904b90ae36b3e4] to [d46da9814cb8619d].

1 contest1 212! 1 contest1 212! 2 contest2 273? | 2 contest2 280? 3 contest3 275! 3 contest3 275! 4 contest4 561? 4 contest4 561? 5 contest5 1281? 5 contest5 1281? 6 contest6 737 6 contest6 737 7 contest7 867? 7 contest7 867? 8 contest8 1245 8 contest8 1245 9 contest9 3042? 9 contest9 3042? 10 contest10 2076 10 contest10 2076 11 flood1 569 11 flood1 569 12 flood2 273? | 12 flood2 280? 13 flood3 802 13 flood3 802 14 flood4 970 14 flood4 970 15 flood5 561? 15 flood5 561? 16 trampoline1 291 16 trampoline1 291 17 trampoline2 1728? 17 trampoline2 1728? 18 trampoline3 698 18 trampoline3 698 19 beard1 856? 19 beard1 856? 20 beard2 2792 20 beard2 2792 21 beard3 811 21 beard3 811 22 beard4 677 22 beard4 677

Modified src/solver.d from [dde2fe1d85562c17] to [57f6f73657cc3655].

52 } 52 } 53 53 54 Tuple!(Pos, int)[] log; 54 Tuple!(Pos, int)[] log; 55 bool[][] forbidden_cell; 55 bool[][] forbidden_cell; 56 56 57 char act(const(Game) g, string death, int breath) 57 char act(const(Game) g, string death, int breath) 58 { 58 { 59 const Pos ro = g.map.robot; | 59 const Pos ro = g.map.robot; > 60 const Pos li = g.map.lift; 60 const Pos[] la = g.map.lambdas(); | 61 Pos[] la = g.map.lambdas(); > 62 sort!((Pos a,Pos b){ > 63 int ad=abs(a.y-li.y)+abs(a.x-li.x); > 64 int bd=abs(b.y-li.y)+abs(b.x-li.x); > 65 return ad>bd;; > 66 })(la); 61 const Pos[] ra = g.map.razors(); | 67 Pos[] ra = g.map.razors(); 62 const Pos li = g.map.lift; < 63 const Pos[] hi = g.map.objects('W'); | 68 const(Pos)[] hi = g.map.objects('W'); 64 69 65 Tuple!(char,int)[] cand; 70 Tuple!(char,int)[] cand; 66 char c = 'W'; 71 char c = 'W'; 67 if( la.empty ) { 72 if( la.empty ) { 68 cand = search(g, ro, [li], death); 73 cand = search(g, ro, [li], death); 69 } else { 74 } else { 70 cand ~= search(g, ro, la~ra, death); 75 cand ~= search(g, ro, la~ra, death);

Modified src/util.d from [3ea557146e66a2fa] to [41ba420d0c49ce8d].

1 public import std.algorithm; 1 public import std.algorithm; 2 public import std.array; 2 public import std.array; 3 public import std.conv; 3 public import std.conv; 4 public import std.range; 4 public import std.range; 5 public import std.stdio; 5 public import std.stdio; 6 public import std.string; 6 public import std.string; 7 public import std.typecons; 7 public import std.typecons; > 8 public import std.math; 8 import std.c.stdlib; 9 import std.c.stdlib; 9 10 10 // To avoide the following ICE: 11 // To avoide the following ICE: 11 // src\phobos\std\algorithm.d(4552): 12 // src\phobos\std\algorithm.d(4552): 12 // Error: function std.algorithm.count!("a == b",string,char).count 13 // Error: function std.algorithm.count!("a == b",string,char).count 13 // compiler error, parameter 'value', bugzilla 2962? 14 // compiler error, parameter 'value', bugzilla 2962? 14 // Assertion failure: '0' on line 717 in file 'glue.c' 15 // Assertion failure: '0' on line 717 in file 'glue.c'