|
While sipping a frosty beverage and taking a well-deserved break
from my backyard chores, I had the good fortune to observe several
squirrels scurrying about trying to collect the peanuts my wife had
thrown out earlier in the day. As they dashed about singlemindedly,
the seeds of the current POTM began to germinate. The result, my
friends, is:
NUTS: THE FIRST "DOUBLE" POTM
Deadline November 30th, 2004
THE SHORT PROBLEM STATEMENT
You are a squirrel. You start on the center square of a grid and their
are some number of nuts scattered about on other squares of the grid.
You scurry about the grid and collect nuts ... your mission is complete
when all the nuts are gone.
POTM NUMBER ONE
You are alone on the grid - you can move horizontally, vertically, or
diagonally within the grid. Your mission is to collect all the nuts
in the fewest number of "moves".
POTM NUMBER TWO
You and all the other POTM contestants begin at once. First squirrel
to a nut gets the nut. If more than one squirrel arrives on the same
move, they split the nut evenly amongst them. The contest is over
when all the nuts have been "grabbed" by one or more squirrels. Your
mission this time is to collect the most nuts.
HOW IT WORKS, IN A "NUTSHELL"
(Sorry - couldn't resist the bad pun!)
You'll write a program that will make one "move". You will use the same
program to compete in both POTMs, but you may use different algorithms
if you wish. As input you'll
be presented with the current state of the playing grid and be asked
for a single move on output. On the grid will be marked the position
of all remaining nuts, your current position, and the number of
squirrels in each of the grid squares. Your output will be
the square position to which you wish to move, one square away from
where you are.
Your single program will compete in both POTMs defined above.
If it sounds interesting, sign up using the menu on the left
and start watching the forums
for more details, current standings, how to submit your entry, and
much discussion among the jolly band of POTM participants!
|