SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
Hongik University
2019.08.23
Hwanhee Kim, Seongtaek Lee, Hyundong Lee,
Taesung Hahn, Shinjin Kang
Automatic Generation of Game Content
using a Graph-based Wave Function
Collapse Algorithm
NCSOFT
About me
Hwanhee Kim
Game Designer (8 years)
• Web, Mobile, Console Experience
Technical Designer (6 years)
• JS, python, Flash 😱
Researcher (2 years)
• WFC, Deep Learning
• This is my 1st Paper - Hello world!
2011
2013
2017
4
26
34
40
43
Overview
1. Original WFC
2. Graph-based WFC
3. Experiments
4. Future works
5. References
Original WFC
• Wave Function Collapse
• Motivated by Image Synthesis Algorithm
• Divides input to small chunks(tile), and then rearrange them to
make new contents
https://github.com/mxgmn/WaveFunctionCollapse
Original WFC
• There are many applications in the game development scene
• 2 Commercial games
– Caves of Qud
– Bad north
https://twitter.com/unormal/status/805990194939838464
https://twitter.com/OskSta/status/917405214638006273
Original WFC
• Many demos
– 2D Platformer map generation by Andy Wallace
https://twitter.com/Andy_Makes/status/976615859069300736
Original WFC
• Many demos
– 3D Interior map by Marian
https://twitter.com/marian42_/status/1137111089425059840
Original WFC
• Many demos
– My trial
https://twitter.com/greentecq/status/1025348928634408960
Original WFC
• What are the common features of the above cases?
Original WFC
• What are the common features of the above cases?
– Regularity
Original WFC
• What are the common features of the above cases?
– Regularity
– A Regular Grid is a tessellation of n-dimensional Euclidean space by congruent
parallelotopes (e.g. bricks). (Wikipedia)
https://en.wikipedia.org/wiki/Regular_grid#cite_ref-1
Original WFC
• Regular Grid is…
– rectangular grid, triangular grid, hexagonal grid…
http://mathworld.wolfram.com/Grid.html
Original WFC
• Regular Grid is…
– rectangular grid, triangular grid, hexagonal grid…
– Each node constituting the grid has an equal number of neighbors
Original WFC
• Regular Grid is…
– rectangular grid, triangular grid, hexagonal grid…
– Each node constituting the grid has an equal number of neighbors
Original WFC
• Graph is consists of nodes and edges
Original WFC
• Graph is consists of nodes and edges
– Regular grid is a special subset of the graph
Regular grid
Original WFC
• Graph is consists of nodes and edges
– Regular grid is a special subset of the graph
• Can we handle others?
Regular grid
Original WFC
• There are two key variables
• Propagator
– WFC propagates information on non-deployable tiles to neighboring nodes
– The adjacency information of two tiles is stored
– Memory size is 3D = [the number of all tiles] * [the number of directions] * [the
number of connectable tiles]
Tileset from https://www.kenney.nl/assets/road-textures
Original WFC
• Propagator
– Memory size is 3D = [the number of all tiles(7)] * [the number of directions] * [the
number of connectable tiles]
Original WFC
• Propagator
– Memory size is 3D = [the number of all tiles(7)] * [the number of directions(4)] *
[the number of connectable tiles]
left
up
right down
Original WFC
• Propagator
– Memory size is 3D = [the number of all tiles(7)] * [the number of directions(4)] *
[the number of connectable tiles(max 7)]
Original WFC
• There are two key variables
• Compatible
– The number of tiles that can be connected to any tile by direction at a particular
grid location
– This can be calculated by referring to propagator variable
– Memory size is also 3D = [the number all nodes] * [the number of all tiles] * [the
number of directions]
Original WFC
• Compatible
– Once the placement of the tiles begins, the
compatibility will decrease rapidly
– The compatibility of the remaining tiles except for the
tiles placed in the grid will be 0 on that tile and the
forbidden information will be stored
– If the compatibility of any tile in any grid is zero, the
other tiles will not be placed in this grid. This
prohibition information is also spread around
Original WFC
• Greedy Algorithm
– The original implementation picks the tiles that are most likely to fail and starts
again from the beginning
– For computational efficiency, several implementations have proposed
backtracking to return to the point of failure
Original WFC
• Recap
– 2D or 3D is possible, but on the regular grid
– Propagator, Compatible  Direction is important
– Greedy Algorithm  Backtracking is needed for efficiency
WFC algorithm process
Graph-based WFC
• WFC on the ‘general’ graph
• Of course there are some constraints…
– One edge connects only two different nodes
– Two nodes are connected to only one unique edge
– All edges are Undirected edge
Graph-based WFC
• WFC on the ‘general’ graph
• Of course there are some constraints…
– One edge connects only two different nodes
– Two nodes are connected to only one unique edge
– All edges are Undirected edge
2D rect grid
Number of neighbors = 4
Sudoku game board
Number of neighbors = 20
Voronoi cell (irregular grid)
Number of neighbors =
unlimited and variable
Graph-based WFC
• Direction checking is important in original WFC
• Since the direction has been lost, Propagator and Compatible
now becomes 2D
– Propagator : [the number of all tiles] * [the number of connectable tiles]
– Compatible : [the number all nodes] * [the number of all tiles]
• Memory usage is reduced! Is it just good?
Propagator Compatible Output
Voronoi grid (n=47)
Graph-based WFC
• Propagator Conflict
– Instead of reducing the condition to check, a connection that does not exist in the
original appears in the result
Propagator Propagator Conflict
Graph-based WFC
• Propagator Conflict
– Instead of reducing the condition to check, a connection that does not exist in the
original appears in the result
Graph-based WFC
• Propagator Conflict
– Instead of reducing the condition to check, a connection that does not exist in the
original appears in the result
– In this case, we call backtrack() function and goes back to the point before the
conflict occurs and runs the search again.
Graph-based WFC algorithm process
Graph-based WFC
• Propagator Conflict
– Instead of reducing the condition to check, a connection that does not exist in the
original appears in the result
– In this case, we call backtrack() function and goes back to the point before the
conflict occurs and runs the search again.
– The other algorithm process is very similar to the original
Graph-based
WFC algorithm process
WFC algorithm process
Graph-based WFC
• Recap
– WFC on the ‘general’ graph
– Direction is gone  Added Propagator Conflict
Experiments
• Sudoku
– Base problem of constraint satisfaction
– With simple rule, on grid structure
– With value constraint
Sudoku game board
Number of neighbors = 20
Propagator
Experiments
• Sudoku
– Base problem of constraint satisfaction
– With simple rule and graph
– With value constraint
Experiments
• Four-color theorem
– Another base problem of constraint satisfaction
– With simple rule, on graph structure (Voronoi)
Propagator Voronoi cell (irregular grid)
Number of neighbors =
unlimited and variable
Experiments
• Four-color theorem
– Another base problem of constraint satisfaction
– With simple rule, on graph structure (Voronoi)
n=12 n=32 n=32
Experiments
• PCG experiment with navigation mesh
– Specify a node above the navigation mesh and place the node corresponding to
the game content
– The edge connecting each node is determined by finding the reachable distance
with the pathfinding algorithm
Propagator Random node and edge
Experiments
• PCG experiment with navigation mesh
– Probability constraint : Adjust the probability that a particular node will arrive
using a stationary variable
Future works
• Performance should be improved
• Currently, graph-based WFC can solve problems that are not
related to the order of the solution, but we need to expand the
algorithm to solve the problems related to the order of the
solution
https://youtu.be/et3hgNBrc88
Future works
• The graph structure may be used for various game structures -
dungeons, etc.
WFC(Graph Projection)
WFC(Level)
Graph
Thank you!
You can find me at @greentecq
Twitter: @greentecq
Mail : greentec91@gmail.com
References
• Hendrikx, M., Meijer, S., Velden, J. V. D., and Iosup, A. (2013).
Procedural content generation for games: A survey. ACM
Transactions on Multimedia Computing, Communications, and
Applications 9(1):1.
• Togelius, J., Yannakakis, G., Stanley, K., and Browne, C. (2011).
Search-based procedural content generation: A taxonomy and
survey. IEEE Transactions on Computational Intelligence and AI in
Games 3(3):172186.
• Dahlskog, S., and Togelius, J. (2013). Patterns as objectives for
level generation. In Proceedings of the Second Workshop on
Design Patterns in Games, ACM.
References
• Snodgrass, S., and Ontanon, S. (2014). A hierarchical approach to
generating maps using Markov chains. In Proceedings of the
Tenth Artificial Intelligence and Interactive Digital Entertainment
Conference.
• Jain, R., Isaksen, A., Holmgrd, C., and Togelius, J. (2016).
Autoencoders for level generation, repair, and recognition. In
Proceedings of the ICCC Workshop on Computational Creativity
and Games.
• Summerville, A., Guzdial, M., Mateas, M., and Riedl, M. O. (2016).
Learning player tailored content from observation: Platformer
level generation from video traces using LSTMs. In Proceedings of
the Twelfth Artificial Intelligence and Interactive Digital
Entertainment Conference.
References
• Shin, S. B., “Game Level Generation Using Neural Networks,”
Gamasutra.
https://www.gamasutra.com/blogs/SeungbackShin/20180227/31
5017/Game%20Level%20Generation%20Using%20Neural%20Net
works.php
• Karth, I., and Smith, A. M. (2017). WaveFunctionCollapse is
constraint solving in the wild. In Proceedings of the 12th
International Conference on the Foundations of Digital Games (p.
68). ACM.
• Karth, I., and Smith, A. M. (2018). Addressing the fundamental
tension of PCGML with discriminative learning. arXiv preprint
arXiv:1809.04432.
E N D O F D O C U M E N T

