Decision making in Endless Space 2 Background Our Studio 40 20 - - PowerPoint PPT Presentation

decision making in endless space 2 background our studio
SMART_READER_LITE
LIVE PREVIEW

Decision making in Endless Space 2 Background Our Studio 40 20 - - PowerPoint PPT Presentation

Adrien Allard Florian Brulhart Sebastien Broussaud Decision making in Endless Space 2 Background Our Studio 40 20 Dev 30 Dev 60 Dev 12 Dev 2011 2012 2013 2014 2015 2016 2017 Our 4X Explore Amplitude touch Exploit Search points


slide-1
SLIDE 1

Adrien Allard Florian Brulhart Sebastien Broussaud

Decision making in Endless Space 2

slide-2
SLIDE 2

Background

slide-3
SLIDE 3

Our Studio

2011 2012 2013 2014 2015 2016 2017

12 Dev 20 Dev 30 Dev 40 60 Dev

slide-4
SLIDE 4

Our 4X

Explore

Search points of interest Discover the world Gather Intel

Expand

Increase territory Expand to new places

Exploit

Build / research Gather resources Optimize economy Fight in battles Unit management War management

Exterminate

Asymmetric factions Quests

Amplitude touch

Relation with players Evaluate deals

Diplomacy

slide-5
SLIDE 5

Post-mortem: Endless Legend

  • Decisions are difficult to control
  • AI doesn’t have global strategy
  • Diplomatic relations can seem

irrational

Control

  • Heuristic results are just numbers
  • No access to intermediate

reasons

  • Decision process is opaque

Understand Technical

  • Code is spread and duplicated
  • Code base is not incremental

friendly

  • Tools are too complex
slide-6
SLIDE 6

Objectives

  • High level control
  • Low level control
  • Handle each resource

differently

For design

  • Understand each decision
  • Understand resource

allocation

  • User friendly

For debugging For programming

  • Incremental
  • Allow different AI techniques
  • Isolate data refining from

decision

slide-7
SLIDE 7

Meet E.N.F.E.R.

slide-8
SLIDE 8

Process Overview

Game Sync Data Analysis Tasks generation Tasks allocation Execution

slide-9
SLIDE 9

Process Overview

Game Tasks generation Tasks allocation

slide-10
SLIDE 10

Tasks generation

slide-11
SLIDE 11

Situation

slide-12
SLIDE 12

Designer needs

Aaah, the Cravers are invading! The AI should definitely defend its system here!

slide-13
SLIDE 13

Goal

Defend system against enemies Defend System

slide-14
SLIDE 14

Designer needs

Hum ok … but how do you defend the system?

slide-15
SLIDE 15

Designer needs

Details, schmetails… erm... well… you know… it could build defenses or create ships.

slide-16
SLIDE 16

Tasks

Defend system against enemies Defend System Create ships Build defense

slide-17
SLIDE 17

Designer needs

Hum ok … but how does the AI decide which action to take?

slide-18
SLIDE 18

Designer needs

Well, we're talking about Cravers. Insectoid, psycho, warmachines. We need the best defense against them.

slide-19
SLIDE 19

Scoring

Defend system against enemies Defend System Create ships 0.4 Build defense 0.8

slide-20
SLIDE 20

Designer needs

Oh, but I forgot, it's that crappy system we stole from the Lumeris

  • earlier. The AI shouldn't prioritise it.
slide-21
SLIDE 21

Scoring

Defend system against enemies Defend System Create ships 0.4 Build defense 0.8

slide-22
SLIDE 22

Scoring

Defend system against enemies Defend System 0.5 Create ships 0.4 Build defense 0.8

slide-23
SLIDE 23

Scoring

Defend system against enemies Defend System 0.5 Create ships Build defense 0.2 0.4

slide-24
SLIDE 24

Designer needs

And one more thing! If the AI's planning a war against the Cravers in any case, ships should be preferred.

slide-25
SLIDE 25

Multiple reasons

Defend system against enemies Defend System 0.5 Create ships 0.2 Build defense 0.4

slide-26
SLIDE 26

Multiple reasons

Defend system against enemies Defend System 0.5 Create ships 0.2 Build defense 0.4 Attack Cravers 0.7 Improve military power to attack

slide-27
SLIDE 27

Multiple reasons

