SlideShare a Scribd company logo
T.E.A de Souza - October 2022
Effective Game AI
Behavior trees through the APE architecture
Apperception
Planning
Execution
Apperception
Extract roles and statuses
Variable 0.1~60Hz
Planning
- input/output (blackbox)
- Do not retain state between iterations
- Can test in isolation (fast)
- Can test and validate new design features
before full integration.
Variable frame rate 0.1~10Hz
Execution
- Animation, sound
- Tied to refresh rate (60-120Hz) or physics rate
Apperception
Planning
Execution
Blueprints does not hinder good
separation, but also does not actively
encourage it.
Historically BT has been used as an end-all
game scripting platform (break architectural
integrity); this leads to edBT (event driven
behavior trees, breaks responsiveness)
edBTs are not good for planning [Anguelov
2020)
Advances in BT [Colledanchise 2017] have
clarified BT’s benefits. The results do not
apply to edBTs.
INPUT
threat: role
ally: role
hungry: status
in-combo: status
….
Planner
(BT, GOAP, …)
Well formed planners do no
hold state.
Call the planner if you need a
“next action”
Same input => Same output
OUTPUT
Take cover
Look around,
Pick up an object,
Shoot
Reload
(Cheer, smile?)
Planner in APE
Replace the planner
seamlessly:
bystander, patrol, on
alert, engaged,
in-combo
Hidden variables make
testing harder:
- FSM
- edBT
- Event frameworks
INPUT
A: foe
B: wounded
(other parameters
don’t care)
OUTPUT
Evade
AI Test case
Incremental Design
INPUT
A: foe
B: don’t care?
C: well-armed
(other parameters
don’t care)
OUTPUT
Attack
Well decoupled planning allows testing via
simple i/o test cases (no C++ required)
Design ideas translate into new mappings,
which can be automatically or manually
added to the BT. Depending on the
insertion point, pre-existing tests will
break… or not.
In the suggested example, a new mapping
generates contradiction, which may break
a test, or can be made to fail at runtime.
(threat + wounded + well armed)
=> attack?
=> evade?
(ambiguity)
DSL
Framework
Visual Programming
Interpreter Transpiler
Runtime (C++/C##/OpenCL/Cuda)
Building Effective Workflows
Often the correct data presentation differs
depending on who’s looking, and why.
Visual programming may allow (technical)
designers to start things they can’t finish.
A humanly comprehensible BT graph may
not be the most efficient runtime
representation.
BT can integrate with GPLs (C/C++/C#/…)
[de Souza 2020] however an interpreter
can help working with BTs in realtime, and
bridge the AI framework with visual, graph
oriented representations.
Standard BT: memory, performance,
optimizations
Via APE, variable 0.25-20Hz
Easily swap the solver (Bystander vs Patrol
vs High alert vs Combat or In-Combo)
Frequency analysis can detect and
optimize “deep stacks” (including just in
time). In a trivial (but common) case,
subsequent iterations of input X will of
course lead same output Y.
No storage requirement (stateless)
Past and current work
Active Logic (since 2019) - reformulate BT
as a calculus; applications from realtime
programming to AI
Senior AI engineer at Ultimerse 2021-2022:
combat AIs through C# BTs (Unity)
Currently working on BT-lang (DSL for BTs)
and a framework for technical designers to
easily build performant apperception
components

More Related Content

Similar to APE-Architecture-2022.pdf

A Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for EveryoneA Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for Everyone
inside-BigData.com
 
Engine terminology
Engine terminologyEngine terminology
Engine terminology
adampatrickhughes
 
Vignesh_Resume_7years
Vignesh_Resume_7yearsVignesh_Resume_7years
Vignesh_Resume_7years
Vignesh Devadhason
 
Y1 gd engine_terminologY
Y1 gd engine_terminologYY1 gd engine_terminologY
Y1 gd engine_terminologY
ElliotBlack
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)
Johan Andersson
 
Architecture refactoring - accelerating business success
Architecture refactoring - accelerating business successArchitecture refactoring - accelerating business success
Architecture refactoring - accelerating business success
Ganesh Samarthyam
 
Gpu
GpuGpu
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
aknatdeahobia
 
Introduction to RamLog
Introduction to RamLogIntroduction to RamLog
Introduction to RamLog
CorrieTaljaard
 
BitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven rendererBitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven renderer
tobias_persson
 
The Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next Steps
Johan Andersson
 
Synapseindia dot net development about programming
Synapseindia dot net development about programmingSynapseindia dot net development about programming
Synapseindia dot net development about programming
Synapseindiappsdevelopment
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Maarten Balliauw
 
QConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing systemQConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing system
Danny Yuan
 
Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014
Dieter Plaetinck
 
London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010
Skills Matter
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
rosstapher
 
Game Engine Terminology
Game Engine TerminologyGame Engine Terminology
Game Engine Terminology
MagicalPotato9000
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Johan Andersson
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
Mark Kilgard
 

Similar to APE-Architecture-2022.pdf (20)

A Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for EveryoneA Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for Everyone
 
Engine terminology
Engine terminologyEngine terminology
Engine terminology
 
Vignesh_Resume_7years
Vignesh_Resume_7yearsVignesh_Resume_7years
Vignesh_Resume_7years
 
Y1 gd engine_terminologY
Y1 gd engine_terminologYY1 gd engine_terminologY
Y1 gd engine_terminologY
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)
 
