SlideShare a Scribd company logo
1 of 46
Download to read 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

More Related Content

What's hot

Compute shader
Compute shaderCompute shader
Compute shaderQooJuice
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.ozlael ozlael
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리changehee lee
 
마비노기듀얼 이야기-넥슨 김동건
마비노기듀얼 이야기-넥슨 김동건마비노기듀얼 이야기-넥슨 김동건
마비노기듀얼 이야기-넥슨 김동건강 민우
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)Bongseok Cho
 
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례Hwanhee Kim
 
KGC 2014: 분산 게임 서버 구조론
KGC 2014: 분산 게임 서버 구조론KGC 2014: 분산 게임 서버 구조론
KGC 2014: 분산 게임 서버 구조론Hyunjik Bae
 
Unreal python
Unreal pythonUnreal python
Unreal pythonTonyCms
 
Baekjoon Online Judge 1019번 풀이
Baekjoon Online Judge 1019번 풀이Baekjoon Online Judge 1019번 풀이
Baekjoon Online Judge 1019번 풀이Baekjoon Choi
 
빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술YEONG-CHEON YOU
 
Hierachical z Map Occlusion Culling
Hierachical z Map Occlusion CullingHierachical z Map Occlusion Culling
Hierachical z Map Occlusion CullingYEONG-CHEON YOU
 
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018devCAT Studio, NEXON
 
[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬KyeongWon Koo
 
Voxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseVoxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseYEONG-CHEON YOU
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법YEONG-CHEON YOU
 
마칭 큐브 알고리즘 - ZP 2019 데캠
마칭 큐브 알고리즘 - ZP 2019 데캠마칭 큐브 알고리즘 - ZP 2019 데캠
마칭 큐브 알고리즘 - ZP 2019 데캠동환 김
 
Game Physics Engine Development (게임 물리 엔진 개발)
Game Physics Engine Development (게임 물리 엔진 개발)Game Physics Engine Development (게임 물리 엔진 개발)
Game Physics Engine Development (게임 물리 엔진 개발)Bongseok Cho
 

What's hot (20)

Compute shader
Compute shaderCompute shader
Compute shader
 
Bump Mapping
Bump MappingBump Mapping
Bump Mapping
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 
마비노기듀얼 이야기-넥슨 김동건
마비노기듀얼 이야기-넥슨 김동건마비노기듀얼 이야기-넥슨 김동건
마비노기듀얼 이야기-넥슨 김동건
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)
 
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
[NDC2017] 딥러닝으로 게임 콘텐츠 제작하기 - VAE를 이용한 콘텐츠 생성 기법 연구 사례
 
Voxelizaition with GPU
Voxelizaition with GPUVoxelizaition with GPU
Voxelizaition with GPU
 
KGC 2014: 분산 게임 서버 구조론
KGC 2014: 분산 게임 서버 구조론KGC 2014: 분산 게임 서버 구조론
KGC 2014: 분산 게임 서버 구조론
 
Unreal python
Unreal pythonUnreal python
Unreal python
 
Baekjoon Online Judge 1019번 풀이
Baekjoon Online Judge 1019번 풀이Baekjoon Online Judge 1019번 풀이
Baekjoon Online Judge 1019번 풀이
 
빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술
 
Hierachical z Map Occlusion Culling
Hierachical z Map Occlusion CullingHierachical z Map Occlusion Culling
Hierachical z Map Occlusion Culling
 
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
 
[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬
 
Voxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseVoxel based game_optimazation_relelase
Voxel based game_optimazation_relelase
 
Ndc11 이창희_hdr
Ndc11 이창희_hdrNdc11 이창희_hdr
Ndc11 이창희_hdr
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
 
마칭 큐브 알고리즘 - ZP 2019 데캠
마칭 큐브 알고리즘 - ZP 2019 데캠마칭 큐브 알고리즘 - ZP 2019 데캠
마칭 큐브 알고리즘 - ZP 2019 데캠
 
Game Physics Engine Development (게임 물리 엔진 개발)
Game Physics Engine Development (게임 물리 엔진 개발)Game Physics Engine Development (게임 물리 엔진 개발)
Game Physics Engine Development (게임 물리 엔진 개발)
 

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

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 PCAapo Kyrölä
 
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...Nesreen K. Ahmed
 
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 HunterDatabricks
 
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 PCQin Liu
 
High-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingNesreen K. Ahmed
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeEdward Capriolo
 
Building your own NSQL store
Building your own NSQL storeBuilding your own NSQL store
Building your own NSQL storeEdward Capriolo
 
Nibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL storeEdward Capriolo
 
Pinsage Stanford slides.pdf
Pinsage Stanford slides.pdfPinsage Stanford slides.pdf
Pinsage Stanford slides.pdfssuser3a8f33
 
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 newchizhangufl
 
Introduction to computer vision
Introduction to computer visionIntroduction to computer vision
Introduction to computer visionMarcin Jedyk
 
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 DawnGuerrilla
 
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 NetworksMarcinJedyk
 
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...Gurbinder Gill
 
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 defenseAapo Kyrölä
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningCastLabKAIST
 
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 Ryan Rossi
 
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 2018Universitat Politècnica de Catalunya
 

Similar to 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
 

Recently uploaded

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, Adobeapidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
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...Jeffrey Haguewood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
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 businesspanagenda
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
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 SavingEdi Saputra
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 

Recently uploaded (20)

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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
+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...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

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