I'll put my pseudocode here first, please advise regarding its validity according to real-world pedestrian motion, and how I can improve it.
Premise: A turtle walk from its spawn point to the goal. On the way, it meets other turtles. Turtles of the same color will be treated as a "buddy" and will go near it, simulating a "friends-walking-down-the-street" scenario. Turtles of the same color with nearer distance has higher priority, e.g. friend A is nearer than friend B so I will approach friend A first.
Upon approaching the goal, the turtle goes back to its spawn point.
Pseudocode:
determine if i am already in the goal
if yes,
determine if there are patches I can walk on
set eyes on nearest patch I can walk on (for the goal path)
if there is a friend nearby, approach friend
if there is no friend nearby, continue walking the goal path
if im already in the goal, respawn.
Advise for improvement please?