Mais conteúdo relacionado

Mais procurados

A Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingA Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time Lighting
Steven Tovey
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
Holger Gruen
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
guest11b095
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
devCAT Studio, NEXON
 

Mais procurados (20)

Unite2019 HLOD를 활용한 대규모 씬 제작 방법
Unite2019 HLOD를 활용한 대규모 씬 제작 방법Unite2019 HLOD를 활용한 대규모 씬 제작 방법
Unite2019 HLOD를 활용한 대규모 씬 제작 방법
 
Global illumination
Global illuminationGlobal illumination
Global illumination
 
Screen space reflection
Screen space reflectionScreen space reflection
Screen space reflection
 
A Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingA Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time Lighting
 
Practical SPU Programming in God of War III
Practical SPU Programming in God of War IIIPractical SPU Programming in God of War III
Practical SPU Programming in God of War III
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
 
Ndc12 이창희 render_pipeline
Ndc12 이창희 render_pipelineNdc12 이창희 render_pipeline
Ndc12 이창희 render_pipeline
 
A Real-time Radiosity Architecture
A Real-time Radiosity ArchitectureA Real-time Radiosity Architecture
A Real-time Radiosity Architecture
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The Surge
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
Siggraph 2011: Occlusion culling in Alan Wake
Siggraph 2011: Occlusion culling in Alan WakeSiggraph 2011: Occlusion culling in Alan Wake
Siggraph 2011: Occlusion culling in Alan Wake
 
