I'm doing a simple roguelike. I plan on doing an AI system through a need-based system; hate, fear, love, necessities, etc. However, if the monster can't find what it wants in it's FOV, then it should go wandering.
I know I can do pathfinding through A*. However, this would find the shortest path from A->B. My original idea was that: (in some, weird kind of pseudocode)
if(cannot see anything interesting){endpoint = random(point on map);pathfind_to(endpoint);}else{interact(in some way);}
But the way my dungeon generates (pretty badly, with a lot of straight corridors and stuff), this would almost certainly lead to monsters going backwards and forwards across the same corridors.
I had an idea that the monster should wander semi-aimlessly to that point, but not straight to it.
First off, is this just a stupid idea? Would it give a signifcant difference to just doing shortest path to a random point, rinse and repeat?
Is there any algorithm that creates a path from A->B, but not the shortest route?
Thank you for your time, especially if I've been talking BS. :P
-Mark.
EDIT: I'm starting to doubt this existing, or it being effective if it does. Googling it returns this post as top result. :P