Live data from Hacker News

Ask HN: Where to start on creating AI for games?

news.ycombinator.com

1–10 of 49 posts

Ask HN: Where to start on creating AI for games?

#1
Hello, I've been interested in AI creating for a while. I'd be most likely interested in bot making (for casual/learning purposes only, really). How does one start doing that?

I do have knowledge of programming but not really sure how to grasp the whole concept.

Interested in concepts of how AI works in games such as Starcraft (I suppose, Warcraft too), Hearthstone (and other card games), Counter-Strike work. While I guess the FPS AI (at least the official bots) are not as fair as it might see - they're probably rigged to fail at some point just like chess engines are when are presumably playing in lower ELO.

Are there any books, tutorials, challenges that would be a great starter for me?

Re: Ask HN: Where to start on creating AI for games?

#4
Learning the A* pathfinding algorithm is a good starting point as this is common in simple tile games. These two links should get you started:

[1]: http://www.raywenderlich.com/4946/introduction-to-a-pathfind...

[2]: http://theory.stanford.edu/~amitp/GameProgramming/

Re: Ask HN: Where to start on creating AI for games?

#7
I've personally did a school project some years ago writing an AI for Transport Tycoon Deluxe, at the time it was a straightforward api; IDK about tthe current status. At the time though, I quite enjoyed it, also because of the subject matter. Linky: https://wiki.openttd.org/AI:Main_Page

Re: Ask HN: Where to start on creating AI for games?

#8
To create a good (i.e. actually useful) bot you want to start by spending a lot of time in whatever game you're targeting.

Most bots, or trivial helpers like macros, are written by the players that have spent a lot of time in a game and identified the elements most worthy of automation. The player's lack of in-depth technical knowledge then leads to the mass of crappy bots out there.

If you're coming from the opposite side, i.e. you have technological knowledge but don't know where to start, all you're missing is domain knowledge of an individual game or genre to figure out what you actually want to build.

Edit: it's also worth noting that game AI and bots are pretty different problems.

Re: Ask HN: Where to start on creating AI for games?

#9
Not exactly AI, but the Processing language has a 'flocking' tutorial: https://processing.org/examples/flocking.html. There's also a version in ProcessingJS: http://processingjs.org/learning/topic/flocking/

And, from HN a few days ago, Red Blog games has some awesome, in-depth explanations of game-related programming: http://www.redblobgames.com/pathfinding/tower-defense/

Post reply on HN