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?
2. 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.
I'd say it's easier to learn than Unity at this point, but harder than 2D engines like GameMaker. I think some basic experience making simple 2D games will help a lot before the transition to 3D.
If you're already familiar with Javascript and you want to start making games at a lower level you could try the PhaserJS framework.
First, 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 < 20%, find safe point to fall back, reload". The developer thought up this quick rule of thumb and told the AI to do this, without having to code the AI with the intelligence and information the developer used when making up this rule of thumb.
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.
The developers of this botting program would then expose their own API and scripting language that would allow other developers to interact with the game through their program. The could then write scripts such as: Go to this location via map coordinates, pick up some object, solve a puzzle, fight some boss, eat when below a certain health, etc.
Note: I used to run a VPS company that would specifically cater to those that were botting in Runescape; this allowed them to run their bots 24/7 without using their own hardware.
It's worth noting that these were very easy identifiable as bots by behavior. Making AI for a game (that actually seems human and is fun to interact with, past just target selection and pathfinding) is another (much more difficult) set of problems entirely.
[1]: http://www.raywenderlich.com/4946/introduction-to-a-pathfind...
The projects are the very best part of this course. You start with a blank slate PacMan agent trying to pick up dots to something able to track & dodge ghosts without even seeing them (!). It's what inspired me to continue AI research 7 years down the road!
[1]: http://inst.eecs.berkeley.edu/~cs188/fa11/lectures.html
As for AI (in general, not only for games) - AFAIK nowadays most serious work is done in non-symbolic, statistics/stochastic direction (including all the Big Data and ML stuff)... So what do you think about pure symbolic AI? Is there any research/advancements done in this part? I know I'm oversimplifying it, but I think you got the point... :)
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!)
I'd modify that slightly: skim (an hour per chapter? something like that) one or more comprehensive books (for this subject, Russell and Norvig is good) enough to get some idea what is known, then jump in and hack seriously, then interrupt your hacking when appropriate by going back to study the particularly relevant stuff that you know is already known. Jumping in is good and important, but it tends to be a lot more efficient when you have some idea about the outlines of what has already been worked out for you.
The times I haven't been able to follow this advice --- notably not having physical access to university libraries when I was trying to write a C compiler for a Z-80 as a teen back in the 1980s, hence having no very practical way to learn about existing work on parsers and stuff --- have been better than nothing, interesting and educational but not as efficient as doing stuff when I had a lot of stuff to study as needed.
Incidentally, a similar strategy can be very helpful for formal study of nontrivial subjects, e.g. various college-level engineering courses. Skim the text, and maybe another text from the library too, and/or an online Wikipedia-level survey/tutorial/whatever before the course starts. Then you have a much better chance of seeing how things fit together and of finding ways to clarify things you're puzzled by.
If anything bots are tougher to make then "normal" AI since their value is measured by their performance against humans. Also the less you cheat (perfect knowledge of the other players, perfect aim, etc) the better your bot. Having a non-cheating bot beat a human is a major achievement.
The bots for a strategy game like StarCraft is fundamentally different than the bot for an FPS. They use completely different techniques and it's much harder to cheat in strategy game (though ignoring the fog of war is the most egregious). Strategy game AI is more akin to chess AI - lots of search (minimax and stuff). It's a whole field onto itself and you can only learn by studying the AI for that type of particular game.
FPS bots (like counter strike) are much closer to traditional game AI (shooters and such). Books on "Game AI" are a good place to start. Basically the two major problems is where should I go (evaluating cover, analyzing line of sight, estimating where enemies are and trying to pick a good place to stand) and how to I get there (pathfinding and pathfollowing). What you do when you get there is generally pretty straightforward (shooting at the appropriate guy). If you have a cover system you need to be able to tell them how to use cover and this involves a lot of animation (syncing my animations and position up to the cover in the world). But in an FPS this is usually just a question of crouching or not.
The big difference for FPS bots (versus single player enemy AI) is that bots need to choose between conflicting goals (should I go get ammo, should I go get health, should I attack the enemy). If you have a strict hierarchy of behaviours your bots won't be competitive (enter fuzzy logic systems, utility theory and the like - normal behaviour trees won't cut it).
Have fun!
(for some categories of games!)
I'm almost nitpicking here, but it's important to understand the distinction where when trying to build "human-like" AI that players feel are like the real thing, you also want to emulate human shortcomings. Sometimes it might not be cheating per the rules, but still be obviously outside the realm of current human capabilities.
e.g.: An AI opponent with perfect arithmetical abilities in a game like Scorched Earth: http://en.wikipedia.org/wiki/Scorched_Earth_(video_game)
This 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
A little pricey, but my favorite intro book for this subject.
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.
"The AI Challenge is all about creating artificial intelligence, whether you are a beginning programmer or an expert. Using one of the easy-to-use starter kits, you will create a computer program (in any language) that controls a colony of ants which fight against other colonies for domination."
http://www.gamedev.net/page/resources/_/technical/artificial...
I highly recommend this book
Those four strategies in combination, along with some global behaviors for pathfinding and behavior modes, are often enough to defeat an unaware player. (search: "Pac-Man dossier")
This introduces the concept of strategic archetypes. Human players have them, too. I, for instance, often favor stealthy sniper strategies. The various strategic archetypes often have a complex relationship web from who tends to defeat whom. The player that always tries to do an early rush to overwhelm slower opponents before they can mount a defense may be easily defeated by a trap-and-decoy opponent, whereas that player may lose to a gather-intel-then-send-ninjas player.
To create a competitive AI, first identify how humans play the game, identify the strategic archetypes, then model your bot to pursue archetypal goals. Then, most importantly, determine when to switch archetypes. An early rusher AI has no strategy for midgame or endgame, so perhaps that AI evolves into aggressive expansion, or an ambusher.
But also remember that the point of the game is for the humans to have fun. Avoid cheating, or overusing a game-breaking strategy. Your bot won't care if it loses, but a human may ragequit if he loses to a bot with a perceived unfair advantage.
Of course, there are some games with no human players. There's the "rock paper scissors programming competition" (rpscontest.com), where players submit algorithms, who then fight each other to the death for rank points. It is interesting to see new strategies rise and fall, including those who win by "cheating", such as by manipulating the match-generating program itself, setting the opponent's random seed, examining the opponent's heap or stack, or causing the opponent to be improperly disqualified for cheating.
If 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/
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/
[2] http://igg.me/at/screeps/x/9209812 (affiliate link, is that allowed? otherwise: https://www.indiegogo.com/projects/screeps).
http://www.amazon.com/Programming-Example-Wordware-Developer...
Our final project was super cool. We got into groups. Then each group modified the AI of the soccer team in the book. Then we had a tournament to see who's team was the best. Winning the tournament was one of my prouder moments at school.
It's open to non-MIT students, as well.
They also offer lectures in January which will be streamed on twich.tv - these may be of some interest to you, even if you decide not to compete.
[1] http://www.amazon.com/Artificial-Intelligence-Games-Ian-Mill...
A much bigger challenge would be an AI that is able to walk an avatar in Secondlife. First perhaps easy walk on the roads in mainland, later walk on arbitrary land, and the real challenge is walk inside buildings. A cat bot that does not fall into the lake, might even be a good seller.
There are a lot of "handson" examples there from real existing games (with code) and interviews with game developers.
Step 1: int result = rand(100); switch (result) { //... do something simple }
Step 2:
Watch the AI until something dumb happens, improve the logic.
This will get you familiar with game AI as a topic. Then you want to take on RTS and FPS games, which are similar but have deadlines (frame rates) and more complexity in the environment. But it's important to get the basics down before taking on a complicated game.