Lecture 7&8 Flashcards

1
Q

What are steering behaviours?

A

Make AIs move semi naturally around an environment. No pathing or anything, just reacting to local information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the seek steering behaviour?

A

Steers character towards a specified position

Aligns the velocity of the character with the direction to the target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the flee steering behaviour?

A

Same as seek, but away from target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the arrival steering behaviour?

A

Same as seek, but decelerating as it reaches the target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the wander steering behaviour?

A

Random steering

Two imaginary circles in front of agent

Big circle is wandering strength

Little circle is wandering rate

Changes destination to random point on big circle within little circle every N frames

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the pursuit steering behaviour?

A

Same as seek but with a moving target.

Try to predict where target will be

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the evade steering behaviour?

A

Same as flee, but with moving target.

Try to maximise distance from predicted target position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What needs to be constructed to do path finding?

A

Graph of nodes (points) that represent the environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the dis/advantages of hexagonal grids over rectangular grids?

A

Hexagonal - more natural movement, but harder to implement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

HOw does dijkstra’s algorithm work?

A

Keep track of distance travelled so far

Expand the next node that will increase the cost by the least

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does A* work?

A

Dijkstra + heuristic for cost to reach end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an admissible heuristic?

A

One that never overestimates the cost

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between Manhattan, Euclidean and Chebyshev distance?

A

Manhattan - counts diagonals as 2

Euclidean - absolute distance

Chebyshev - counts diagonals as 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In 4 way connectivity, manhattan distance is

A) Admissible

b) not admissible

what about 8 way?

A

4 way admissible

8 way not admissible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The lower h(n), the

more

less

nodes A* will expand

A

More

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a navmesh?

A

models traversable areas of a map using triangles usually

17
Q

Pros/cons of navmeshes

A

pros: Shorter more natural paths, can ignore static and dynamic obstacles, requires less nodes, pathing isnot zigzag
cons: Not as efficient as grid/wp, procedural generation doesnt work too well, time consuming to make manually

18
Q

What are areas in unity navmeshes?

A

SOme places like snow or mud can be assigned a higher cost of traversal

19
Q

What must be added to an object to do pathfinding in unity?

A

Navmesh agent

20
Q

how can an obstacle be added in unity

A

Add a NavMesh Obstacle component to an object

21
Q

What methods does PlayerPrefs have?

A

float GetFloat(string key, float devVal=0.0f) / SetFloat(string key, float val)

int GetInt(string key, int defVal = 0) / SetInt(string key, int val)

string GetString(string key, string defVal = “”) / SetString(string key, string val)

bool HasKey(string key), void DeleteKey(string key), void DeleteAll()

void Save()

22
Q

How to make a gameobject not be destroyed when loading a new scene?

A

public static void DontDestroyONLoad(Object target)

23
Q

What is the difference between flexible and hard-coded FSMs?

A

Flexible - classes and interfaces as components

Hard-coded - all logic part of the code itself

24
Q

What is an avatar?

A

Asset created by unity when a 3d humanoid is imported. binds model to the animator