smallpt: Global Illumination in 99 lines of C++
smallpt:  Global Illumination in 99 lines of C++smallpt:  Global Illumination in 99 lines of C++
smallpt: Global Illumination in 99 lines of C++
 
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal FilteringStable SSAO in Battlefield 3 with Selective Temporal Filtering
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 
The Real-time Volumetric Cloudscapes of Horizon Zero Dawn
The Real-time Volumetric Cloudscapes of Horizon Zero DawnThe Real-time Volumetric Cloudscapes of Horizon Zero Dawn
The Real-time Volumetric Cloudscapes of Horizon Zero Dawn
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
 

Semelhante a Automatic Generation of Game Content using a Graph-based Wave Function Collapse Algorithm

Semelhante a Automatic Generation of Game Content using a Graph-based Wave Function Collapse Algorithm (20)

Large-scale Recommendation Systems on Just a PC
Large-scale Recommendation Systems on Just a PCLarge-scale Recommendation Systems on Just a PC
Large-scale Recommendation Systems on Just a PC
 
The Power of Motif Counting Theory, Algorithms, and Applications for Large Gr...
The Power of Motif Counting Theory, Algorithms, and Applications for Large Gr...The Power of Motif Counting Theory, Algorithms, and Applications for Large Gr...
The Power of Motif Counting Theory, Algorithms, and Applications for Large Gr...
 
Web-Scale Graph Analytics with Apache Spark with Tim Hunter
Web-Scale Graph Analytics with Apache Spark with Tim HunterWeb-Scale Graph Analytics with Apache Spark with Tim Hunter
Web-Scale Graph Analytics with Apache Spark with Tim Hunter
 
lec6a.ppt
lec6a.pptlec6a.ppt
lec6a.ppt
 
