Abstract—Variations Forever is a novel game in which the player explores a vast design space of mini-games. In this pa-per, we present the procedural content generation research which makes the automatic generation of suitable game rulesets possible. Our generator, operating in the domain of code-like game content exploits answer-set programming as a means to declaratively represent a generative space as distinct from the domain-independent solvers which we use to enumerate it. Our generative spaces are powerfully sculptable using concise, declarative rules, allowing us to embed significant design know-ledge into our ruleset generator as an important step towards a more serious automation of whole game design process.
Streamlining Python Development: A Guide to a Modern Project Setup
Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-games
1. Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-games amsmith@soe.ucsc.edu CIG 2010 – Copenhagen, Denmark Adam M. Smith (presenter),and Michael Mateas
3. Offline ruleset generation example Offline ruleset generation is part of automating the game design process. Ludi(Browe/Maire, 2010) Evolved board games Simulated play for evaluation commercially published game outputs (ex: Yavalath)
4. Online ruleset generation example New game design idea: Explore a large space of game designs as an integrated, in-game activity! ROM CHECK FAIL Captain Forever Variations Forever?
5. Inspiring work from CIG 2008 “An experiment in automatic game design” (Togelius/Schmidhuber at CIG 2008) Design variables: time/score limits numbers of “things” movement logics collision/score effects Evolutionary optimization of “fun” metric A sample game
6. VF’s design space Design elements: Agent types Collision effects Movement models Procedural obstacle placement Explicit victory conditions Camera control … Variable number of agent types (each with own details and interactions)
8. Representing rulesets as logical terms Rich rulesets require representing both data structures and code structures. Symbolic terms from logic programming provide a unified representation.
18. Generating logical terms Answer Set Programming Prolog-style logic programming (facts and rules) … with choice rules and integrity constraints Usage: Answer Sets Logic Program Answer Set Solver
19. Simple choice rules Design task: Select an active subset of three or more agent colors. Design space specification color(red). color(blue). color(green). color(white). color(magenta). color(yellow). 3 { agent(C) :color(C) }. Background facts Choice rule agent(red).agent(white).agent(yellow). agent(green).agent(white).agent(magenta). Example answer sets
20. Complex choice rules Design task: Assign every active agent type an optional obstacle collision effect if obstacles are actually enabled. Design space specification collide_effect(kill). collide_effect(bounce). 0 { obstacle_collide_effect(C,Effect) :collide_effect(Effect) } 1 :- agent(C),obstacles_enabled. obstacle_collide_effect(red, kill). obstacle_collide_effect(white, bounce). Example answer set
22. Expressive constraints via integrated analysis Design task: Detect when a game requires indirect pushing to win, and then require all games have this property. winnable_via(indirect_push(C1,C2)) :- … . :- player_agent(A), goal(kill_all(B)), notwinnable_via(indirect_push(A,B)).
23. Evaluation Was the ruleset space rich? revealed engine design issues contained unexpected twists! Were the constraints expressive? easily eliminate undesired design subspaces creating a specialized indirect-push game generator Can it be used in practice? integrated it into a Flash game Shippable PCG requires a trustable space with interesting variety. Pathological failure cases???
24. Summary of approach Logic Program Design space specification Enumerated options Term structure grammars Conditional dependence Pattern detectors Requirements Exceptions Optimizable metrics … Answer Sets Game content artifacts Boolean flags Sets Sequences Tables Graphs … Scripts Triggers FSMs Behavior trees? … Answer Set Solver
25. Bonus round: Variations on anything Goal: Procedurally generate some rulesets. Result: Procedurally generate arbitrary logically-described content.
26. Case in point: Warzone 2100 map generation Diorama (Warzone Map Tools)http://warzone2100.org.uk/ “Looks to make as good or better maps than 90% of mappers efforts over the last 10 years.” – player comment on public gaming forum
27. Thank you Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-Games Presenter: Adam M. Smith amsmith@soe.ucsc.edu
Notas do Editor
Rulesets, unlike characters stats or level designs, have code-like structure that doesn’t easily fit in fixed-shape data structures like a feature vector.Let’s look at what ruleset generation could be used for.
Just to mention one project.Ludi’s generator was specific to board games. I will show you a very general approach, but not plug it into a closed-loop design model.
Left: two indie gamesRCF: generative space of mini-games that come at you, one after anotherCF: design space of modular ships that you construct, come to understand design principles through playVF: design we envision and have built a small prototype ofPlayer: incrementally unlock design element and build constraints to control recombination – a game where player sculpts design space of mini-games
LikeLudi, but for simple videogames: single-player, real-time, arcade play experienceYou control the cyan thing, move around and bump into other colored things with different…We don’t have benchmark problems in videogame ruleset generation right now, so we decided to use this work as a kind of reference point.
Upgrade to richer representation, demand finer-grained control over the design space.We gave more responsibility over design decisions to our ruleset generator.Variable number: says representation can’t be a fixed-length array of integers, needs to be a structured-but-variable-size collection
A giant video demo! Obstacle patterns, moving viewpoint, glittery art, white guy is collecting/killing red guysWe will show the concrete ruleset for this game later on.Take a step back: figure out what you need to express to represent a ruleset – what you have to specify to describe design decisions in a mini-game
…Next few slides: examples of symbolic, logical terms as representations
Usage: represent the choice to some mechanic on and off
Usage: configure parameterized mechanics
Usage: parameterize interactions between game objects
Nesting of terms! Looking very code-like.Usage: build complex data structures (ex: timed event script) or complex control structures (ex: situation detector)
You can build collections using many terms with the same structureUsage: collect or sequence small pieces for different emergent effects
Like a 2D array, but the objects used for lookup might come from other freshly generated collections-- represent data like a social graph or rules like transitions in an FSM
I’m focusing on rulesets, but the idea of “data” and “code” here are pretty general.-- rts level design details use big collections of a small number of term structures-- tech tree for a 4x game be much smaller but describe richer structureEnough tutorial. Let’s get to the real stuff we generated.
Here is the ruleset for the game in the video (or perhaps a slight variation, there are so many…)Left: complete ruleset for VF prototypeRight: Screenshot of this particular ruleset in actionBottom: Key points in ruleset (other details include: how obstacles are placed, their effect on the various kinds of agents)
We ALSO need a nice representation for this generative space.
Prolog: facts and rulesChoice rules: invention of new factsIntegrity constraints: filtering of inconsistent factsSame way you feed a SAT problem to a SAT solver and get truth assignments as outputs (some ASP solvers even work this way)
Color facts are simple logical statements that are always true (red is indeed a color).Choice rule says what MIGHT be true (red might be an agent).3 on the left means the expression inside should be true at least 3 times (up to as many colors as there are).Various answer sets show everything that is true in the different compatible worlds
Demonstrates conditional structure.Output of one part of generator is input to another
Eliminate some combination that is otherwise possible.Roguelike motion model doesn’t support momentum. My call as the designer to say this doesn’t make sense in my generated mini-games.In the code, IC is like a headless rule. If it is every satisfied, that potential answer set is thrown out.
You control a red guy, goal is to kill all red. Touching border kills you, but your buddies stay alive (failure). Solution, push them into the wall first and then jump in after them.An unforeseen twist, we, as designers, didn’t put in there intentionally – emergence is common in rich representations. We wanted to investigate!Use standard logic programming to detect the chain of indirect actions which allows indirect push victory. (~10 lines)Use an integrity constraint to require that property to be present.Detection logic is DIRECTLY integrated into generator! (vs. external generate-and-test)Evaluation next
Issues: showed us combinations we hadn’t thought to test yet (bouncing with the roguelike model)Twists: indirect-push games that emergedUndesired: collision effects were consistent with stated game goalSpecialized generator: integrating analysis of rulesets meant we didn’t need to leave the generator code to test for that propertyFlash: brittle, command-line tools, yes, but plumbing to integrate with a deployable flash game is not too hard to overcomePathlogical: major stumbling block for adoption of online PCG (spore planets) ASP: simply dissallow them if you can write down what the problem is (not complete, but start at having the tools respect this major issue)
Shippable pcg requires a trustable space with interesting variety.Trust: very concise, declarative definition of the design space so that people can agree &- constructs for easily reshaping the space into one that you do trustVariety: program can define spaces of astronomical size, sample them at 10,000+/sec&- high-performance generation for gigantic spaces
To put some teeth behind my claim: here is some independent PCG work using ASP as the core generative approachBase and resource positions, heightfieldwith distinct cliff features, Plausible placement of roads, ruins, and other doodadsTerrain-adapted layout of starting bases and defensive walls metrics: base distances, resource distances, bottleneck width – set constraints on these metrics and then solve – no optimization, just requiring “good enough”* downloadable, open source, outputs already included in standard wz2100 map set* You can read this quote for yourself