top of page

Week Three

Introduction:

This week we have been learning about the various decision making processes the AI is involved in. We have covered decision trees, finite state machines, hierarchical state machines, fuzzy logic, goal-orientated behaviour, supervised learning and a couple more. In addition, we have learnt about different scenarios that some of these techniques could be applied to.

The lab for this week focused on us producing decision trees, finite state machine and considering techniques to be used in our assignment.

Decision Trees:

Decision Trees are modular which makes them fast and easy to implement and understand. They are primarily used for character and animation controls. Typically, decision trees are binary (two possible choices per decision) which makes them CPU efficient. On the other hand, decision trees are limited by the knowledge that the developer provides the AI. It is difficult for the developer to account for all scenarios that the decisions can cause, which can lead to bad decision making.

Lab:

As seen in the image on the right, a number of scenarios are not accounted for which can lead to open ended scenarios. For example, the decision tree dictates that if the bot has lower health than the intruder, instead of taking a healing potion, it should run. does not account for what the AI should do if the intruder is defeated.

weaknesses

Finite State Machine:

Finite State Machines (FSM) are made up of a specific number of states which are triggered by events. For example, a guard's idle state is to patrol the area, if an intruder is heard, he enters the Search state. It is one of the most commonly used decision making techniques in games today. However, problems might occur as the guard might not be able to go from attack state to search state if the intruder is lost out of sight for example. This might result in rigid behaviour (one second the guard is chasing, the next he is wandering). Consequently, the FSM would have to be expanded to account for this, which can result in a rapid growth of transitions and states.

To execute this FSM, the same environmental information would be collected to simulate the AI ‘senses’. A timer would be implemented to monitor the patrol and search states. When enters a search state, if an intruder is not seen within two minutes, the guard chooses a random direction to patrol in. The AI would also need to choose how to alert other guards. These could include shouting in a large radius for help, sounding an alarm bell or luring the intruder towards other guards.

Hierarchical State Machine:

Hierarchical State Machine (HSM) is typically used to expand upon certain states in FSM models. These changes can provide more variety to character behaviour. For example, a guard’s attack moves might be assigned a certain value. For example, the guard might have a set of actions to choose from when in attack mode. Each of those actions are given a probability that an action will be taken. At random, the action is taken and executed at run-time. It creates a dynamic AI behaviour.

Coursework:

The perfect decision making solution for my assignment could be the use of hierarchical state machine and the use of A* pathfinding algorithm. One of the ideas I have for the game is to allow the guard to block when in attack mode. To do this, the guard has a probability to successfully block an incoming hit. The hierarchical state machine would be implemented, where each action will have an attached probability to perform an action.

References:

1. Millington, I. and Funge, J., 2012. Artificial intelligence for games. CRC Press.


Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Archive
Search By Tags
No tags yet.
Follow US
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page