Defend system against enemies Defend System 0.5 Create ships Build defense 0.4 Attack Cravers 0.7 Improve military power to attack 0.5

slide-28
SLIDE 28

Multiple reasons

Defend system against enemies Defend System 0.5 Create ships Build defense 0.4 Attack Cravers 0.7 Improve military power to attack Reduce upkeep 0.9 0.5

slide-29
SLIDE 29

Multiple reasons

Defend system against enemies Defend System 0.5 Create ships Build defense 0.4 Attack Cravers 0.7 Improve military power to attack Reduce upkeep 0.9 0.3

slide-30
SLIDE 30

Associated tool

slide-31
SLIDE 31

Post-mortem

  • Ability to iterate before implementation
  • Force separation between each decision step
  • Improve decision debugging
  • Feedback decision chains
  • Understand decision at different granularity
slide-32
SLIDE 32

Tasks allocation

slide-33
SLIDE 33

Tasks allocation

  • Tasks in the game have costs
  • Can I afford this task?
  • Concurrence between tasks are due to shared resources

Build defense 0.3 Create ships 0.6

Context

slide-34
SLIDE 34

80

Tasks allocation

  • Tasks in the game have costs
  • Can I afford this task?
  • Concurrence between tasks are due to shared resources

100 Build defense 0.3 10 Create ships 0.6

Context

slide-35
SLIDE 35

Tasks allocation

  • Use motivation to split resources
  • Task motivation must be independent from the cost
  • Each resource has its own way of being split
  • Handle tasks with multiple resources

Objectives

80 100 Build defense 0.3 10 Create ships 0.6

slide-36
SLIDE 36

0/10

Tasks allocation

0/80 0/100 Build defense 0.3 Create ships 0.6

slide-37
SLIDE 37

0/10

Tasks allocation

0/80 0/100 Build defense 0.3 Create ships 0.6 100 allocator Stock:

slide-38
SLIDE 38

0/10 100/100

Tasks allocation

0/80 Build defense 0.3 Create ships 0.6 allocator Stock:

slide-39
SLIDE 39

0/10 100/100

Tasks allocation

0/80 Build defense 0.3 Create ships 0.6 allocator Stock:

slide-40
SLIDE 40

0/10 100/100

Tasks allocation

0/80 Build defense 0.3 Create ships 0.6 allocator Stock:

slide-41
SLIDE 41

0/10 100/100

Multiple resources

0/80 Build defense 0.3 Create ships 0.6

slide-42
SLIDE 42

0/10 100/100

Multiple resources

0/80 Build defense 0.3 allocator Stock: Create ships 0.6

slide-43
SLIDE 43

0/10 100/100

Multiple resources

0/80 Build defense 0.3 allocator Stock: Create ships 0.6

slide-44
SLIDE 44

0/10 100/100

Resource reallocation

0/80 Build defense 0.3 Create ships 0.6

slide-45
SLIDE 45

0/10 100/100

Resource reallocation

0/80 Build defense 0.3 Create ships 0.6 allocator Stock:

slide-46
SLIDE 46

0/10

Resource reallocation

0/80 0/100 Build defense 0.3 Create ships 0.6 allocator Stock: 100

slide-47
SLIDE 47

0/10

Resource reallocation

0/80 0/100 Build defense 0.3 Create ships 0.6 allocator Stock: 100

slide-48
SLIDE 48

80/80 0/10

Resource reallocation

0/100 Build defense 0.3 Create ships 0.6 allocator Stock: 20

slide-49
SLIDE 49

80/80 0/10

Validate tasks for execution

0/100 Build defense 0.3 Create ships 0.6

slide-50
SLIDE 50

Associated tool

slide-51
SLIDE 51

Post-mortem

  • Simplify the task generation by removing cost handling
  • Handle concurrence between tasks
  • Centralize allocation algorithms
  • Each resource behaves differently so we can allocate them differently
slide-52
SLIDE 52

Uses and improvements

slide-53
SLIDE 53

Where to integrate features

Decision graph

Economy Diplomatic contracts Fleet management Fleet production

slide-54
SLIDE 54

Where to integrate features

Diplomacy relations

Analysis Decision graph

Ship/Fleet Design War topology Economy Diplomatic contracts Fleet management Fleet production

slide-55
SLIDE 55

