(binding of isaac)

Every Map an Evolution, Every Room a Generation: Co-Evolution in a Procedurally-Generated Video Game

Erik Fredericks, frederer@gvsu.edu
GPTP, June 4th, 2026

https://efredericks.github.io

bottom-corner (website qr code)

Background gif: Binding of Isaac
(nethack)

Premise

Create a fully-evolved two-dimensional rogue/lite/ game

All aspects of procedural content generation (PCG) managed by genetic programming (GP)

  • Map creation
  • Entity placement
  • Enemy AI control
.
(screenshot)

Status

One GP active and one in progress

  • Dungeon generation (functioning, optimization required)
  • Enemy AI programming (hooks in place)
  • GP co-evolution in progress
.

Why - making a game map/environment

tiled
behavior tree
.

Procedural content generation

What is PCG?

  • Algorithmically-placing and generating content [8,9,11,12,13,14]

Why PCG?

  • Save the developer/designer time and effort!
    • One would think...

Goal for GP?

  • Optimize for variety and difficulty in game experience
Erik Fredericks | GPTP26

Optimizing PCG

PCG is typically parameterized

Things we can optimize (via GP/EC) [7,11,12,13]:

  • Ideal/diverse enemy behaviors

    • Behavior trees or programs
      • E.g., [Move towards player, queue a bullet pattern, fire, wait 10 seconds, repeat]
  • Variety in environments

    • Obstacle/tile placement
      • E.g., #.t.$e represents wall, space, gold, enemy
        • Represented as 2D/3D grid, graph, etc.
Erik Fredericks | GPTP26

Prior art

There has been a lot done with PCG and evolutionary computation

  • Cooke et al. explored co-evolution for game generators [1,2]

  • Stanley et al. used neuroevolution in games to train entities, generate environments, etc. [3,4,5,6]

  • When game entities are considered agents, all kinds of interesting related work comes into play (planning in supervenience, Avida, etc.) [16,17,18]

Erik Fredericks | GPTP26
(flow chart)

Workflow

Erik Fredericks | GPTP26

Genome

  1. Individual room layouts
  • 2D grid of characters to represent obstacles, painful obstacles, items, and enemies
  • Room connections currently unoptimized
  1. Enemy programs (tied to entities in room)
  • List of actions to be executed in order
  • Physics parameters (e.g., bullet speed, enemy acceleration, sensing radius)
Erik Fredericks | GPTP26

Fitness functions

fitness=scorelayoutpenaltydifficulty\underline{fitness = score_{layout} - penalty_{difficulty}}

scorelayout=ratioobstaclesw1+ratiopain obstaclesw2+ratioopen cellsw3+numbercenter obstaclesw4+diversityenemy program w5+connectivityroomw6+chokepointsroomw7+clusteringroomw8+symmetryroomw9\begin{aligned} score_{layout} &= ratio_{obstacles} &* w_1\\ &+ ratio_{pain~obstacles} &* w_2 \\ &+ ratio_{open~cells} &* w_3 \\ &+ number_{center~obstacles} &* w_4 \\ &+ diversity_{enemy~program~} &* w_5 \\ &+ connectivity_{room} &* w_6 \\ &+ chokepoints_{room} &* w_7 \\ &+ clustering_{room} &* w_8 \\ &+ symmetry_{room} &* w_9 \end{aligned}

penaltydifficulty=scoredifficultytargetdifficultyscoredifficulty=scorespacew10+scorehazardsw11+scorechokepointsw12+scoreaggressionw13+scorecomplexityw14+scorecenter pressurew15\begin{aligned} penalty_{difficulty} &= score_{difficulty} - target_{difficulty} & \\ {}\\ score_{difficulty} &= score_{space} &* w_{10} \\ &+ score_{hazards} &* w_{11} \\ &+ score_{chokepoints} &* w_{12} \\ &+ score_{aggression} &* w_{13} \\ &+ score_{complexity} &* w_{14} \\ &+ score_{center~pressure} &* w_{15} \end{aligned}


targetdifficultytarget_{difficulty} increased per floor

.

Sample outputs (room generation)