VENUS: Vertex-Centric Streamlined Graph Computation on a Single PC
VENUS: Vertex-Centric Streamlined Graph Computation on a Single PCVENUS: Vertex-Centric Streamlined Graph Computation on a Single PC
VENUS: Vertex-Centric Streamlined Graph Computation on a Single PC
 
High-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and Modeling
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL store
 
Building your own NSQL store
Building your own NSQL storeBuilding your own NSQL store
Building your own NSQL store
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL store
 
Pinsage Stanford slides.pdf
Pinsage Stanford slides.pdfPinsage Stanford slides.pdf
Pinsage Stanford slides.pdf
 
An overview of Peer-to-Peer technology new
An overview of Peer-to-Peer technology newAn overview of Peer-to-Peer technology new
An overview of Peer-to-Peer technology new
 
Introduction to computer vision
Introduction to computer visionIntroduction to computer vision
Introduction to computer vision
 
Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero Dawn
 
Introduction to computer vision with Convoluted Neural Networks
Introduction to computer vision with Convoluted Neural NetworksIntroduction to computer vision with Convoluted Neural Networks
Introduction to computer vision with Convoluted Neural Networks
 
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
Efficient Variable Size Template Matching Using Fast Normalized Cross Correla...
 
Large-Scale Graph Computation on Just a PC: Aapo Kyrola Ph.D. thesis defense
Large-Scale Graph Computation on Just a PC: Aapo Kyrola Ph.D. thesis defenseLarge-Scale Graph Computation on Just a PC: Aapo Kyrola Ph.D. thesis defense
Large-Scale Graph Computation on Just a PC: Aapo Kyrola Ph.D. thesis defense
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine Learning
 
Leveraging Multiple GPUs and CPUs for Graphlet Counting in Large Networks
Leveraging Multiple GPUs and CPUs for  Graphlet Counting in Large Networks Leveraging Multiple GPUs and CPUs for  Graphlet Counting in Large Networks
Leveraging Multiple GPUs and CPUs for Graphlet Counting in Large Networks
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Convolutional Neural Networks - Veronica Vilaplana - UPC Barcelona 2018
Convolutional Neural Networks - Veronica Vilaplana - UPC Barcelona 2018Convolutional Neural Networks - Veronica Vilaplana - UPC Barcelona 2018
Convolutional Neural Networks - Veronica Vilaplana - UPC Barcelona 2018
 

Mais de Hwanhee Kim

Mais de Hwanhee Kim (6)

텐서플로우 2.0 튜토리얼 - RNN
텐서플로우 2.0 튜토리얼 - RNN텐서플로우 2.0 튜토리얼 - RNN
텐서플로우 2.0 튜토리얼 - RNN
 
텐서플로우 2.0 튜토리얼 - CNN
텐서플로우 2.0 튜토리얼 - CNN텐서플로우 2.0 튜토리얼 - CNN
텐서플로우 2.0 튜토리얼 - CNN
 
구글 텐서플로우 첫걸음
구글 텐서플로우 첫걸음구글 텐서플로우 첫걸음
구글 텐서플로우 첫걸음
 
