Hi all I'm making a game that needs AI that is similar to an RTS AI( starcraft, warcraft, etc. ) I am building the game in monogame and was wondering if anyone knew of a good AI library I could use or where to start implementing my own. What design pattern do I use?
Looking for an AI library or help on which design pattern to use
Crossbones+ - Reputation: 13897
Posted 28 January 2014 - 12:22 PM
I don't think you are going to find an AI library that can do what you want. There are libraries that do things like pathfinding, but when it comes to deciding whether to train another soldier or save a little money to get a tank, you are going to have to roll your own.
Game AI is not a small field, so be ready to spend some time learning about it. If you want to get started, there are good suggestions in the sticky at the top of this forum: http://www.gamedev.net/topic/592473-recommended-ai-books-and-sites/
Members - Reputation: 135
Posted 29 January 2014 - 05:21 PM
Typically the AI unit in RTS does not need too deep of planning since its lifespan is relatively short. Look into utility agent. Define all tasks the unit can perform (e.g. gather resource, attack enemy, heal teammate, etc), and schedule each and every available task to evaluate its own utility score on the same interval. The one that returns the highest utility score is the task the unit to take.