Difficulty: 0.36 Difficulty: 0.45 Difficulty: 0.50
Erik Fredericks | GPTP26

Sample outputs (enemy program)

Enemy: WAIT_20,AIM,WAIT_20,FIRE_ONE,WAIT_20,AIM,WAIT_20,FIRE_ONE

Enemy: WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,AIM,WAIT_20,FIRE_ONE,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,AIM,WAIT_20,FIRE_ONE,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,AIM,WAIT_20,FIRE_ONE,WAIT_20,AIM,WAIT_20,FIRE_ONE,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_8,FIRE_ALL,WAIT_40,WAIT_20,RADIAL_4,FIRE_ALL,WAIT_40

.

Next steps

  • Update genome with feedback from gameplay in current room to impact next room
    • E.g., finished quick with no health lost? Next room is harder
  • Additional fitness functions that reward room symmetry
  • Log metrics for incorporating in future runs
    • Not just all sandboxed runs
  • Full empirical evaluation
evoworld demo

Ideal goal: Larger map worlds

.

Demo

The game is playable locally and in the browser

  • Though, exiting just freezes the browser at the moment...
    • (works fine in local builds)
  • Gameplay based on Zenva tutorial [15]

 
 

https://efredericks.github.io/gp-roguelite/

Erik Fredericks | GPTP26

References

  • [1] Cook, M., Colton, S., & Gow, J. (2016). The angelina videogame design system—part i. IEEE Transactions on Computational Intelligence and AI in Games, 9(2), 192-203.
  • [2] Cook, M., Colton, S., & Gow, J. (2016). The angelina videogame design system—part ii. IEEE Transactions on Computational Intelligence and AI in Games, 9(3), 254-266.
  • [3] Togelius, J., Champandard, A. J., Lanzi, P. L., Mateas, M., Paiva, A., Preuss, M., & Stanley, K. O. (2013). Procedural content generation: Goals, challenges and actionable steps.
  • [4] Stanley, K. O., Bryant, B. D., & Miikkulainen, R. (2005). Real-time neuroevolution in the NERO video game. IEEE transactions on evolutionary computation, 9(6), 653-668.
  • [5] Pugh, J. K., Soros, L. B., Frota, R., Negy, K., & Stanley, K. O. (2017, September). Major evolutionary transitions in the voxelbuild virtual sandbox game. In Artificial Life Conference Proceedings (pp. 553-560). One Rogers Street, Cambridge, MA 02142-1209, USA journals-info@ mit. edu: MIT Press.
  • [6] Hastings, E. J., Guha, R. K., & Stanley, K. O. (2009). Automatic content generation in the galactic arms race video game. IEEE Transactions on Computational Intelligence and AI in Games, 1(4), 245-263.
  • [7] Taylor, T., Bedau, M., Channon, A., Ackley, D., Banzhaf, W., Beslon, G., ... & Wiser, M. (2016). Open-ended evolution: Perspectives from the OEE workshop in York. Artificial life, 22(3), 408-423.
  • [8] Hendrikx, M., Meijer, S., Van Der Velden, J., & Iosup, A. (2013). Procedural content generation for games: A survey. ACM Transactions on Multimedia Computing, Communications, and Applications (TOMM), 9(1), 1-22.
  • [9] Shaker, N., Togelius, J., & Nelson, M. J. (2016). Procedural content generation in games.
.

