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 of interest Build / research Asymmetric factions Discover the world Gather resources Quests Gather Intel Optimize economy Expand Exterminate Diplomacy Fight in battles Increase territory Relation with players Unit management Expand to new places Evaluate deals War management
Post-mortem: Endless Legend Control Understand Technical • • • Decisions are difficult to control Code is spread and duplicated Heuristic results are just numbers • • • AI doesn’t have global strategy Code base is not incremental No access to intermediate friendly reasons • Diplomatic relations can seem • • irrational Decision process is opaque Tools are too complex
Objectives For design For debugging For programming • • • High level control Understand each decision Incremental • • • Low level control Understand resource Allow different AI techniques • • Handle each resource allocation Isolate data refining from • differently User friendly decision
Meet E.N.F.E.R.
Process Overview Sync Analysis Tasks generation Data Game Execution Tasks allocation
Process Overview Tasks generation Game Tasks allocation
Tasks generation
Situation
Designer needs Aaah, the Cravers are invading! The AI should definitely defend its system here!
Goal Defend system against enemies Defend System
Designer needs Hum ok … but how do you defend the system?
Designer needs Details, schmetails … erm... well… you know… it could build defenses or create ships.
Tasks Create ships Defend system against enemies Defend System Build defense
Designer needs Hum ok … but how does the AI decide which action to take?
Designer needs Well, we're talking about Cravers. Insectoid, psycho, warmachines. We need the best defense against them.
Scoring Create ships 0.4 Defend system against enemies Defend System Build defense 0.8
Designer needs Oh, but I forgot, it's that crappy system we stole from the Lumeris earlier. The AI shouldn't prioritise it.
Scoring Create ships 0.4 Defend system against enemies Defend System Build defense 0.8
Scoring Create ships 0.4 Defend system against enemies Defend System 0.5 Build defense 0.8
Scoring 0.2 Create ships Defend system against enemies Defend System 0.5 0.4 Build defense
Designer needs And one more thing! If the AI's planning a war against the Cravers in any case, ships should be preferred.
Multiple reasons Create ships 0.2 Defend system against enemies Defend System 0.5 Build defense 0.4
Multiple reasons Improve military power to attack Attack Cravers 0.7 Create ships 0.2 Defend system against enemies Defend System 0.5 Build defense 0.4
Multiple reasons Improve military power to attack Attack Cravers 0.7 Create ships 0.5 Defend system against enemies Defend System 0.5 Build defense 0.4
Multiple reasons Reduce upkeep 0.9 Improve military power to attack Attack Cravers 0.7 Create ships 0.5 Defend system against enemies Defend System 0.5 Build defense 0.4
Multiple reasons Reduce upkeep 0.9 Improve military power to attack Attack Cravers 0.7 Create ships 0.3 Defend system against enemies Defend System 0.5 Build defense 0.4
Associated tool
Post-mortem • Ability to iterate before implementation • Force separation between each decision step • Improve decision debugging • Feedback decision chains • Understand decision at different granularity
Tasks allocation
Tasks allocation Context • Tasks in the game have costs • Can I afford this task? • Concurrence between tasks are due to shared resources Create ships 0.6 Build defense 0.3
Tasks allocation Context • Tasks in the game have costs • Can I afford this task? • Concurrence between tasks are due to shared resources 100 Create ships 0.6 10 80 Build defense 0.3
Tasks allocation Objectives • 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 100 Create ships 0.6 10 80 Build defense 0.3
Tasks allocation 0/100 Create ships 0.6 0/10 0/80 Build defense 0.3
Tasks allocation allocator 0/100 Stock: 100 Create ships 0.6 0/10 0/80 Build defense 0.3
Tasks allocation allocator 100/100 Stock: 0 Create ships 0.6 0/10 0/80 Build defense 0.3
Tasks allocation 100/100 Create ships 0.6 0/10 allocator 0/80 Stock: 0 Build defense 0.3
Tasks allocation 100/100 Create ships 0.6 0/10 allocator 0/80 Stock: 0 Build defense 0.3
Multiple resources 100/100 Create ships 0.6 0/10 0/80 Build defense 0.3
Multiple resources 100/100 allocator Create ships 0.6 0/10 Stock: 0 0/80 Build defense 0.3
Multiple resources 100/100 allocator Create ships 0.6 0/10 Stock: 0 0/80 Build defense 0.3
Resource reallocation 100/100 Create ships 0.6 0/10 0/80 Build defense 0.3
Resource reallocation allocator 100/100 Stock: 0 Create ships 0.6 0/10 0/80 Build defense 0.3
Resource reallocation allocator 0/100 Stock: 100 Create ships 0.6 0/10 0/80 Build defense 0.3
Resource reallocation 0/100 Create ships 0.6 0/10 allocator 0/80 Stock: 100 Build defense 0.3
Resource reallocation 0/100 Create ships 0.6 0/10 allocator 80/80 Stock: 20 Build defense 0.3
Validate tasks for execution 0/100 Create ships 0.6 0/10 80/80 Build defense 0.3
Associated tool
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
Uses and improvements
Where to integrate features Decision graph Economy Fleet management Diplomatic contracts Fleet production
Where to integrate features Analysis Decision graph Diplomacy Economy relations Fleet War topology management Diplomatic Ship/Fleet contracts Design Fleet production
Where to integrate features Analysis Decision graph Execution Battle Diplomacy Economy behavior relations Fleet Fleet War topology management behavior Diplomatic Ship/Fleet contracts Design Fleet production
Diplomatic relation behavior mpire destroyed our explorer AND e are a military faction Prepare war Ask for Alliance In alliance Decision graph Analysis
Diplomatic relation behavior mpire destroyed our explorer AND e are a military faction Increase Prepare war ship number Ask for Alliance In alliance Decision graph Analysis
Diplomatic relation behavior mpire destroyed our explorer AND e are a military faction Prepare war Ask for Build alliance Alliance contract In alliance Decision graph Analysis
Fleet Management A fleet is a resource for military decisions Defend empire Defend attacked system Defend system 0.6 Defend empire 0.9 Pegasus
Fleet Management A fleet is a resource for military decisions Defend empire Defend attacked system Taskforce Defend system 0.6 Defend empire 0.9 Pegasus
Advance tasks generation Goals can generate goals Defend empire Defend attacked system Defend system Defend empire 0.3 0.9 Pegasus
Advance tasks generation Goals can generate goals Defend empire Defend attacked system Defend constellation Defend system Defend Defend empire 0.5 0.9 0.3 Pegasus constellation
Advance tasks generation Tasks can generate tasks Defend empire Defend attacked system Defend system Taskforce Defend empire 0.3 0.9 Pegasus
Advance tasks generation Tasks can generate tasks pire Defend attacked system Defend system Taskforce Defend empire 0.3 0.9 Escort defense Taskforce Pegasus 0.2 fleet Assist
Advance tasks generation Link tasks with an allocation rule Build wonder 1000 Build unique wonder 0.3 on Pegasus Build wonder 1000 Build unique wonder 0.6 on Andromeda
Advance tasks generation Link tasks with an allocation rule Build wonder 1000 Build unique wonder 0.3 on Pegasus Only one in empire Build wonder 1000 Build unique wonder 0.6 on Andromeda
Advance tasks generation Link tasks with an allocation rule Build wonder 1000 Build unique wonder 0.3 on Pegasus Only one in empire Build wonder 1000 Build unique wonder 0.6 on Andromeda
Advance tasks generation Link tasks with an allocation rule Build wonder 1000 Build unique wonder 0.3 on Pegasus Only one in empire Build wonder 1000 Build unique wonder 0.6 on Andromeda
Multiple Personalities We have 8 different factions.
Multiple Personalities And we want to add some flashy, new, exotic gameplay!
Recommend
More recommend