Making enemies follow the player, find the best route (pathfinding) and other kinds of behaviour can be done with known algorithms like genetic algorithms, A* (A star), flowshop, etc, usually using prolog.
Is there a way to use prolog programmation to make AIs on Unity?
vote up if the info was useful
Answer by Bravini
Nov 29, 2010 at 02:35 AM
It is possible using a compiler and a prolog program, such as P# and other (references below).
Some material to make better artificial intelligence and example codes:
guide to prolog programming
prolog in C#
A Star (A*) example
Aron Granberg's pathfinding
unity fps tutorial (includes a working enemy with simple AI implemented)
Just want to point out the the Unity FPS tutorial doesn't actually have A* implemented, the robots attack on sight and walks to random waypoints, they don't use pathfinding.
technically it have no heuristics, but the code is enough to cover most of the regular questions, as the robot walks to the closer node, also the status are well defined and easy to understand and modify, so anyway I changed the above text to be more precise
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
How to implement A* to have an AI trying to reach the player
How to use A* pathfinding for a large map?
A* or AStar Pathfinding doesnt work for me?
Can i use A* pathfinding on planes?