Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

7
How do you make AI wander about in a realistic manner?
Post Body

There are of course a ton of tutorials available online about AI of enemies in games. Generally these don't go any deeper than simple state behaviours where (usually enemy) NPCs either stand still or chase the player in a straight path.

I want to create AI for animals that wander about, eat some food, flee from the player, etc. And this has to look like natural behaviour.

I was thinking about creating different states for the AI in which they look for or run away from different 'targets' depending on their needs. That's not that difficult to implement. Where I start to have trouble is when I want their movement to look realistic, i.e. random but not too random. If we move about we don't move in a single direction which randomly changes every couple of seconds.

Do you have any experience with programming a wandering AI in this way? If so, do you have any advice for me?

Author
Account Strength
0%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
51,018
Link Karma
11,975
Comment Karma
38,321
Profile updated: 6 months ago
Posts updated: 8 months ago
Programmer

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago