Java - PuzzleManiac - Space

Space Checking

The Coroutining algorithm is far from perfect. Often it places a brick on the board cutting off a field of free spaces. These gaps must be filled with one or more bricks to solve the puzzle.This isn't always possibly because the gap is sometimes too small to contain even one brick.
To solve this often occurring problem we equip the Coroutining algorithm with a test and rename it. Thus the Space Checking algorithm is born.
So what's this new test all about?? It looks for a free space. Then it looks for a free field around this free space. This free field consist of free spaces laying next to one another. in this free field should be placed at least one of the remaining bricks. Thus we count the number of free spaces within the free field and compare it to the number of cubes in the smallest brick. This test is much more efficient altough it isn't perfect yet. Want to see perfection? Look here.
So why is the Friend Space algorithm in here then? You don't want to know!

Demonstration


This page contains nice Java applets, but your browser is to stupid to display them... Go and get a new one !!!



The algorithm is written in Prolog by H. Vandecasteele.

Project verslag

PuzzleManiac page

Home