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 post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
A* or AStar Pathfinding doesnt work for me?
Move RigidBody with translate
Splitting scene into nodes for A*
A* PathFinding Radius sphere
[Arongranberg A * Pathfinding Project] How to move units without overlaping of them?