Check-in [0d078369c8]
Not logged in
Overview
SHA1 Hash:0d078369c8c61bf47120146a3402d607c8485901
Date: 2012-07-15 15:42:27
User: kinaba
Comment:score update & tweaked to solve contest2
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 [51d1bbd9a3dc8805] to [fa6d014f432133c0].

1 contest1 212! DLRDDUULLLDDL | 1 contest1 212! 2 contest2 179 UURRURRLULLLDDDDRRRRUA | 2 contest2 273? 3 contest3 275! LDDDRRRRDDLLLLLDRRURURRUR | 3 contest3 275! 4 contest4 561? DRDRDRDRRLUURUUULURDDDLLLLLUURRDDRRRUUR | 4 contest4 561? 5 contest5 1281? LLUURUUURRRRRRLUULDLLULLRRDRDDDDDDUURRURRDDDLLRRUUULLLLUUUULDD | 5 contest5 1281? 6 contest6 737 RUULRRRRRRRRRRUUURUURUUULULLULLLLLLLLDDLDDDDDDUUUUUUUURRRDDRRR | 6 contest6 737 7 contest7 867? RDRRRDDLLLDDLLRRURURRRDDRRRLLLULL | 7 contest7 867? 8 contest8 1245 RRRRRLLLLLUULLLDLLLLRRRRRURUUUUUUUUUULLLLUUULLLLRRDDDDDDLRDDDD | 8 contest8 1245 9 contest9 3041 LRUURRRDUDUDULLLDDRRRRRRRRRUUURRRLDDRLDRRRRRRRRRRRUULLLDLULLRD | 9 contest9 3042? 10 contest10 2976 UUUUULLLLLLUUUUULLUULLLRDDUUUUUUURRRUDLLUUURRRDRRRRLLUURRRRLLL | 10 contest10 2076 11 flood1 569 LLLLDDDRRRDRDRUUULLLLLURRRRRDRRA | 11 flood1 569 12 flood2 45 RRRRUA | 12 flood2 141 13 flood3 716 LLUURUUURRRRRRLUULDLLULLRRDRDDDDDDA | 13 flood3 802 14 flood4 970 DDDDLRRRRDDUUUUUUUULLLLLULLLLLLLLUUDRRURUULDRDLLLLLLDDDDLLRRRR | 14 flood4 970 15 flood5 561? DRDRDRDRRLUURUUULURDDDLLLLLUURRDDRRRUUR | 15 flood5 561? 16 trampoline1 291 LDLLLLURRA | 16 trampoline1 291 17 trampoline2 1728? ULLLLLRRRRDRRULULRRLLLLLLLDLWWRULLLDDLLLURRLLUULURURRLLUULLDLL | 17 trampoline2 1728? 18 trampoline3 698 RRRRDDLDDDDDDRDRRRRRRRUUUURRUDRRRRUUURRRDDRRRRRRRRRRA | 18 trampoline3 698 19 beard1 856? RRRURRRDDULLLLLLDLDRURRDDDLLDDLUURDRSRRRRRUR | 19 beard1 856? 20 beard2 2716 RRDDRRRRRRRRRRRRRRRRRRRRRRRRDDRDDLLDDDDLLLLLLLLLLLLLLLLLLLLLLL | 20 beard2 2792 21 beard3 811 RRRRULULRRURRURRRLDDSLDDLDLDDLLLUULDDDDA | 21 beard3 811 22 beard4 677 LLRDDDDDDRRLLDDLLLLLLLLA | 22 beard4 677 23 < 24 <

Modified src/solver.d from [b38729b48307e77e] to [dde2fe1d85562c17].

335 { 335 { 336 int bp = max(0, (cast(int)plan.length)-10); 336 int bp = max(0, (cast(int)plan.length)-10); 337 Game g = ini.clone(); 337 Game g = ini.clone(); 338 for(int i=0; i<bp; ++i) g.command(plan[i]); 338 for(int i=0; i<bp; ++i) g.command(plan[i]); 339 339 340 Tuple!(string,long) cand = tuple(plan, unmod); 340 Tuple!(string,long) cand = tuple(plan, unmod); 341 for(int i=bp; i<plan.length; ++i) { 341 for(int i=bp; i<plan.length; ++i) { 342 foreach(char c; "UDLR") | 342 foreach(string c; ["U","D","L","R","UD","DU","LR","RL"]) 343 if(c != plan[i]) { | 343 if(c[0] != plan[i]) { 344 Tuple!(string,long) zz = try_plan(c, g); 344 Tuple!(string,long) zz = try_plan(c, g); 345 if(cand[1]<zz[1]) 345 if(cand[1]<zz[1]) 346 cand = tuple(plan[0..i]~c~zz[0], 346 cand = tuple(plan[0..i]~c~zz[0], 347 } 347 } 348 g.command(plan[i]); 348 g.command(plan[i]); 349 } 349 } 350 plan = cand[0]; 350 plan = cand[0]; 351 } 351 } 352 352 353 Tuple!(string,long) try_plan(char c, in Game g) | 353 Tuple!(string,long) try_plan(string c, in Game g) 354 { 354 { 355 Game gg = g.clone(); 355 Game gg = g.clone(); 356 gg.command(c); | 356 foreach(cc;c)gg.command(cc); 357 Tuple!(Solver, string) x = run_sub_solver(gg); 357 Tuple!(Solver, string) x = run_sub_solver(gg); 358 return tuple(x[1], x[0].g.score); 358 return tuple(x[1], x[0].g.score); 359 } 359 } 360 360 361 char single_step() { 361 char single_step() { 362 if(plan.empty) 362 if(plan.empty) 363 return 'A'; 363 return 'A';