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
- branch=trunk inherited from [16f0b5784f]
- sym-trunk inherited from [16f0b5784f]
Changes
Modified score_memo.txt from [51d1bbd9a3dc8805] to [fa6d014f432133c0].
1 -contest1 212! DLRDDUULLLDDL 2 -contest2 179 UURRURRLULLLDDDDRRRRUA 3 -contest3 275! LDDDRRRRDDLLLLLDRRURURRUR 4 -contest4 561? DRDRDRDRRLUURUUULURDDDLLLLLUURRDDRRRUUR 5 -contest5 1281? LLUURUUURRRRRRLUULDLLULLRRDRDDDDDDUURRURRDDDLLRRUUULLLLUUUULDDDDDRDDD 6 -contest6 737 RUULRRRRRRRRRRUUURUURUUULULLULLLLLLLLDDLDDDDDDUUUUUUUURRRDDRRRDA 7 -contest7 867? RDRRRDDLLLDDLLRRURURRRDDRRRLLLULL 8 -contest8 1245 RRRRRLLLLLUULLLDLLLLRRRRRURUUUUUUUUUULLLLUUULLLLRRDDDDDDLRDDDDLLRRUUULLRRUUUUUUURRRRRRRDDDDDRRRRRDRRDDDDLA 9 -contest9 3041 LRUURRRDUDUDULLLDDRRRRRRRRRUUURRRLDDRLDRRRRRRRRRRRUULLLDLULLRDDLLULULLLUULLRUULLLUULLLRRURUULDRRRRRUUUURLLLDLLRURRRRRDDDRRRRDDRRURRDDULLLLLLLUULLLDDDLLLLULLRULLDLLLRURRRRRRRRRUUULULLLU 10 -contest10 2976 UUUUULLLLLLUUUUULLUULLLRDDUUUUUUURRRUDLLUUURRRDRRRRLLUURRRRLLLLLLLLLLLLLLLLLLLDDLLLDRULLLDUURLLDDDDDLRRRUULDDDDDLDDLDDDDRRRRRLLDDDRRRRULLLLURRRRRRRURRDDRDRRRRRRDDDRRUURRRLLLUA 11 -flood1 569 LLLLDDDRRRDRDRUUULLLLLURRRRRDRRA 12 -flood2 45 RRRRUA 13 -flood3 716 LLUURUUURRRRRRLUULDLLULLRRDRDDDDDDA 14 -flood4 970 DDDDLRRRRDDUUUUUUUULLLLLULLLLLLLLUUDRRURUULDRDLLLLLLDDDDLLRRRRRRUURRRRRRRRRRRRRRRUUUUUDDDDDDDDDRRRRDDDRRRRRRRUUURRLLDLLLLRRUUUULLLA 15 -flood5 561? DRDRDRDRRLUURUUULURDDDLLLLLUURRDDRRRUUR 16 -trampoline1 291 LDLLLLURRA 17 -trampoline2 1728? ULLLLLRRRRDRRULULRRLLLLLLLDLWWRULLLDDLLLURRLLUULURURRLLUULLDLLLDLLRRRRRR 18 -trampoline3 698 RRRRDDLDDDDDDRDRRRRRRRUUUURRUDRRRRUUURRRDDRRRRRRRRRRA 19 -beard1 856? RRRURRRDDULLLLLLDLDRURRDDDLLDDLUURDRSRRRRRUR 20 -beard2 2716 RRDDRRRRRRRRRRRRRRRRRRRRRRRRDDRDDLLDDDDLLLLLLLLLLLLLLLLLLLLLLLRUURUULDRRRRLDDRDRRUURRRUUULLLRRRUURRRDDULULLLLLDRRRDRLDRRLLDLLLLLLLLLUUA 21 -beard3 811 RRRRULULRRURRURRRLDDSLDDLDLDDLLLUULDDDDA 22 -beard4 677 LLRDDDDDDRRLLDDLLLLLLLLA 23 - 24 - 1 +contest1 212! 2 +contest2 273? 3 +contest3 275! 4 +contest4 561? 5 +contest5 1281? 6 +contest6 737 7 +contest7 867? 8 +contest8 1245 9 +contest9 3042? 10 +contest10 2076 11 +flood1 569 12 +flood2 141 13 +flood3 802 14 +flood4 970 15 +flood5 561? 16 +trampoline1 291 17 +trampoline2 1728? 18 +trampoline3 698 19 +beard1 856? 20 +beard2 2792 21 +beard3 811 22 +beard4 677
Modified src/solver.d from [b38729b48307e77e] to [dde2fe1d85562c17].
335 335 { 336 336 int bp = max(0, (cast(int)plan.length)-10); 337 337 Game g = ini.clone(); 338 338 for(int i=0; i<bp; ++i) g.command(plan[i]); 339 339 340 340 Tuple!(string,long) cand = tuple(plan, unmod); 341 341 for(int i=bp; i<plan.length; ++i) { 342 - foreach(char c; "UDLR") 343 - if(c != plan[i]) { 342 + foreach(string c; ["U","D","L","R","UD","DU","LR","RL"]) 343 + if(c[0] != plan[i]) { 344 344 Tuple!(string,long) zz = try_plan(c, g); 345 345 if(cand[1]<zz[1]) 346 346 cand = tuple(plan[0..i]~c~zz[0], zz[1]); 347 347 } 348 348 g.command(plan[i]); 349 349 } 350 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 355 Game gg = g.clone(); 356 - gg.command(c); 356 + foreach(cc;c)gg.command(cc); 357 357 Tuple!(Solver, string) x = run_sub_solver(gg); 358 358 return tuple(x[1], x[0].g.score); 359 359 } 360 360 361 361 char single_step() { 362 362 if(plan.empty) 363 363 return 'A';