Hi,
I am assigned a project that will solve a game which is based on peg solitiare (Peg solitaire - Wikipedia, the free encyclopedia) but with some different rules. Instead of having a plus sign-like table, th program will get an input, n, and there will be n x n pegs placed like a square, there will be no hole in the middle of the board and there is no boundary around the pegs, board is infinite.. Our instructor suggested to use brute force.. My strategy was at first move, to ignore the symmetrics and rotations, just to focus one corner then build tree recursively. For the input 2 and 3 there is no problem but when I try 4 x 4 it takes almost a minute than terminates with a wrong return value. I suppose it is something related to memory, I mean the program allocates too much for all possibilities at every move... I would appreciate any suggestions about strategies to solve the game in more efficient ways. Thanks.