A Java program that solves the IQ Puzzler Pro puzzle using a brute-force backtracking algorithm. Given a board size and a set of shaped blocks, it finds an arrangement where all spaces are filled.
Built for IF2211 (Algorithm Strategy) at STEI ITB.
- Reads board layout and block shapes from a text file
- Solves using brute-force backtracking
- Displays the solution with ANSI color-coded blocks in the terminal
- Saves the solution as both a
.txtfile and a.pngimage
- Java 8 or higher
java -jar bin/BruteforceIQ.jarFollow the prompts to enter the path to your input file.
N M P
MODE
BOARD DATA (for CUSTOM mode only)
BLOCK DATA
| Field | Description |
|---|---|
N M P |
Board dimensions and number of blocks |
MODE |
DEFAULT, CUSTOM, or PYRAMID |
BOARD DATA |
Only required for CUSTOM mode |
BLOCK DATA |
Shape representations of each block |
3 3 3
DEFAULT
A
AA
A
B
BB
C
C
If a solution is found, the program prints the completed board and asks whether to save it. If saved:
- Text file:
filename_solution.txt - Image file:
filename_solution.png
Darrel Adinarya Sunanda 13523061 — @Darsua
MIT