Architecture refactoring - accelerating business success
Architecture refactoring - accelerating business successArchitecture refactoring - accelerating business success
Architecture refactoring - accelerating business success
 
Gpu
GpuGpu
Gpu
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Introduction to RamLog
Introduction to RamLogIntroduction to RamLog
Introduction to RamLog
 
BitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven rendererBitSquid Tech: Benefits of a data-driven renderer
BitSquid Tech: Benefits of a data-driven renderer
 
The Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next Steps
 
Synapseindia dot net development about programming
Synapseindia dot net development about programmingSynapseindia dot net development about programming
Synapseindia dot net development about programming
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
 
QConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing systemQConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing system
 
Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014
 
London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Game Engine Terminology
Game Engine TerminologyGame Engine Terminology
Game Engine Terminology
 
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
Parallel Graphics in Frostbite - Current & Future (Siggraph 2009)
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 

Recently uploaded

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 

APE-Architecture-2022.pdf

  • 1. T.E.A de Souza - October 2022 Effective Game AI Behavior trees through the APE architecture
  • 2. Apperception Planning Execution Apperception Extract roles and statuses Variable 0.1~60Hz Planning - input/output (blackbox) - Do not retain state between iterations - Can test in isolation (fast) - Can test and validate new design features before full integration. Variable frame rate 0.1~10Hz Execution - Animation, sound - Tied to refresh rate (60-120Hz) or physics rate
  • 3. Apperception Planning Execution Blueprints does not hinder good separation, but also does not actively encourage it. Historically BT has been used as an end-all game scripting platform (break architectural integrity); this leads to edBT (event driven behavior trees, breaks responsiveness) edBTs are not good for planning [Anguelov 2020) Advances in BT [Colledanchise 2017] have clarified BT’s benefits. The results do not apply to edBTs.
  • 4. INPUT threat: role ally: role hungry: status in-combo: status …. Planner (BT, GOAP, …) Well formed planners do no hold state. Call the planner if you need a “next action” Same input => Same output OUTPUT Take cover Look around, Pick up an object, Shoot Reload (Cheer, smile?) Planner in APE Replace the planner seamlessly: bystander, patrol, on alert, engaged, in-combo Hidden variables make testing harder: - FSM - edBT - Event frameworks
  • 5. INPUT A: foe B: wounded (other parameters don’t care) OUTPUT Evade AI Test case Incremental Design INPUT A: foe B: don’t care? C: well-armed (other parameters don’t care) OUTPUT Attack Well decoupled planning allows testing via simple i/o test cases (no C++ required) Design ideas translate into new mappings, which can be automatically or manually added to the BT. Depending on the insertion point, pre-existing tests will break… or not. In the suggested example, a new mapping generates contradiction, which may break a test, or can be made to fail at runtime. (threat + wounded + well armed) => attack? => evade? (ambiguity)
  • 6. DSL Framework Visual Programming Interpreter Transpiler Runtime (C++/C##/OpenCL/Cuda) Building Effective Workflows Often the correct data presentation differs depending on who’s looking, and why. Visual programming may allow (technical) designers to start things they can’t finish. A humanly comprehensible BT graph may not be the most efficient runtime representation. BT can integrate with GPLs (C/C++/C#/…) [de Souza 2020] however an interpreter can help working with BTs in realtime, and bridge the AI framework with visual, graph oriented representations.
  • 7. Standard BT: memory, performance, optimizations Via APE, variable 0.25-20Hz Easily swap the solver (Bystander vs Patrol vs High alert vs Combat or In-Combo) Frequency analysis can detect and optimize “deep stacks” (including just in time). In a trivial (but common) case, subsequent iterations of input X will of course lead same output Y. No storage requirement (stateless)
  • 8. Past and current work Active Logic (since 2019) - reformulate BT as a calculus; applications from realtime programming to AI Senior AI engineer at Ultimerse 2021-2022: combat AIs through C# BTs (Unity) Currently working on BT-lang (DSL for BTs) and a framework for technical designers to easily build performant apperception components