29/10/2018 - AI techniques and strategies + Fuzzy logic

Decision trees:
Every AI character will follow a decision tree, this tree will have a series of choices, for example if an AI enemy sees the player character they would then choose to attack, if they do not see the character they may have choices such as patrolling or guarding areas. These decisions change depending on the outcomes of player actions. They start from a singular command such as stand in a particular point and then the options will branch off in a tree form to have multiple options on how they would react.


Image result for decision tree AI
State machines: State machines give the AI character a finite amount of options determining how they would act, for example many AI controlled characters might have the actions of wander, attack, evade and find aid. Wander would be the AI wandering/patrolling a certain area not necessarily doing anything in particular but just wandering a certain area it has determined. Attack would be the AI stopping their wandering of the area to attack the player once it has detected them within the area it is patrolling/wandering, evade would be along the lines of the enemy AI receiving an amount of damage from the player that it deems to be too much and then running away from said player until they have had enough time to heal up. find aid would be the AI character healing or finding help after trying to evade the players damage  so that it can continue running away or try to once again fight.

Image result for state machine

Fuzzy logic blurs the line between set states and parameters, for example a level one enemy might have a maximum of 100 health and choose to run away when it reaches something along the lines of approximately 15. whereas a level 5 character might have significantly more health and choose to evade at a different point, fuzzy logic will use heuristic learning to learn how much damage is being dealt to the AI and how much more damage it can take and choose to run away of its own accord rather than going off of a player set variable, Some may stay and fight to the death some may choose to fight until they are at a certain percentage but what fuzzy logic will do is determine how much it can take and how much it is willing to take before it will try to evade the player.

Image result for i yield  skyrim

Strategies and tactics:
These decisions will often be used in conjunction with certain strategies and tactics as games will often have certain strategies that they have their NPC's try to execute, these will vary from actions such as flanking the player (moving around to try to attack from behind), using certain moves that will be highly effective against the character or even retreating to get more help. These will all be dependent on the scenario. Using the previous points will help them decide which tactic to try to employ.

Comments

Popular Posts