

The deadline for submissions is March 1st, so still plenty of time.Ĭ: 414298141056 draws found in about 5 2.5 minutes. The code or a github/bitbucket link to the code.

If applicable, your program must compile within 1 minute on the hardware mentioned above (to avoid compiler optimization abuse) No bonus points for coming up with a solution that also works with other board sizes.
HALMA BOARD GAME AGAINST AI CODE IN JAVA PRO
To determine the winner, I will run every single solution with a reported running time of less than 30m on a MacBook Pro 2,5 GHz Intel Core i7 with 16 GB RAM. The winner is the one with the most optimal solution in terms of CPU running time. Mathematical simplifications of the problem are allowed, but must be explained and proven (manually) in your solution. You may only use information of the rules of the game that have been deduced manually (no computer assisted proof). The solution must be a program that calculates and outputs the total number of end positions that are draws. How many of those end positions are draws? Rules The total number of possible end positions is 16!, about 20 trillion. The picture above shows a finished game, there is a four in a row because of 4 square pieces. The goal is to make four in a row, either horizontally, vertically or along the 2 diagonals, for any of the four characteristics! So 4 black pieces, 4 white pieces, 4 tall pieces, 4 short pieces, 4 square pieces, 4 circular pieces, 4 hollow pieces or 4 solid pieces. Each piece has 4 binary characteristics (short/tall, black/white, square/circular, hollow/solid). Every turn each player places 1 piece on the board. It is played on a 4 by 4 board with 16 unique pieces (no pieces are duplicated). I came up with it because I was playing a deceivingly simple board game and couldn't come up with an efficient solution to answer a simple question about its mechanics. This challenge is similar to Project Euler problems.
