Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IQ Puzzler Pro Solver

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.


Features

  • 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 .txt file and a .png image

Requirements

  • Java 8 or higher

Usage

java -jar bin/BruteforceIQ.jar

Follow the prompts to enter the path to your input file.


Input File Format

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

Example Input

3 3 3
DEFAULT
A  
AA
A
 B
BB
C
C

Output

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

Author

Darrel Adinarya Sunanda 13523061@Darsua


License

MIT

About

This program solves the IQ Puzzler Pro puzzle using a brute force algorithm

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages