Applying Blackboard Systems to First Person Shooters
-
Upload
hbbalfred -
Category
Technology
-
view
771 -
download
4
Transcript of Applying Blackboard Systems to First Person Shooters
![Page 1: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/1.jpg)
Applying Blackboard Systems to First Person Shooters
Jeff OrkinMonolith Productionshttp://www.jorkin.com
![Page 2: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/2.jpg)
No One Lives Forever 2:A Spy in H.A.R.M.’s Way
aka NOLF2
A.I. Systems re-used:– TRON 2.0– Contract J.A.C.K.
![Page 3: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/3.jpg)
No One Lives Forever 2:A Spy in H.A.R.M.’s Way
![Page 4: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/4.jpg)
Agenda
Blackboards are wicked cool. What is a blackboard? Inter-agent coordination Intra-agent coordination
![Page 5: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/5.jpg)
What if there was an architecture that…
…was simple to implement. …was flexible & maintainable. …handled coordinated behavior:
– Coordinated timing of behaviors.– Coordinated pathfinding.– Coordinated tactics.
![Page 6: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/6.jpg)
But wait! There’s more!
…simplifies agent architecture. …reduces code bloat. …facilitates AI LOD system. …facilitates variations, re-use, and sharing. …allows complex reasoning.
![Page 7: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/7.jpg)
Blackboards: the magical animal
Homer: “What about bacon?”Lisa: “No!”
Homer: “Ham?”Lisa: “No!”
Homer: “Pork chops?!?”Lisa: “Dad! Those all come from the same animal!”
Homer: “Yeah right Lisa. A wonderful magical animal.”
![Page 8: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/8.jpg)
What is a blackboard?
![Page 9: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/9.jpg)
A blackboard is a metaphor
Physical blackboard– Publicly read/writeable.– Possibly organized.
Maybe more like a bulletin board– Post requests and information.– Respond to items of interest.
![Page 10: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/10.jpg)
A blackboard is shared memory
Read/write memory Working memory Like a hard-drive Like a database No processing (other than sorting)
![Page 11: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/11.jpg)
A blackboard is a means of communication
Centralized communication Agents communicate Sub-systems of an agent communicate
![Page 12: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/12.jpg)
A blackboard is an architecture
Changes how agents and/or sub-systems interact
Like an interface Reduces coupling of sub-systems
![Page 13: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/13.jpg)
Blackboard implementation
There’s no wrong way to eat a blackboard.
Two flavors:– Static– Dynamic
![Page 14: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/14.jpg)
Static blackboards
class CBlackboard{ private: Vector m_vPos; Vector m_vVelocity; int m_nHealth; // etc…
public: // access functions…};
![Page 15: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/15.jpg)
Static blackboards (cont.)
Predetermined data to share. Static amount of data. Best for intra-agent coordination.
![Page 16: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/16.jpg)
Dynamic blackboards
struct BBRECORD { … };typedef std::vector<BBRECORD*> BBRECORD_LIST;
class CBlackboard{ private: BBRECORD_LIST m_lstBBRecords;
public: // query functions…};
![Page 17: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/17.jpg)
Dynamic blackboards (cont.)
struct BBRECORD{
ENUM_BBRECORD_TYPE eType;HANDLE hSubject;HANDLE hTarget;float fData;
};
![Page 18: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/18.jpg)
Dynamic blackboards (cont.)
enum ENUM_BBRECORD_TYPE{
kBB_Invalid = -1,kBB_Attacking,kBB_Crouching,kBB_NextDisappearTime,kBB_ReservedVolume,// etc…
};
![Page 19: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/19.jpg)
Dynamic blackboards (cont.)
// query functions
int CountRecords( ENUM_BBRECORD_TYPE eType );
int CountRecords( ENUM_BBRECORD_TYPE eType, HANDLE hTarget );
float GetRecordData( ENUM_BBRECORD_TYPE eType );
float GetRecordData( ENUM_BBRECORD_TYPE eType, HANDLE hTarget );
![Page 20: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/20.jpg)
Dynamic blackboards (cont.)
Data to share is not predetermined. Dynamic amount of data. Best for inter-agent coordination. Also useful for intra-agent complex reasoning.
![Page 21: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/21.jpg)
Inter-agent Coordination
Using a blackboard to solve coordinationproblems on NOLF2.
![Page 22: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/22.jpg)
Inter-agent Coordination Problems
1. Agents doing the same thing at the same time.
2. Agents doing things too often.3. Special constraints for tactics.4. Agents take same paths.5. Agents clump at destinations.
![Page 23: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/23.jpg)
NOLF2 Blackboard
Add Records:– Enumerated type– Subject ID– Optional Target ID– Optional float data
Remove Records:– Specific by type and Subject ID– All by type
Replace Records
![Page 24: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/24.jpg)
NOLF2 Blackboard (cont.)
Query:– Count matching records– Retrieve data from matching records
![Page 25: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/25.jpg)
Problem #1: Agents doing same thing at same time
Examples: Soldiers Crouching
– Random chance of crouch
– Dodge roll into crouch– Crouch to get out of
firing line
Ninja Lunging
![Page 26: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/26.jpg)
Blackboard Solution: Agents doing same thing at same time
Should I crouch?
if( g_pAIBB->CountRecords( kBB_Crouching ) == 0 ){
// Crouch…
g_pAIBB->AddRecord( kBB_Crouching, m_hObject );}
![Page 27: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/27.jpg)
Problem #2: Agents doing things too often
Examples: Soldiers going Prone Ninja Disappear-Reappear Combat/Search sounds
![Page 28: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/28.jpg)
Blackboard Solution: Agents doing things too often
Should I go prone?
if( fCurTime > g_pAIBB->GetRecordFloat( kBB_NextProneTime ) )
{// Go prone…
g_pAIBB->ReplaceRecord( kBB_NextProneTime, m_hObject, fCurTime + fDelay );
}
![Page 29: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/29.jpg)
Problem #3: Tactical behavior has special constraints
Example: Ninja only attacks from a rooftop if two other ninja are
already attacking on ground, and no one is on a roof.
![Page 30: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/30.jpg)
Blackboard Solution: Tactical behavior has special constraints
Should I attack from the roof?
if( g_pAIBB->CountRecords( kBB_AttackingRoof, m_hTarget ) > 0 )
{return false;
}
![Page 31: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/31.jpg)
Blackboard Solution: Tactical behavior has special constraints (cont.)
if( g_pAIBB->CountRecords( kBB_Attacking, m_hTarget ) < 2 )
{return false;
}
// Attack from the roof…
g_pAIBB->AddRecord( kBB_Attacking, m_hObject, m_hTarget );
g_pAIBB->AddRecord( kBB_AttackingRoof, m_hObject, m_hTarget );
![Page 32: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/32.jpg)
Problem #4: Agents take same paths
Example: Player runs around the corner, and characters
follow in a congo line and get killed one by one.
![Page 33: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/33.jpg)
Problem #4: Agents take same paths (cont.)
NOLF2 AIVolume system:
![Page 34: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/34.jpg)
Problem #4: Agents take same paths (cont.)
NOLF2 AIVolume system:
![Page 35: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/35.jpg)
Problem #4: Agents take same paths (cont.)
NOLF2 AIVolume system:
P
AB
![Page 36: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/36.jpg)
Problem #4: Agents take same paths (cont.)
NOLF2 AIVolume system:
P
AB
![Page 37: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/37.jpg)
Problem #4: Agents take same paths (cont.)
NOLF2 AIVolume system:
P
AB
![Page 38: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/38.jpg)
Blackboard Solution: Agents take same paths
Volume reservation system: Reserve the Volume before the destination. Reserved Volume Cost == Cost + 500
![Page 39: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/39.jpg)
Blackboard Solution: Agents take same paths (cont.)
Volume reservation system:
P
AB6
1 1
1
1
1
1
1
1 1
![Page 40: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/40.jpg)
Blackboard Solution: Agents take same paths (cont.)
Volume reservation system:
P
AB6
1 1
1
1
1
1
1
1 1
P
AB6
1 1
1
1
1
1
1
1 1
![Page 41: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/41.jpg)
Blackboard Solution: Agents take same paths (cont.)
Volume reservation system:
P
AB6
1 1
1
1
1
1
1
1 1
P
AB6
1 5 0 1
1
1
1
1
1
1 1
R e s e r v e d !
![Page 42: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/42.jpg)
Blackboard Solution: Agents take same paths (cont.)
// Pathfinding
if( g_pAIBB->CountRecords( kBB_ReservedVolume, hVolume ) > 0 )
{fNodeCost += 500.f;
}
![Page 43: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/43.jpg)
Blackboard Solution: Agents take same paths (cont.)
// Movement
g_pAIBB->RemoveRecord( kBB_ReservedVolume, m_hObject );
g_pAIBB->AddRecord( kBB_ReservedVolume, m_hObject,
hVolume );
![Page 44: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/44.jpg)
Problem #5: Agents crowd at destination
Examples: Player knocks over a bottle. Characters
converge on bottle position. Characters discover dead body and converge.
![Page 45: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/45.jpg)
Blackboard Solution: Agents crowd at destination
First agent claims volume for investigation. Other agents stop at edge of volume.
![Page 46: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/46.jpg)
Blackboard Solution: Agents crowd at destination (cont.)
A
B
D
![Page 47: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/47.jpg)
Blackboard Solution: Agents crowd at destination (cont.)
A
B
D
A
B
D
![Page 48: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/48.jpg)
Blackboard Solution: Agents crowd at destination (cont.)
A
B
D
A
B
D
![Page 49: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/49.jpg)
Blackboard Solution: Agents crowd at destination (cont.)
// AI reached the dest volume first.
if( g_pAIBB->CountRecords( kBB_InvestigatingVolume, hVolume ) == 0 )
{g_pAIBB->AddRecord( kBB_InvestigatingVolume,
m_hObject );}
// AI did not reach the dest volume first.
else { // Look at dest. }
![Page 50: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/50.jpg)
Einstein says…
“Hang in there, we’re half-way done!”
![Page 51: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/51.jpg)
Why use blackboards??
![Page 52: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/52.jpg)
Why use blackboards??
“Less is more”: Less to debug Less to maintain Less to port Less to compile Less to document Less to learn Less data (per volume)
![Page 53: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/53.jpg)
Why use blackboards??
Decouple data from game-specific purpose: Designs change Re-use systems in other games (other
genres?) OO design is not always the right choice.
![Page 54: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/54.jpg)
What about performance?!
Problem: Pathfinder needs to look up Volume
Reservation status every iteration thru A*.
![Page 55: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/55.jpg)
What about performance?! (cont.)
Solution:A* flags arraychar astarFlags[NUM_VOLUMES]; enum ASTAR_FLAGS{
kNone = 0x00,kOpen = 0x01,kClosed = 0x02,
};
![Page 56: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/56.jpg)
What about performance?! (cont.)
Solution:A* flags arraychar astarFlags[NUM_VOLUMES]; enum ASTAR_FLAGS{
kNone = 0x00,kOpen = 0x01,kClosed = 0x02,kReserved = 0x04,
};
![Page 57: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/57.jpg)
What about performance?! (cont.)
RunAStar(){ClearFlags();Search();
}
![Page 58: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/58.jpg)
What about performance?! (cont.)
RunAStar(){ClearFlags();MarkReserved();Search();
}
![Page 59: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/59.jpg)
Intra-agent Coordination
![Page 60: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/60.jpg)
Intra-agent Coordination
A character is an entire world. Sub-systems are characters in the world.
– Navigation– Movement– Target/Attention selection– Senses– Animation– Weapons– Decision-Making
![Page 61: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/61.jpg)
NOLF2 Agent Architecture
A n i m a t i o n
N a v i g a t i o n
M o v e m e n t
S e n s o r y
T a r g e t S e l e c t i o n
W e a p o n s
D e c i s i o n - M a k i n g
![Page 62: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/62.jpg)
NOLF2 Agent Architecture
A n i m a t i o n
N a v i g a t i o n
M o v e m e n t
S e n s o r y
T a r g e t S e l e c t i o n
W e a p o n s
D e c i s i o n - M a k i n gA n i m a t i o n
N a v i g a t i o n
M o v e m e n t
S e n s o r y
T a r g e t S e l e c t i o n
W e a p o n s
D e c i s i o n - M a k i n g
![Page 63: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/63.jpg)
Blackboard Agent Architecture
A n i m a t i o n
N a v i g a t i o n
M o v e m e n t
S e n s o r y
T a r g e t S e l e c t i o n
W e a p o n s
D e c i s i o n - M a k i n gA n i m a t i o n
N a v i g a t i o n
M o v e m e n t
S e n s o r y
T a r g e t S e l e c t i o n
W e a p o n s
D e c i s i o n - M a k i n g
B l a c k b o a r d
![Page 64: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/64.jpg)
Blackboard Agent Architecture
class AgentBlackBoard{
private:Vector m_vDest;NAV_STATUS m_eNavStatus;HANDLE m_hTarget;AISenses m_aSenses[MAX_SENSES];// etc…
public:// Access functions…
}
![Page 65: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/65.jpg)
Benefits of Decoupling Sub-systems
Benefits of Decoupling:2. Development/Maintenance3. Flexibility4. Performance
![Page 66: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/66.jpg)
Benefit #1: Development/Maintenance Benefits
Problem: Difficult to upgrade or replace old systems. Example: Re-writing navigation system
![Page 67: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/67.jpg)
Benefit #1: Development/Maintenance (cont.)
Various calls to sub-system:
pAI->GetPathManager()->SetPath(vDest);
pAI->GetPathManager()->UpdatePath();
if( pAI->GetPathManager()->IsPathDone() )
...
AIVolume* GetNextVolume(AIVolume* pVolume, AIVolume::EnumVolumeTypeeVolumeType);
![Page 68: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/68.jpg)
Benefit #2: Flexibility
Problem: Different characters have
different needs. Example: Humans plan paths to a
dest. Rats and Rabbits wander
randomly to a dest.
![Page 69: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/69.jpg)
Benefit #2: Flexibility (cont.)
Example (cont.):
AIStatePatrol::Update( AI* pAI ){
pAI->GetPathManager()->SetPath(vDest);
if( pAI->GetPathManager()->IsPathComplete() ){
// etc…}
![Page 70: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/70.jpg)
Benefit #2: Flexibility (cont.)
Blackboard Solution:
AIStatePatrol::Update( AI* pAI ){
pAI->GetAIBlackboard()->SetDest(vDest);
if( pAI->GetAIBlackboard()->GetNavStatus() == kNavStatus_Done )
{// etc…
}
![Page 71: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/71.jpg)
Benefit #2: Flexibility (cont.)
Example: Humans need a lot of sensory information to
make complex goal-based decisions. Rats and Rabbits need very little info for
simplistic behavior.
![Page 72: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/72.jpg)
Benefit #2: Flexibility (cont.)
![Page 73: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/73.jpg)
Benefit #2: Flexibility (cont.)
F r i e n d ?
![Page 74: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/74.jpg)
Benefit #2: Flexibility (cont.)
![Page 75: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/75.jpg)
Benefit #3: Performance
Problem: All characters in NOLF2 are
active all of the time, regardless of player location.
Example: Characters are pathfinding,
moving, animating, and sensing as they work at desks, go to the bathroom, etc.
![Page 76: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/76.jpg)
Benefit #3: Performance (cont.)
Blackboard Solution: Sub-systems communicate through the
blackboard. LOD system swaps sub-systems behind the
scenes.
![Page 77: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/77.jpg)
Benefit #3: Performance (cont.)
LOD 5:
![Page 78: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/78.jpg)
Benefit #3: Performance (cont.)
LOD 5:
![Page 79: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/79.jpg)
Benefit #3: Performance (cont.)
LOD 5:
![Page 80: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/80.jpg)
Benefit #3: Performance (cont.)
LOD 2:
![Page 81: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/81.jpg)
Benefit #3: Performance (cont.)
LOD 2:
![Page 82: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/82.jpg)
Don’t run away…
We’re almost done!
![Page 83: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/83.jpg)
Intra-agent Dynamic Blackboard
MIT Media LabSynthetic Characters GroupC4
GDC 2001Creature Smarts: The Art and Architecture of theVirtual Brain
![Page 84: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/84.jpg)
Intra-agent Dynamic Blackboard (cont.)
![Page 85: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/85.jpg)
Intra-agent Dynamic Blackboard (cont.)
![Page 86: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/86.jpg)
Intra-agent Dynamic Blackboard (cont.)
Percept Memory Records: Only form of knowledge representation.
– Game objects (characters, objects of interest, etc)
– Desires– Damage– AI hints (AINodes, AIVolumes)– Tasks
Can group multiple records for same object.
![Page 87: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/87.jpg)
Intra-agent Dynamic Blackboard (cont.)
Benefits: Keep track of multiple types of information in a
consistent way. Open-ended architecture: different games may
use different data in different ways. Complex reasoning.
![Page 88: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/88.jpg)
Intra-agent Dynamic Blackboard:Complex Reasoning
Queries: “Is there food near me?” Find the “red object that is making the most
noise.” “Find an object that is humanoid-shaped and
go to it.”
![Page 89: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/89.jpg)
Intra-agent Dynamic Blackboard:Complex Reasoning (cont.)
Spatial Reasoning: Agent is more alarmed if multiple disturbances
are found near each other.
![Page 90: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/90.jpg)
Intra-agent Dynamic Blackboard:Complex Reasoning (cont.)
Temporal Reasoning: Anticipation and surprise.
![Page 91: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/91.jpg)
Intra-agent Dynamic Blackboard:Complex Reasoning (cont.)
Deductive Reasoning: Agent sees dead body. Agent sees player with a gun. Agent draws the conclusion that the player was
the killer.
![Page 92: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/92.jpg)
Intra-agent Dynamic Blackboard:Complex Reasoning (cont.)
Multi-tasking: Agent targets enemyA. Agent targets enemyB. Agent kills enemyB. Agent is aware that he
was also fighting enemyA.
![Page 93: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/93.jpg)
Take-away
Use blackboard systems!– Less is more.– Decouple your data from its game-specific purpose.– Decouple your subsystems.
![Page 94: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/94.jpg)
More Information
December 2003:AI Game Programming Wisdom 2“Simple Techniques for Coordinated Behavior”
![Page 95: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/95.jpg)
More Information
NOLF2 Source, Toolkit & SDK:http://nolf2.sierra.com( AICentralKnowledgeMgr == Blackboard )
Slides:http://www.jorkin.com/talks/UT_blackboards.zip
![Page 96: Applying Blackboard Systems to First Person Shooters](https://reader033.fdocuments.us/reader033/viewer/2022052602/559e1c621a28abdd5b8b4747/html5/thumbnails/96.jpg)
Questions?
NOLF2 Source, Toolkit & SDK:http://nolf2.sierra.com( AICentralKnowledgeMgr == Blackboard )
Slides:http://www.jorkin.com