File: Iterate-on-Seed.bash

package info (click to toggle)
freecell-solver 3.26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,864 kB
  • ctags: 3,658
  • sloc: ansic: 34,721; perl: 12,320; xml: 5,999; python: 1,149; sh: 965; ruby: 347; cpp: 304; makefile: 151
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