Sturgeon is a system for constraint-based level generation.
-
You will need Python 3.14 and pipenv on your system. To install pipenv, if needed:
pip3 install pipenv -
Pipenv is used to set up an environment. One of these commands needs to be run once (in any root folder for this project):
-
Set up the environment with pipenv. By default, pipenv will try to install all the solvers.
pipenv install -
Or, it is also possible to set up with only the default PySAT-based solvers:
pipenv install --categories solvers-minimal -
Or, set up the environment with no solvers (only utilities will be usable):
pipenv install --categories solvers-none -
Or, on Windows, using an older version of Python (3.12) may be needed:
pipenv install --python 3.12 --categories solvers-minimal
-
-
Any commands will need to be run in this environment. Each time a shell is needed, start a shell in the environment with:
pipenv shell
For example usage (within pipenv), see:
examples_basic.sh- basic use with tile-based levelsexamples_solver.sh- use of different solversexamples_custom.sh- custom contraints, such as tile counts, level repair, and level extensionexamples_junction.sh- junctions for adding multiple reachable and unreachable pathsexamples_blend.sh- blending different games, using tiles and reachabiity from multiple games in one levelexamples_mkiii.sh- MKIII tile rewrite rules for generating playthroughsexamples_spacetime.sh- learning and applying spacetime patterns from examplesexamples_graph.sh- graph generationexamples_mkiv.sh- MKIV graph label rewrite rules for generating playthroughsexamples_editor.sh- setup and use of level editor applicationexamples_explorer.sh- setup and use of explore files and level explorer applicationexamples_file.sh- file conversion utilitiesexamples_external.sh- use of external solver executables
Tiles:
input2tile.py- get tileset and tile levels from example levels, produce tile filetile2scheme.py- get patterns and counts from tile file, produce scheme filescheme2output.py- generate levels using a scheme file
Tile Utilities:
level2repath.py- recompute path(s) through a leveltag2game.py- produce a game id file based on tag file and schemename2json.py- produce a json description of named infomration, such as reachability templatefile2file.py- convert between a few different formats, usually between pickle and json
Applications:
app_editor.py- level editor, draw tiles and paths and generate levels interactively, needs scheme fileapp_explorer.py- level explorer, explore a datast of levels, needs explorer file
Level Explorer:
levels2explore.py- produce an explore file dataset from given levelsexplore2summary.py- display a summary of an explore file
Graphs:
graph2gdesc.py- get graph description from graphsgdesc2graph.py- generate graphs based on graph description
Graph Utilities:
gdesc2summary.py- display a summary of a graph description filedot2graph.py- convert dot file to graph filegraph2dot.py- convert graph file to dot filepdb2graph.py- convert pdb to graph filegraph2pdb.py- convert graph file to pdbtile2graph.py- convert tile file to graph filemkiv2dot.py- create dot file of MKIV rulesdot2pdf.py- convert potentially multiple dot files to single pdf
.lvl,.tag,.game- text files containing text level, tags, or game ids, respectively; may contain metadata, sometimes used interchangeably.tileset- a tileset.tile- a tileset and levels.scheme- information needed to generate a level, such as tileset and patterns.result- a generated level and related metadata.tlvl- tile level in json.explore- dataset of levels for the level explorer app.gr- a graph.gd- graph description, such as patterns extracted from an example
-
Seth Cooper. 2022. "Sturgeon: tile-based procedural level generation via learned and designed constraints." Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, 18(1), 26-36. https://doi.org/10.1609/aiide.v18i1.21944
-
Seth Cooper. 2022. "Constraint-based 2D tile game blending in the Sturgeon system." Proceedings of the Experimental AI in Games Workshop. https://doi.org/10.17605/OSF.IO/VBUW5
-
Seth Cooper. 2023. "Sturgeon-GRAPH: constrained graph generation from examples." Proceedings of the 18th International Conference on the Foundations of Digital Games. https://doi.org/10.1145/3582437.3582465
-
Seth Cooper. 2023. "Sturgeon-MKIII: simultaneous level and example playthrough generation via constraint satisfaction with tile rewrite rules." Proceedings of the 14th Workshop on Procedural Content Generation. https://doi.org/10.1145/3582437.3587205
-
Hao Mao and Seth Cooper. 2023. "Segment-wise level generation using iterative constrained extension." Proceedings of the 2023 IEEE Conference on Games. https://doi.org/10.1109/CoG57401.2023.10333222
-
Seth Cooper and Matthew Guzdial. 2023. "path2level: constraint-based level generation from paths." Proceedings of the 2023 IEEE Conference on Games. https://doi.org/10.1109/CoG57401.2023.10333205
-
Seth Cooper and Eden Balema. 2023. "Learning constrained graph layout for content generation." Proceedings of the Experimental AI in Games Workshop. https://ceur-ws.org/Vol-3626/short4.pdf
-
Seth Cooper, Faisal Abutarab, Emily Halina and Nathan Sturtevant. 2023. "Visual exploration of tile level datasets." Proceedings of the Experimental AI in Games Workshop. https://ceur-ws.org/Vol-3626/short3.pdf
-
Seth Cooper and Mahsa Bazzaz. 2024. "Literally unplayable: on constraint-based generation of uncompletable levels." Proceedings of the 15th Workshop on Procedural Content Generation. https://doi.org/10.1145/3649921.3659844
-
Seth Cooper and Mahsa Bazzaz. 2024. "Sturgeon-MKIV: constraint-based level and playthrough generation with graph label rewrite rules." Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, 20(1), 13-24. https://doi.org/10.1609/aiide.v20i1.31862
-
Seth Cooper and Mahsa Bazzaz. 2025. "Stuck in the middle: generating levels without (or with) softlocks." Proceedings of the 16th Workshop on Procedural Content Generation. https://doi.org/10.1145/3723498.3723844
-
Seth Cooper and Mahsa Bazzaz. 2025. "A constraint-based graph grammar approach unifying level and playthrough generation." Proceedings of the Experimental AI in Games Workshop. https://ceur-ws.org/Vol-4090/short5.pdf
-
Akshar Vandara, Kaylah Facey and Seth Cooper. 2025. "Spacetime level generation and editing with constraints from examples." Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, 21(1), 142-152. https://doi.org/10.1609/aiide.v21i1.36818