Limbic~Region has asked for the wisdom of the Perl Monks concerning the following question:
All,
Imagine that you have a N x N square and the object of the game is to black out the entire board in only 1 turn. The board starts out in an initial configuration with some pieces already on the board. Every time a row, column, or diagnol has N - 1 pieces in it you are allowed to place a piece in the empty position. Your turn is over when the board is blacked out or there are no more rows, columns, or diagnols that have N - 1 pieces in them.
Here is an example of a 3 x 3 grid
Imagine that you have a N x N square and the object of the game is to black out the entire board in only 1 turn. The board starts out in an initial configuration with some pieces already on the board. Every time a row, column, or diagnol has N - 1 pieces in it you are allowed to place a piece in the empty position. Your turn is over when the board is blacked out or there are no more rows, columns, or diagnols that have N - 1 pieces in them.
Here is an example of a 3 x 3 grid
The object of the game is to find the optimal starting position for any size board where the number of starting pieces is minimized but the board can be covered in only 1 turn. While a 3 x 3 is trivial, I am really hoping to solve it for a 10 x 10.X|_|_ X|_|X X|X|X X|X|X X|X|X X|X|X X|X|X _|X|_ -> _|X|_ -> _|X|_ -> X|X|_ -> X|X|X -> X|X|X -> X|X|X X| | X| | X| | X| | X| | X|X| X|X|X
I hope I have explained the idea well enough but if you have questions, please let me know. All solutions welcome to include brute force, golfed, and obfu.
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Challenge: Box Blackout (solved)
by tye (Sage) on Jan 24, 2006 at 00:43 UTC | |
by dragonchild (Archbishop) on Jan 24, 2006 at 15:52 UTC | |
Re: Challenge: Box Blackout
by ikegami (Patriarch) on Jan 24, 2006 at 05:51 UTC | |
Re: Challenge: Box Blackout
by traveler (Parson) on Jan 24, 2006 at 00:09 UTC | |
by loris (Hermit) on Jan 24, 2006 at 11:41 UTC | |
by traveler (Parson) on Jan 24, 2006 at 15:58 UTC | |
Re: Challenge: Box Blackout
by Roy Johnson (Monsignor) on Jan 24, 2006 at 15:58 UTC |
Back to
Seekers of Perl Wisdom