Skip to content

binairo

Aliases: takuzu

📖 Rule Reference: Read full rules on external site


Input Format

1. Header Line [ROWS] [COLS]

2. Grid Lines (Remaining [ROW] lines) The initial state of the grid rows.

Legend: * -: Empty / no clue. * w: White circle (given). * b: Black circle (given).

Output Format

Returns the solved grid as a matrix of characters, [ROWS] lines x [COLS] chars.

Legend: * w: White circle. * b: Black circle.

Examples

Python Quick Start

Use the following code to solve this puzzle directly:

import puzzlekit

# Raw input data
problem_str = """
8 8
- - - - b - - -
- - w b - w - w
- w - - - - - -
- w b - w - w b
- - b - - - - -
- w - - - - b b
b - - - w w - -
- - b - - - w b
"""

# Solve
res = puzzlekit.solve(problem_str, puzzle_type="binairo")

# Print solution grid
print(res.solution_data.get('solution_grid', []))

# Visualize (optional)
res.show()

Solution Output

8 8
w b b w b b w w
w b w b b w b w
b w w b w w b b
b w b w w b w b
w b b w b b w w
b w w b w w b b
b b w b w w b w
w w b w b b w b