Algorithms, heuristics and hacks

'A complex AI doesnt matter if a simple one gives the challenge and fun that you need.' - TheHappieCat July 15 2016
https://www.youtube.com/watch?v=nEnNtiumgII

Dishonored is a first person stealth role playing game in which you take control of the main character named Corvo Attano. Stealth games need to have strong AI systems to give a real feeling of immersion to the player that anything above a whisper or straying too close to an area not covered in shadow or descending from a rooftop at an unfortunate time could lead to being hunted by an entire city watch and a bloody death. The AI in dishonoured uses algorithms and heuristics as a result since the player has many options of approach, so using algorithms to patrol specific areas of the environment also being alerted if the player isn’t not behind cover or in sufficient darkness or being attracted by a gunshot or explosion as well as dead bodies.

'some problems are hard and you may not be able to get an acceptable solution in an acceptable time. In such cases you often can get a not too bad solution much faster, by applying some arbitrary choices (educated guesses): that's a heuristic.' -https://stackoverflow.com/questions/2334225/what-is-the-difference-between-a-heuristic-and-an-algorithm

Heuristics comes more into effect with the pathing since the player can climb buildings and there is often multiple ways of doing so, having non player characters struggle to give chase by getting stuck or taking ages to decide the best path up. Heuristics will alter the algorithm of the NPC to find either a better solution. Some games these days that if they can’t find a suitable solution to getting stuck or not finding a path they’ll teleport to an open space or in the vicinity of the player such games include Skyrim and GTA 5. GTA 5 for example when you drive around running either NPC’s or other players over you can park on top of them which means they can’t get up, after a specific amount of time or lack of pathing the NPC or player will teleport to a suitable area in the environment. Skyrim has a similar solution in which an NPC might get stuck on or in a table and if it can’t find a path it will also teleport.

"Cheat wherever you can. A.I.s are handicapped. They need to cheat from time to time if they're going to close the gap... Never get caught cheating. Nothing ruins the illusion of a good A.I. like seeing how they're cheating." - Jonny Ebert, lead designer of Dawn of War 2 on video game A.I http://tvtropes.org/pmwiki/pmwiki.php/Main/TheComputerIsACheatingBastard

AI hacks are often a result of poor AI design and often used as a way to increase difficulty, such as AI having resources they shouldn’t have or knowing your build order so it can instantly counter your units or actions this can be found in real time strategy games such as star craft and age of empires. Age of empires would monitor the resources and actions of the player and if it started falling behind on resource nodes such as mines for gold or stone it would cheat and give itself a resource boost.

Star craft 2 can have an AI that utilizes graphical APIs to take rapid pictures of the game and react to what it sees so it keeps track of its resource quantity and if it has enough to build a unit or building. A modder then altered the AI so it’s now capable of making 500 decisions per minute or around 2000 APM (actions per minute) in a match. The best players in the world have around 300 actions per minute.


Image result for algorithms in video games

Comments