Ask HN: Where to start on creating AI for games?
11–20 of 49 posts
Re: Ask HN: Where to start on creating AI for games?
#12Re: Ask HN: Where to start on creating AI for games?
#13This is a very broad topic because it can range from everything from 2D to 3D and different genre games.
I read and enjoyed this one. I would recommend it to start: http://www.amazon.com/Behavioral-Mathematics-Game-AI-Applied...
It covers basics like game theory and goes into some of the mathematics and some code examples.
Here are some good slides from Valve on how they did Left For Dead http://www.valvesoftware.com/publications/2009/ai_systems_of...
Good luck, have fun
Re: Ask HN: Where to start on creating AI for games?
#14http://codecombat.com/ may be a good starting point for writing simple AI logic.
I'd also add that while everyone suggesting AI resources is helpful, the best thing to do is just jump in and start coding. One of the problems with our formal education system is that it often ends up trying to present solutions to problems before the students actually understand the problems, resulting in students that learn fairly superficial understandings of the solution that the brain naturally ends up garbage-collecting. Just code things for a couple of weeks. You should notice you're sort of hitting a wall around that time. You should notice that you see behaviors in your opponents that you do not currently know how to implement. That is the time to start cracking into the AI texts and learning from those who preceded you, and everything will tend to make total sense why you'd want to do that, instead of being these abstract thoughts floating in space that tend to go in one ear and out the other.
(I am convinced, incidentally, that this is why people can so confidently proclaim the uselessness of a degree in computer science to programming; what is taught is incredibly useful, but trying to jam it in for four years before finally turning you out into the real world to actually encounter the problems you've supposedly been learning the solutions to is a terrible way to go about learning. Take advantage of the ease of just hiking out into the coding wilderness and encountering these problems yourself before trying to learn their solutions. It is something the other engineering disciplines would kill to be able to do!)
Re: Ask HN: Where to start on creating AI for games?
#15If you want to interface with games, I would highly recommend looking at Innerspace (company was named Lavish something). My knowledge is from 10 years ago, it might be discontinued though (I'm not botting anymore).
edit : oh btw if someone at Blizzard read this, I would totally pay for 10 accounts on a botting friendly WOW server. I can always dream ;-)
edit 2 : yup they are still in business : http://www.lavishsoft.com/
Re: Ask HN: Where to start on creating AI for games?
#16Learning 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?
#17First, and the most critical to most games, is basic behavioral AI. This includes things like pathfinding, locating targets, attacking, and otherwise making an entity in the game interact with the environment in the game.
Second, you've got the more abstract parts, the "high-level decisionmaking". This is the AI's strategies and tactics, such as communicating with other AI, coordinating with squad members to circle an enemy, deciding when to change weapons or throw a grenade or pull back to reload, etc. In most cases, developers put in many crude heuristics here either because they don't have time to think of anything better, or for performance reasons. This will look like "if known nearby enemies > 2 and ammo Third, bot creation (for the usual "hacker" version/meaning of the term, as in e.g. bots used by AFK players to farm) is significantly different than making an "official" AI as a developer or writing a replacement AI using available scripting in some games. For most games, bots will involve various hack techniques for retrieving information about the game world (occasionall literally involving visual pattern recognition, which is a whole other ball of yarn (and separate type of "AI") you don't want to mess with just yet). Bots will also usually involve indirect control of the game character by using some third-party program to "send" keys to the game using OS functionality. This is probably not what you're interested in, and you'd need to learn at least some basics of the first two to be able to achieve anything here.
One thing that was rather popular a while ago is to just dive into a game like Robocode[1] and work up your way until you can code one robot that will on its own beat various competition-grade robots without user input to adjust for the opponent's strategies.
Re: Ask HN: Where to start on creating AI for games?
#18Re: Ask HN: Where to start on creating AI for games?
#192. Download the Unreal Tournament project[2]
3. Examine the bot code and start tweaking
[1] https://www.unrealengine.com/
[2] http://www.unrealtournament.com/
Unreal is an industry-grade game engine that is also quite accessible. AI can be scripted in Blueprint (a visual dataflow scripting language) or C++.
Unreal Tournament 2014 is 100% crowdsourced. If you own the Unreal engine you can download, play it, modify it and - if your modifications are good enough - feed them back in to the game itself. The community is apparently very welcoming.
Re: Ask HN: Where to start on creating AI for games?
#20http://www.gamedev.net/page/resources/_/technical/artificial...
I highly recommend this book