~ubuntu-branches/ubuntu/saucy/freecell-solver/saucy

« back to all changes in this revision

Viewing changes to scripts/run-bakers-game-atomic-moves-seq.bash

  • Committer: Package Import Robot
  • Author(s): Gergely Risko
  • Date: 2012-06-22 10:08:05 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120622100805-evoda1ccdr8vt5xr
Tags: 3.12.0-1
New upstream version. (closes: #675262)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
GAME="bakers_game"
 
4
 
 
5
RESULTS_DIR="$GAME-results/"
 
6
 
 
7
START="${1//,/}"
 
8
shift
 
9
END="${1//,/}"
 
10
shift
 
11
 
 
12
MAX_ITERS='10,000,000'
 
13
 
 
14
mkdir -p "$RESULTS_DIR"
 
15
 
 
16
seq "$START" "$END" |
 
17
    perl -ne "printf (qq{$RESULTS_DIR/%09d.sol\\n}, \$_)" |
 
18
    xargs grep -l '^I could not solve this' |
 
19
    perl -lpe 's/\D//g;s/\A0+//' |
 
20
(while read DEAL ; do
 
21
    echo "${DEAL}:"
 
22
    ./board_gen/make_pysol_freecell_board.py "$DEAL" "$GAME" |
 
23
        ./fc-solve --game "$GAME" -l "toons-for-twenty-somethings" -mi "${MAX_ITERS//,/}" -p -t -sam > \
 
24
        "$(printf "%s/%09d.atomic.sol" "$RESULTS_DIR" "$DEAL")"
 
25
done) | tee -a total_dump.atomic.txt
 
26