Skip to content

Commit

Permalink
Merge pull request #24 from miguel-ambrona/ambrona@verbose
Browse files Browse the repository at this point in the history
Add support for [--verbose] flag
  • Loading branch information
miguel-ambrona authored Jan 8, 2024
2 parents 58a0b4e + 869406b commit 68f7faa
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 13 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ nsols 1

- You can disable the progress bar with `--no-progress-bar`.

- You can use flag `--verbose` to get a more detailed output.

## Feedback

Please, open an issue if you have any suggestions.
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ get-retractor:
cd ../lib/retractor && eval `(opam env)` && dune build

test:
cat ../test/test-vectors.txt | python3 deadpos.py --no-progress-bar > /tmp/test-vectors.out
cat ../test/test-vectors.txt | python3 deadpos.py --verbose --no-progress-bar > /tmp/test-vectors.out
diff ../test/test-vectors.out /tmp/test-vectors.out

pdb-tests:
cat ../test/PDB.txt | grep -v Slow | python3 deadpos.py --no-progress-bar > /tmp/PDB.out
cat ../test/PDB.txt | grep -v Slow | python3 deadpos.py --verbose --no-progress-bar > /tmp/PDB.out
diff ../test/PDB.out /tmp/PDB.out

promote-tests:
Expand Down
20 changes: 14 additions & 6 deletions src/deadpos.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
import time
from solver import is_dead, is_legal, retract

PBAR_ARG = ["--progress-bar"] if not "--no-progress-bar" in sys.argv else []
VERBOSE = "--verbose" in sys.argv
SOLVER_ARGS = ["--progress-bar"] if not "--no-progress-bar" in sys.argv else []
SOLVER_ARGS = ["--verbose"] + SOLVER_ARGS if VERBOSE else SOLVER_ARGS

