Lecture 9 Flashcards
What is decision making?
The ability of a character to decide what to do
What is the difference between internal knowledge and external knowledge for a decision maker?
Internal: Character’s internal state (health, goals, etc.)
External: Information from the game environment (position of other entities, level layout etc.)
What is the output of a decision maker?
An action request
What is the difference between external changes and internal changes?
External: movement, animations
Internal: Beliefs, change in goals
What is a decision tree made up of?
Nodes
How does a decision tree work?
Each node has boolean condition and two children
Start at root node and proceed down tree making choices until a leaf node is encountered
Leaf node contains action
Can the same action be in multiple leaves?
Yes
Decisions can be ______________ to reflect AND or OR clauses
Put into series
What is the difference between binary and n-ary trees?
Binary: two children
N-ary: n children
N-ary marginally more efficient but less easily optimised.
When is a tree balanced?
If there are approximately the same number of leaves on each branch
What is the benefit of having a balanced tree
Guarantees that selecting an action will be performed in O(log2(n)) time
Unbalanced can be as bad as O(n)
When writing a decision tree, the most commonly used checks should be placed
a) close to the rood
b) close to the leaves
a) close to the root
How can a directed acyclic graph be produced?
What do you need to be careful of?
Allow certain nodes to be accessed by multiple branches
Don’t create infinite loops
What elements does an FSM have?
Finite set of states - wif FSM is in same state it will keep performing same action
Initial state
Finite set of transitions between states - triggered by internal or external events
What is a hierarchical state machine?
FSM that groups states belonging to the same context in a higher level state