File: Iterate-on-Seed.bash

package info (click to toggle)
freecell-solver 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,332 kB
  • sloc: ansic: 29,493; perl: 8,911; xml: 5,162; python: 1,124; sh: 777; ruby: 358; cpp: 304; makefile: 150
file content (19 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

board_num=17760
iters_limit=23000000
board_file="$board_num.board"

if ! test -e "$board_file" ; then
    pi-make-microsoft-freecell-board -t "$board_num" > "$board_file"
fi

let seed=1
while true ; do
    echo "Checking seed $seed"
    if ./fc-solve --freecells-num 2 --method random-dfs -to '[01ABCDEF]' -seed "$seed" -mi "$iters_limit" "$board_file" | grep -P '^This game is solveable' ; then
        echo "Seed '$seed' is successful."
        exit 0
    fi
    let seed++
done