CPP_SOLVER = Popen(["./solver.exe"] + PBAR_ARG, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
CPP_SOLVER = Popen(["./solver.exe"] + SOLVER_ARGS, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
CPP_SOLVER.stdout.readline().strip().decode("utf-8")

PYTHON_SOLVER = Popen(["./solver.py"] + PBAR_ARG, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
PYTHON_SOLVER = Popen(["./solver.py"] + SOLVER_ARGS, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
PYTHON_SOLVER.stdout.readline().strip().decode("utf-8")

class Position:
Expand Down Expand Up @@ -138,7 +140,7 @@ def set_ep(fen, ep):
return new_fens

def solver_call(cmd, pos, progress_bar):
global CPP_SOLVER, PYTHON_SOLVER
global CPP_SOLVER, PYTHON_SOLVER, VERBOSE

solver = CPP_SOLVER if "#" in cmd or "--fast" in sys.argv else PYTHON_SOLVER
if len(pos.info) > 0:
Expand All @@ -151,6 +153,9 @@ def solver_call(cmd, pos, progress_bar):
nb_solutions = 0
while True:
output = solver.stdout.readline().strip().decode("utf-8")
if VERBOSE and "invalid" in output:
msg = " ".join(pos.info + [""]) + output[8:] + " " + chr(215)
print(msg.ljust(80))
if "solution" in output:
variation = output.split("solution")[1].strip()
if "(" in cmd:
Expand Down Expand Up @@ -302,7 +307,9 @@ def process_cmd(positions, cmd):
return ([], n)

def main():
print("Deadpos Analyzer version 2.1")
print("Deadpos Analyzer version 2.2")

global VERBOSE

while True:
try:
Expand All @@ -327,7 +334,8 @@ def main():
fen += " ?" * (5 - nb_tokens) + " 1"
cmds = [w.strip() for w in words[1:]]

positions = [Position(fen) for fen in complete_fen(fen)]
check_legality = not VERBOSE or cmds[0] not in ["retract", "r"]
positions = [Position(fen, [], check_legality) for fen in complete_fen(fen)]
n = len(positions)

for cmd in cmds:
Expand Down
11 changes: 8 additions & 3 deletions src/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def is_legal(fen, depth = 1):
def key_fen(fen):
return " ".join(fen.split(" ")[:4])

def cooperative_search(progress_bar, goal, board, n, solution, Table):
def cooperative_search(progress_bar, goal, board, n, solution, Table, verbose):
depth = len(solution)
dead = is_dead(board.fen())
stalemate = board.is_stalemate()
Expand All @@ -109,6 +109,8 @@ def cooperative_search(progress_bar, goal, board, n, solution, Table):
return 1

if n <= 0 or len(legal_moves) == 0 or dead:
if verbose and dead and n > 0:
print("invalid", " ".join([str(m) for m in solution]), "DP")
return 0

fen_id = key_fen(board.fen())
Expand All @@ -120,7 +122,7 @@ def cooperative_search(progress_bar, goal, board, n, solution, Table):

for m in legal_moves:
board.push(m)
cnt += cooperative_search(progress_bar, goal, board, n - 1, solution[:] + [m], Table)
cnt += cooperative_search(progress_bar, goal, board, n - 1, solution[:] + [m], Table, verbose)
board.pop()

Table[fen_id] = (n, cnt)
Expand Down Expand Up @@ -149,5 +151,8 @@ def cooperative_search(progress_bar, goal, board, n, solution, Table):
(goal, n_str) = (DRAW, command[3:])

n = int(2 * float(n_str))
nsols = cooperative_search("--progress-bar" in sys.argv, goal, board, n, [], {})

pbar = "--progress-bar" in sys.argv
verbose = "--verbose" in sys.argv and goal == STALEMATE
nsols = cooperative_search(pbar, goal, board, n, [], {}, verbose)
print("nsols", nsols)
230 changes: 229 additions & 1 deletion test/PDB.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Deadpos Analyzer version 2.1
Deadpos Analyzer version 2.2
// deadpos problems from PDB (https://pdb.dieschwalbe.de):
// cpluscomment='deadpos'
// 3 long cooked ones are commented out: 31, 32, 33
Expand All @@ -12,14 +12,229 @@ nsols 1
>>> k7/8/2K5/8/8/8/8/8 ? >>= turn
b
nsols 1
>>> k7/8/2K5/8/8/8/8/8 ? >>= r
8/k7/2K5/8/8/8/8/8 b - - ? 0 (dead) a7a8
1k6/8/2K5/8/8/8/8/8 b - - ? 0 (dead) b8a8
Q7/k7/2K5/8/8/8/8/8 b - - ? 0 (dead) a7xQa8
R7/k7/2K5/8/8/8/8/8 b - - ? 0 (dead) a7xRa8
B7/k7/2K5/8/8/8/8/8 b - - ? 0 (dead) a7xBa8
N7/k7/2K5/8/8/8/8/8 b - - ? 0 (dead) a7xNa8
Qk6/8/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xQa8
Rk6/8/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xRa8
Bk6/8/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xBa8
Nk6/8/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xNa8
k7/3K4/8/8/8/8/8/8 w - - ? 1 (dead) d7c6
k7/8/8/3K4/8/8/8/8 w - - ? 1 (dead) d5c6
k7/8/8/1K6/8/8/8/8 w - - ? 1 (dead) b5c6
k7/2K5/8/8/8/8/8/8 w - - ? 1 (illegal) c7c6
k7/8/8/2K5/8/8/8/8 w - - ? 1 (dead) c5c6
k7/8/3K4/8/8/8/8/8 w - - ? 1 (dead) d6c6
k7/8/1K6/8/8/8/8/8 w - - ? 1 (illegal) b6c6
k7/3K4/2p5/8/8/8/8/8 w - - ? 1 d7xPc6
k7/3K4/2q5/8/8/8/8/8 w - - ? 1 d7xQc6
k7/3K4/2r5/8/8/8/8/8 w - - ? 1 d7xRc6
k7/3K4/2b5/8/8/8/8/8 w - - ? 1 (dead) d7xBc6
k7/3K4/2n5/8/8/8/8/8 w - - ? 1 (dead) d7xNc6
k7/8/2p5/3K4/8/8/8/8 w - - ? 1 d5xPc6
k7/8/2q5/3K4/8/8/8/8 w - - ? 1 d5xQc6
k7/8/2r5/3K4/8/8/8/8 w - - ? 1 d5xRc6
k7/8/2b5/3K4/8/8/8/8 w - - ? 1 (dead) d5xBc6
k7/8/2n5/3K4/8/8/8/8 w - - ? 1 (dead) d5xNc6
k7/8/2p5/1K6/8/8/8/8 w - - ? 1 b5xPc6
k7/8/2q5/1K6/8/8/8/8 w - - ? 1 b5xQc6
k7/8/2r5/1K6/8/8/8/8 w - - ? 1 b5xRc6
k7/8/2b5/1K6/8/8/8/8 w - - ? 1 (dead) b5xBc6
k7/8/2n5/1K6/8/8/8/8 w - - ? 1 (dead) b5xNc6
k7/2K5/2p5/8/8/8/8/8 w - - ? 1 c7xPc6
k7/2K5/2q5/8/8/8/8/8 w - - ? 1 c7xQc6
k7/2K5/2r5/8/8/8/8/8 w - - ? 1 c7xRc6
k7/2K5/2b5/8/8/8/8/8 w - - ? 1 (dead) c7xBc6
k7/2K5/2n5/8/8/8/8/8 w - - ? 1 (dead) c7xNc6
k7/8/2p5/2K5/8/8/8/8 w - - ? 1 c5xPc6
k7/8/2q5/2K5/8/8/8/8 w - - ? 1 c5xQc6
k7/8/2r5/2K5/8/8/8/8 w - - ? 1 c5xRc6
k7/8/2b5/2K5/8/8/8/8 w - - ? 1 (dead) c5xBc6
k7/8/2n5/2K5/8/8/8/8 w - - ? 1 (dead) c5xNc6
k7/8/2pK4/8/8/8/8/8 w - - ? 1 d6xPc6
k7/8/2qK4/8/8/8/8/8 w - - ? 1 d6xQc6
k7/8/2rK4/8/8/8/8/8 w - - ? 1 d6xRc6
k7/8/2bK4/8/8/8/8/8 w - - ? 1 (dead) d6xBc6
k7/8/2nK4/8/8/8/8/8 w - - ? 1 (dead) d6xNc6
k7/8/1Kp5/8/8/8/8/8 w - - ? 1 b6xPc6
k7/8/1Kq5/8/8/8/8/8 w - - ? 1 b6xQc6
k7/8/1Kr5/8/8/8/8/8 w - - ? 1 b6xRc6
k7/8/1Kb5/8/8/8/8/8 w - - ? 1 (dead) b6xBc6
k7/8/1Kn5/8/8/8/8/8 w - - ? 1 (dead) b6xNc6
nsols 21
// 5 - P1001036 Andrew Buchanan 2 Retros mailing list 24/01/2001
>>> k7/N7/2K5/8/8/8/8/8 ? >>= turn
b
nsols 1
>>> k7/N7/2K5/8/8/8/8/8 ? >>= r
1k6/N7/2K5/8/8/8/8/8 b - - ? 0 (dead) b8a8
Qk6/N7/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xQa8
Rk6/N7/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xRa8
Bk6/N7/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xBa8
Nk6/N7/2K5/8/8/8/8/8 b - - ? 0 (dead) b8xNa8
k7/N2K4/8/8/8/8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c8xNc7
kB6/2p5/2K5/2N5/8/8/8/8 w - - ? 1 c6xPc7
kB6/2q5/2K5/2N5/8/8/8/8 w - - ? 1 c6xQc7
kB6/2r5/2K5/2N5/8/8/8/8 w - - ? 1 c6xRc7
kB6/2b5/2K5/2N5/8/8/8/8 w - - ? 1 c6xBc7
kB6/2n5/2K5/2N5/8/8/8/8 w - - ? 1 c6xNc7
kB6/2pK4/8/2N5/8/8/8/8 w - - ? 1 d7xPc7
kB6/2qK4/8/2N5/8/8/8/8 w - - ? 1 d7xQc7
kB6/2rK4/8/2N5/8/8/8/8 w - - ? 1 d7xRc7
kB6/2bK4/8/2N5/8/8/8/8 w - - ? 1 d7xBc7
kB6/2nK4/8/2N5/8/8/8/8 w - - ? 1 d7xNc7
k7/B1K5/8/2N5/8/8/8/8 w - - ? 1 (illegal) a7b8
kq6/B1K5/8/2N5/8/8/8/8 w - - ? 1 a7xQb8
kr6/B1K5/8/2N5/8/8/8/8 w - - ? 1 a7xRb8
kb6/B1K5/8/2N5/8/8/8/8 w - - ? 1 (illegal) a7xBb8
kn6/B1K5/8/2N5/8/8/8/8 w - - ? 1 a7xNb8
kq6/P1K5/8/2N5/8/8/8/8 w - - ? 1 a7xQb8prom
kr6/P1K5/8/2N5/8/8/8/8 w - - ? 1 a7xRb8prom
kb6/P1K5/8/2N5/8/8/8/8 w - - ? 1 (illegal) a7xBb8prom
kn6/P1K5/8/2N5/8/8/8/8 w - - ? 1 a7xNb8prom
nsols 86
// 7 - P1001038 Andrew Buchanan 4v Retros mailing list 21/01/2001
>>> 8/7Q/8/4BB2/2PP1P2/3NkN2/PP2P1P1/4K2R w >>= castling
K
Expand All @@ -31,6 +246,12 @@ nsols 1
8/7Q/8/4BB2/2PPkP2/3NRN2/PP2P1P1/4K2R b K - ? 0 (illegal) e4xRe3
8/7Q/8/4BB2/2PPkP2/3NBN2/PP2P1P1/4K2R b K - ? 0 e4xBe3
8/7Q/8/4BB2/2PPkP2/3NNN2/PP2P1P1/4K2R b K - ? 0 e4xNe3
8/7Q/8/4BB2/2PPkP2/3N1N2/PP2P1P1/4K2R b - - ? 0 (dead) e4e3
8/7Q/8/4BB2/2PPkP2/3NPN2/PP2P1P1/4K2R b - - ? 0 (dead) e4xPe3
8/7Q/8/4BB2/2PPkP2/3NQN2/PP2P1P1/4K2R b - - ? 0 (illegal) e4xQe3
8/7Q/8/4BB2/2PPkP2/3NRN2/PP2P1P1/4K2R b - - ? 0 (illegal) e4xRe3
8/7Q/8/4BB2/2PPkP2/3NBN2/PP2P1P1/4K2R b - - ? 0 (dead) e4xBe3
8/7Q/8/4BB2/2PPkP2/3NNN2/PP2P1P1/4K2R b - - ? 0 (dead) e4xNe3
nsols 4
>>> 8/7Q/8/4BB2/2PP1P2/3NkN2/PP2P1P1/4K2R w >>= #2
e1g1 ... #
Expand Down Expand Up @@ -172,15 +393,22 @@ nsols 1
// 35 - P1324769 Andrey Frolkin & Per Olin 3v2 Problemas 13, p. 331, 1/2016
// 36 - P1338362 Andrew Buchanan 2 Problemas 18, p. 487, 04/2017
>>> 8/5p2/5P2/8/1p6/kP2pp2/1pKpP3/3B4 w >>= r >>= h=1
e4f3ep then b2b1q DP ×
e4f3ep then b2b1r c2b1 stalemate
e4f3ep then b2b1b DP ×
e4f3ep then b2b1n DP ×
nsols 1
// 37 - P1345823 Andrew Buchanan 6 Problemas 20, p. 553, 10/2017 Article 15
>>> 8/p7/8/P2p4/Pp1p4/kP1Pp3/p1KpP3/NQ1B4 ? >>= legal
8/p7/8/P2p4/Pp1p4/kP1Pp3/p1KpP3/NQ1B4 w - - ? 1
8/p7/8/P2p4/Pp1p4/kP1Pp3/p1KpP3/NQ1B4 b - - ? 1
nsols 2
>>> 8/p7/8/P2p4/Pp1p4/kP1Pp3/p1KpP3/NQ1B4 w >>= h=1.5
b1a2 DP ×
a5a6 a2b1q DP ×
a5a6 a2b1r c2b1 stalemate
a5a6 a2b1b DP ×
a5a6 a2b1n DP ×
nsols 1
// 38 - P1368543 Per Olin & Andrew Buchanan Springaren 149, p. 4, 03/2019
// 39 - P1404973 Per Olin Springaren 2021 Commendation Springaren Summer Competition 2021 c cooked & how about D?
Expand Down
Loading

0 comments on commit 68f7faa

Please sign in to comment.