References

  • [10] Streasick, S., Fredericks, E., DeVries, B., & Woodring, I. (2025, June). Incorporating Multiple Self-Adaptive Agents in Games. In Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering (pp. 1469-1476).
  • [11] Cai, Y., Miao, C., Tan, A. H., Shen, Z., & Li, B. (2009). Creating an immersive game world with evolutionary fuzzy cognitive maps. IEEE computer graphics and applications, 30(2), 58-70.
  • [12] de Pontes, R. G., & Gomes, H. M. (2020, November). Evolutionary procedural content generation for an endless platform game. In 2020 19th Brazilian Symposium on Computer Games and Digital Entertainment (SBGames) (pp. 80-89). IEEE.
  • [13] Zamorano López, M. D. M., Blasco, D., Cetina, C., & Sarro, F. (2025, April). Video game procedural content generation through software transplantation. In International Conference on Software Engineering: Software Engineering in Practice. IEEE/ACM.
  • [14] Rollings, A. (2010). Fundamentals of game design.
  • [15] Zenva. (2026). Build a Complete Roguelike from Scratch with Godot. https://academy.zenva.com/course/godot-roguelike-course/
  • [16] Spector, L. A. (1992). Supervenience in dynamic-world planning. University of Maryland, College Park.
  • [17] Ofria, C., & Wilke, C. O. (2004). Avida: A software platform for research in computational evolutionary biology. Artificial life, 10(2), 191-229.
  • [18] Gigliotta, O., Miglino, O., Schembri, M., & Di Ferdinando, A. (2014). Building up serious games with an artificial life approach: Two case studies. In Evolution, complexity and artificial life (pp. 149-158). Berlin, Heidelberg: Springer Berlin Heidelberg.
.
(thank you - https://www.pexels.com/photo/cursive-text-on-a-paper-11341894/)
Erik Fredericks | GPTP26
Erik Fredericks | GPTP26

Backup slides

Erik Fredericks | GPTP26
(noita)
(boi)
Erik Fredericks | GPTP26
(lttp)
(sunless skies)

Why - making a game map/environment

 
 
 
 
 
 
 
 
 
 

Erik Fredericks | GPTP26
(minecraft)

PCG basic concept

Use math/algorithms to place content intelligently

  • Dungeons, items, etc.

Noise functions:

  • Calculate a noise value based on inputs and configurations

    • E.g., Perlin noise, Simplex noise,
  • Map that value to something useful

Erik Fredericks | GPTP26
(minecraft)

For example - Perlin noise

For example (in p5):

let n = noise(x * 0.01, y * 0.01);

  • n = [0.0, 0.5] -- (x, y) -> water
  • n = (0.5, 0.6] -- (x, y) -> beach

There are other noise functions! Worley noise, Simplex noise, etc.

Noise function mappings:

  • Environment biome
  • Map height
  • Enemy spawns
.

![bg cover opacity:0.2 (looping perlin noise)](https://necessarydisorder.wordpress.com/wp-content/uploads/2017/11/agif3opt.gif)

- background intentional - not a traditional roguelike (though that would be fun too) - created as part of a game jam at GVSU

background intentional - not a traditional roguelike (though that would be fun too)

procedural content generation 2d tilemaps entities with tree/list behaviors state machines

- which bullet pattern, how fast, etc.

In philosophy, supervenience refers to a relation between sets of properties or sets of facts. X is said to supervene on Y if and only if some difference in Y is necessary for any difference in X to be possible. (https://en.wikipedia.org/wiki/Supervenience)

$layout_score = ratio of obstacles [0.1, 0.25]% ratio of pain obstacles [0.03, 0.15] ratio of open cells [0.5, 1.0] ratio of obstacles in center [0, 3] diversity of enemy program$ ## shape of room maximize connectivity score chokepoints score clustering score symmetry difficulty_penalty = difficulty_score - target_difficulty difficulty_score = estimate_difficulty() <pre>func estimate_difficulty() -> float: var d = 0.0 d += score_difficulty_space() * 0.25 d += score_difficulty_hazards() * 0.15 d += score_difficulty_chokepoints() * 0.20 d += score_difficulty_aggression() * 0.25 d += score_difficulty_complexity() * 0.10 d += score_difficulty_center_pressure() * 0.05 return clampf(d, 0.0, 1.0)</pre>

![bg w:400](img/gptp-screenshots/screen.36diff.png) ![bg w:400](img/gptp-screenshots/screen.45diff.png) ![bg w:400](img/gptp-screenshots/screen.50diff.png)

![bg right (evoworld gif)](img/evoworld.gif)

- potentially even a win condition - 500x500 grid - things are slow

Examples!

BoI: room templates with PCG placement

LttP: hand-crafted Sunless Skies: hand-crafted with procedural elements

Typically, returns a value in [-1.0, 1.0] (p5js uses [0.0, 1.0])

- `n = (0.6, 0.9] -- (x, y) -> grass` - `n = (0.9, 1.0] -- (x, y) -> rock`