- Home /
AI (Prolog) programming on Unity
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?
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
http://www.thefreecountry.com/documentation/onlineprolog.shtml
http://www.allisons.org/ll/Logic/
prolog in C# http://sourceforge.net/projects/cs-prolog/
http://www.dcs.ed.ac.uk/home/jjc/psharp/psharp-1.1.3/dlpsharp.html
ebook
http://www.freebookzone.com/fetch.php?bkcls=misc&bkidx=3
http://www.freebookzone.com/fetch.php?bkcls=pl_other&bkidx=75
http://www.freebookzone.com/fetch.php?bkcls=misc&bkidx=34
A Star (A*) example
http://www.pedroleonardo.com/blog/?p=119
http://www.unifycommunity.com/wiki/index.php?title=WaypointMaster
http://www.policyalmanac.org/games/aStarTutorial.htm
http://code.google.com/p/a-star-example/downloads/list
Behave http://angryant.com/
Aron Granberg's pathfinding http://www.arongranberg.com/unity/a-pathfinding/
unity fps tutorial (includes a working enemy with simple AI implemented) http://unity3d.com/support/resources/tutorials/fps-tutorial-part1
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
Your answer
![](https://koobas.hobune.stream/wayback/20220613084910im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
A* or AStar Pathfinding doesnt work for me? 0 Answers
A* (AStar) Pathfinding Issue - Path not spawning instantly 0 Answers
How to implement A* to have an AI trying to reach the player 2 Answers
A* Pathfinding project with mecanim animation 0 Answers
[Arongranberg A * Pathfinding Project] How to move units without overlaping of them? 1 Answer