Artificial Intellegence

The Study of AI in computers has spanned many decades and is a very important topic when it comes to designing a good video game.I would like to discuss the History of AI taking a look at how it was used in the earliest games, and observe what methods stuck right up to present day, and what was left behind. and then speculate on what the future may have in store.The Obvious starting point for our journey is the iconic "Pac-man" which was a truly noble and tremendous leap forward in the study of AI. Not only did the game implement a pathfinding algorithm such as A* or BFS (most modern approaches would use A* due to efficiency and simplicity) but each different ghost had its own method of traversal. This is truly incredible considering how new of a field game development was, and for a true understanding of how much effort was put into these behaviours Jamey Pittman provides this incredible explanation A* is a pathfinding algorithm used by most modern games that breaks your game world into a graph, plots Nodes on every potential traversal point, gives the nodes a weight value and then finds the smallest weighted sum from point A to point B.it does this using 2 functionsthe past cost which you know from adding the previous weighted traversals up to your current nodeand a heuristic estimate of the remaining traversals. such that if Heuristic x <= node[i] +heuristic Y, where i is incremented to hit every node and then the values are compared to see which is smallest.here is a gif I always see to help explain how it works and it is a nice visual explanation if my words didn't make much senseAstarluckily for programmers path finding was one of the first issues solved, and everything else up until pretty recent was considerably easier to calculate.Seek and Flee are great examples that you see in any open world game, and they are so easy to calculateseek = (destination-currentPos)*velocity,oh you want flee? slap a '-' for negative on the velocity and you're good to go.of course alone these algorithms are not very interesting. if your world has obstacles you would want to blend path finding with seeking,another cool combination is of seek and flee which will create the repulsion behavior:if (withinCertainRadius){seek;} else flee;eventually the if statement (or if you prefer Switch... but I am saying if for the sake of scripting) became pivotal in creating more realistic AI.as programers got more clever they made different states for their NPCsenemies would just wander around or walk back and forth until they satisfied the conditions of my "withinCertainRadius" function which could even be modified to fit a cone shape so the AI actually had to turn their head to spot you and change behaviors accordingly.my favourite example will always be the stupid knights guarding Hyrule Castle. clearly very stupid AI but in a way it was necessary so the early game challenge wasn't too difficult.http://www.youtube.com/watch?v=jG6qVl7zmboEventually it became impossible for a Human to lose against a Computer in Chess,**and this tactical AI knowledge transferred over to games like starcraft and warcraft which could observe the surroundings and make "Intelligent" decisions (really just accessing the triggered state laid out by the programmer) based on the game board/map.the natural progressions of seek and flee were to create steering behaviors which added to the realism, as well as pursue.steering had the AI face the player while moving and curve smoothly if you ran the other way instead of just instantly changing direction.**EDIT: I stand corrected. apparently we haven't been beat yet here is a great resource for understanding the many different types of AI and what type of math/programming goes behind them.with modern games using more and more "brain states" to make seemingly intelligent decisions, and with voice recognition technology becoming a tiny bit better(a few years of experience working at onstar tells me its not quite there yet) it is not impossible to see a future where a computer may one day pass the turing test.While it may be a very long time before we see a blade runner-esque robot intelligence it is cool to think that video games is one of the leading fields that drives and inspires more discoveries to be made every day. Scientist Ray Kurzweil describes and predicts a future where not only will a computer pass the Turing test, but they will one day have the capability to think intelligently about their own programming and "fix" themselves to be more efficient and better. maybe he isn't wrong

Previous
Previous

The Legend of the Mask

Next
Next

Dramatic Elements in Games