O no! You were bitten by a snake! Your hit points are slowly depleting… health potions(Alternately some plant you need…or something like that) spawn “randomly” on the map (This could be done in a smart way to avoid clumps etc)… and you are given an array of them with coordinates.
Using only up,down,left,right commands you need to go to each in a fairly intelligent way so that you can get enough before you die.
After a certain number are collected your HP stops depleting.
So it’s a general traveling salesman problem, the difficulty could be adjusted by how much health you start with, other things on the map, or how fast you loose health. It could be as simple as go to each in turn by finding the distance to each using the Pythagorean theorem and go to the closest one to something requiring a better algorithm because the potions are arranged in such a way that some would be left behind using that simple algorithm.
Is it worth trying to implement? Should I make an easy or hard version?