Where to integrate features

Diplomacy relations

Analysis Decision graph

Ship/Fleet Design War topology Economy Diplomatic contracts Fleet management Fleet production

Execution

Fleet behavior Battle behavior

slide-56
SLIDE 56

Diplomatic relation behavior

mpire destroyed our explorer AND e are a military faction Prepare war In alliance Ask for Alliance

Analysis Decision graph

slide-57
SLIDE 57

Increase ship number

Diplomatic relation behavior

mpire destroyed our explorer AND e are a military faction Prepare war In alliance Ask for Alliance

Analysis Decision graph

slide-58
SLIDE 58

Build alliance contract

Diplomatic relation behavior

mpire destroyed our explorer AND e are a military faction Prepare war In alliance Ask for Alliance

Analysis Decision graph

slide-59
SLIDE 59

Fleet Management

Defend empire

Defend empire

0.9

Defend system Pegasus

0.6

Defend attacked system

A fleet is a resource for military decisions

slide-60
SLIDE 60

Taskforce

Fleet Management

Defend empire

Defend empire

0.9

Defend system Pegasus

0.6

Defend attacked system

A fleet is a resource for military decisions

slide-61
SLIDE 61

Advance tasks generation

Goals can generate goals

Defend empire

Defend empire

0.9

Defend system Pegasus

0.3

Defend attacked system

slide-62
SLIDE 62

Advance tasks generation

Goals can generate goals

Defend attacked system Defend constellation

Defend constellation

0.5

Defend empire

Defend empire

0.9

Defend system Pegasus

0.3

slide-63
SLIDE 63

Advance tasks generation

Tasks can generate tasks

Taskforce

Defend system Pegasus

0.3

Defend attacked system Defend empire

Defend empire

0.9

slide-64
SLIDE 64

Advance tasks generation

Tasks can generate tasks

Assist

Escort defense fleet

0.2

Taskforce Taskforce

Defend system Pegasus

0.3

Defend attacked system pire

Defend empire

0.9

slide-65
SLIDE 65

1000 1000

Advance tasks generation

Link tasks with an allocation rule

Build unique wonder

  • n Pegasus

0.3

Build wonder

Build unique wonder

  • n Andromeda

0.6

Build wonder

slide-66
SLIDE 66

1000 1000

Advance tasks generation

Link tasks with an allocation rule

Build unique wonder

  • n Pegasus

0.3

Build wonder

Build unique wonder

  • n Andromeda

0.6

Build wonder

Only one in empire

slide-67
SLIDE 67

1000 1000

Advance tasks generation

Link tasks with an allocation rule

Build unique wonder

  • n Pegasus

0.3

Build wonder

Build unique wonder

  • n Andromeda

0.6

Build wonder

Only one in empire

slide-68
SLIDE 68

1000 1000

Advance tasks generation

Link tasks with an allocation rule

Build unique wonder

  • n Pegasus

0.3

Build wonder

Build unique wonder

  • n Andromeda

0.6

Build wonder

Only one in empire

slide-69
SLIDE 69

Multiple Personalities

We have 8 different factions.

slide-70
SLIDE 70

Multiple Personalities

And we want to add some flashy, new, exotic gameplay!

slide-71
SLIDE 71

Multiple Personalities

  • Sheesh. Alright, we've got this. We

can add a specific decision branch.

slide-72
SLIDE 72

Multiple Personalities

And we want some gameplay restrictions!

slide-73
SLIDE 73

Multiple Personalities

Well then we can cut a specific decision branch.

slide-74
SLIDE 74

Multiple Personalities

And the personality of the new AI faction must match the lore!

slide-75
SLIDE 75

Multiple Personalities

In that case we can modify a specific decision branch.

slide-76
SLIDE 76

Some numbers

  • 90 analysis computations
  • 45 types of goal
  • 90 types of task
  • 300 generators
  • 50 types of game action handled
  • 70 diplomatic states
  • 3 programmers and 2 designers
slide-77
SLIDE 77

Summing-Up

  • Create a language to talk about AI decision
  • Keep it simple
  • Ensure modular approach so new content

doesn't break decision system

  • Understanding the AI is mandatory
  • Emergent behavior must be controlled
  • Tools must display a system the way you design it
slide-78
SLIDE 78

Thank you