Tensorflow 설치 가이드 for Windows10
Tensorflow 설치 가이드 for Windows10Tensorflow 설치 가이드 for Windows10
Tensorflow 설치 가이드 for Windows10
 
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
 
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
[NDC2016] 신경망은컨텐츠자동생성의꿈을꾸는가
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Automatic Generation of Game Content using a Graph-based Wave Function Collapse Algorithm

  • 1. Hongik University 2019.08.23 Hwanhee Kim, Seongtaek Lee, Hyundong Lee, Taesung Hahn, Shinjin Kang Automatic Generation of Game Content using a Graph-based Wave Function Collapse Algorithm NCSOFT
  • 2. About me Hwanhee Kim Game Designer (8 years) • Web, Mobile, Console Experience Technical Designer (6 years) • JS, python, Flash 😱 Researcher (2 years) • WFC, Deep Learning • This is my 1st Paper - Hello world! 2011 2013 2017
  • 3. 4 26 34 40 43 Overview 1. Original WFC 2. Graph-based WFC 3. Experiments 4. Future works 5. References
  • 4. Original WFC • Wave Function Collapse • Motivated by Image Synthesis Algorithm • Divides input to small chunks(tile), and then rearrange them to make new contents https://github.com/mxgmn/WaveFunctionCollapse
  • 5. Original WFC • There are many applications in the game development scene • 2 Commercial games – Caves of Qud – Bad north https://twitter.com/unormal/status/805990194939838464 https://twitter.com/OskSta/status/917405214638006273
  • 6. Original WFC • Many demos – 2D Platformer map generation by Andy Wallace https://twitter.com/Andy_Makes/status/976615859069300736
  • 7. Original WFC • Many demos – 3D Interior map by Marian https://twitter.com/marian42_/status/1137111089425059840
  • 8. Original WFC • Many demos – My trial https://twitter.com/greentecq/status/1025348928634408960
  • 9. Original WFC • What are the common features of the above cases?
  • 10. Original WFC • What are the common features of the above cases? – Regularity
  • 11. Original WFC • What are the common features of the above cases? – Regularity – A Regular Grid is a tessellation of n-dimensional Euclidean space by congruent parallelotopes (e.g. bricks). (Wikipedia) https://en.wikipedia.org/wiki/Regular_grid#cite_ref-1
  • 12. Original WFC • Regular Grid is… – rectangular grid, triangular grid, hexagonal grid… http://mathworld.wolfram.com/Grid.html
  • 13. Original WFC • Regular Grid is… – rectangular grid, triangular grid, hexagonal grid… – Each node constituting the grid has an equal number of neighbors
  • 14. Original WFC • Regular Grid is… – rectangular grid, triangular grid, hexagonal grid… – Each node constituting the grid has an equal number of neighbors
  • 15. Original WFC • Graph is consists of nodes and edges
  • 16. Original WFC • Graph is consists of nodes and edges – Regular grid is a special subset of the graph Regular grid
  • 17. Original WFC • Graph is consists of nodes and edges – Regular grid is a special subset of the graph • Can we handle others? Regular grid
  • 18. Original WFC • There are two key variables • Propagator – WFC propagates information on non-deployable tiles to neighboring nodes – The adjacency information of two tiles is stored – Memory size is 3D = [the number of all tiles] * [the number of directions] * [the number of connectable tiles] Tileset from https://www.kenney.nl/assets/road-textures
  • 19. Original WFC • Propagator – Memory size is 3D = [the number of all tiles(7)] * [the number of directions] * [the number of connectable tiles]
  • 20. Original WFC • Propagator – Memory size is 3D = [the number of all tiles(7)] * [the number of directions(4)] * [the number of connectable tiles] left up right down
  • 21. Original WFC • Propagator – Memory size is 3D = [the number of all tiles(7)] * [the number of directions(4)] * [the number of connectable tiles(max 7)]
  • 22. Original WFC • There are two key variables • Compatible – The number of tiles that can be connected to any tile by direction at a particular grid location – This can be calculated by referring to propagator variable – Memory size is also 3D = [the number all nodes] * [the number of all tiles] * [the number of directions]
  • 23. Original WFC • Compatible – Once the placement of the tiles begins, the compatibility will decrease rapidly – The compatibility of the remaining tiles except for the tiles placed in the grid will be 0 on that tile and the forbidden information will be stored – If the compatibility of any tile in any grid is zero, the other tiles will not be placed in this grid. This prohibition information is also spread around
  • 24. Original WFC • Greedy Algorithm – The original implementation picks the tiles that are most likely to fail and starts again from the beginning – For computational efficiency, several implementations have proposed backtracking to return to the point of failure
  • 25. Original WFC • Recap – 2D or 3D is possible, but on the regular grid – Propagator, Compatible  Direction is important – Greedy Algorithm  Backtracking is needed for efficiency WFC algorithm process
  • 26. Graph-based WFC • WFC on the ‘general’ graph • Of course there are some constraints… – One edge connects only two different nodes – Two nodes are connected to only one unique edge – All edges are Undirected edge
  • 27. Graph-based WFC • WFC on the ‘general’ graph • Of course there are some constraints… – One edge connects only two different nodes – Two nodes are connected to only one unique edge – All edges are Undirected edge 2D rect grid Number of neighbors = 4 Sudoku game board Number of neighbors = 20 Voronoi cell (irregular grid) Number of neighbors = unlimited and variable
  • 28. Graph-based WFC • Direction checking is important in original WFC • Since the direction has been lost, Propagator and Compatible now becomes 2D – Propagator : [the number of all tiles] * [the number of connectable tiles] – Compatible : [the number all nodes] * [the number of all tiles] • Memory usage is reduced! Is it just good? Propagator Compatible Output Voronoi grid (n=47)
  • 29. Graph-based WFC • Propagator Conflict – Instead of reducing the condition to check, a connection that does not exist in the original appears in the result Propagator Propagator Conflict
  • 30. Graph-based WFC • Propagator Conflict – Instead of reducing the condition to check, a connection that does not exist in the original appears in the result
  • 31. Graph-based WFC • Propagator Conflict – Instead of reducing the condition to check, a connection that does not exist in the original appears in the result – In this case, we call backtrack() function and goes back to the point before the conflict occurs and runs the search again. Graph-based WFC algorithm process
  • 32. Graph-based WFC • Propagator Conflict – Instead of reducing the condition to check, a connection that does not exist in the original appears in the result – In this case, we call backtrack() function and goes back to the point before the conflict occurs and runs the search again. – The other algorithm process is very similar to the original Graph-based WFC algorithm process WFC algorithm process
  • 33. Graph-based WFC • Recap – WFC on the ‘general’ graph – Direction is gone  Added Propagator Conflict
  • 34. Experiments • Sudoku – Base problem of constraint satisfaction – With simple rule, on grid structure – With value constraint Sudoku game board Number of neighbors = 20 Propagator
  • 35. Experiments • Sudoku – Base problem of constraint satisfaction – With simple rule and graph – With value constraint
  • 36. Experiments • Four-color theorem – Another base problem of constraint satisfaction – With simple rule, on graph structure (Voronoi) Propagator Voronoi cell (irregular grid) Number of neighbors = unlimited and variable
  • 37. Experiments • Four-color theorem – Another base problem of constraint satisfaction – With simple rule, on graph structure (Voronoi) n=12 n=32 n=32
  • 38. Experiments • PCG experiment with navigation mesh – Specify a node above the navigation mesh and place the node corresponding to the game content – The edge connecting each node is determined by finding the reachable distance with the pathfinding algorithm Propagator Random node and edge
  • 39. Experiments • PCG experiment with navigation mesh – Probability constraint : Adjust the probability that a particular node will arrive using a stationary variable
  • 40. Future works • Performance should be improved • Currently, graph-based WFC can solve problems that are not related to the order of the solution, but we need to expand the algorithm to solve the problems related to the order of the solution https://youtu.be/et3hgNBrc88
  • 41. Future works • The graph structure may be used for various game structures - dungeons, etc. WFC(Graph Projection) WFC(Level) Graph
  • 42. Thank you! You can find me at @greentecq Twitter: @greentecq Mail : greentec91@gmail.com
  • 43. References • Hendrikx, M., Meijer, S., Velden, J. V. D., and Iosup, A. (2013). Procedural content generation for games: A survey. ACM Transactions on Multimedia Computing, Communications, and Applications 9(1):1. • Togelius, J., Yannakakis, G., Stanley, K., and Browne, C. (2011). Search-based procedural content generation: A taxonomy and survey. IEEE Transactions on Computational Intelligence and AI in Games 3(3):172186. • Dahlskog, S., and Togelius, J. (2013). Patterns as objectives for level generation. In Proceedings of the Second Workshop on Design Patterns in Games, ACM.
  • 44. References • Snodgrass, S., and Ontanon, S. (2014). A hierarchical approach to generating maps using Markov chains. In Proceedings of the Tenth Artificial Intelligence and Interactive Digital Entertainment Conference. • Jain, R., Isaksen, A., Holmgrd, C., and Togelius, J. (2016). Autoencoders for level generation, repair, and recognition. In Proceedings of the ICCC Workshop on Computational Creativity and Games. • Summerville, A., Guzdial, M., Mateas, M., and Riedl, M. O. (2016). Learning player tailored content from observation: Platformer level generation from video traces using LSTMs. In Proceedings of the Twelfth Artificial Intelligence and Interactive Digital Entertainment Conference.
  • 45. References • Shin, S. B., “Game Level Generation Using Neural Networks,” Gamasutra. https://www.gamasutra.com/blogs/SeungbackShin/20180227/31 5017/Game%20Level%20Generation%20Using%20Neural%20Net works.php • Karth, I., and Smith, A. M. (2017). WaveFunctionCollapse is constraint solving in the wild. In Proceedings of the 12th International Conference on the Foundations of Digital Games (p. 68). ACM. • Karth, I., and Smith, A. M. (2018). Addressing the fundamental tension of PCGML with discriminative learning. arXiv preprint arXiv:1809.04432.
  • 46. E N D O F D O C U M E N T