Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-games


Published on

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.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 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
  • Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-games

    1. 1. Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-games<br /><br />CIG 2010 – Copenhagen, Denmark<br />Adam M. Smith (presenter),and Michael Mateas<br />
    2. 2. Project goal:Generate a rich space of game rulesets.<br />
    3. 3. Offline ruleset generation example<br />Offline ruleset generation is part of automating the game design process.<br />Ludi(Browe/Maire, 2010)<br />Evolved board games<br />Simulated play for evaluation<br />commercially published game outputs (ex: Yavalath)<br />
    4. 4. Online ruleset generation example<br />New game design idea: Explore a large space of game designs as an integrated, in-game activity!<br />ROM CHECK FAIL<br />Captain Forever<br />Variations Forever?<br />
    5. 5. Inspiring work from CIG 2008<br />“An experiment in automatic game design” (Togelius/Schmidhuber at CIG 2008)<br />Design variables:<br />time/score limits<br />numbers of “things”<br />movement logics<br />collision/score effects<br />Evolutionary optimization of “fun” metric<br />A sample game<br />
    6. 6. VF’s design space<br />Design elements:<br />Agent types<br />Collision effects<br />Movement models<br />Procedural obstacle placement <br />Explicit victory conditions<br />Camera control<br />…<br />Variable number of agent types (each with own details and interactions)<br />
    7. 7. Mini-game demo<br />
    8. 8. Representing rulesets as logical terms<br />Rich rulesets require representing both data structures and code structures.<br />Symbolic terms from logic programming provide a unified representation.<br />
    9. 9. Representing rulesets (1)<br />Boolean flags:<br />permadeath.<br />debug_mode.<br />disable_teleportation.<br />
    10. 10. Representing rulesets (2)<br />Key-value mappings:<br />initial_health(100).<br />radar_range(long).<br />weather_model(springtime).<br />
    11. 11. Representing rulesets (3)<br />Properties of / relations between objects:<br />damage(sword_of_might,11).<br />xp_for_kill(cave_rat,100).<br />allies(humans,elves).<br />
    12. 12. Representing rulesets (4)<br />Nested expressions:<br />scripted_event( spawn(boss,temple),120).<br />achieved_when(quest_complete, and(dead(boss),holding(amulet)).<br />
    13. 13. Representing rulesets (5)<br />Sets:<br />move(rock).move(paper).move(scissors).move(lizard).move(spock).<br /><ul><li>Sequences:
    14. 14. phase(1,movement). phase(2,combat).phase(3,diplomacy).</li></li></ul><li>Representing rulesets (6)<br />Variable-size lookup tables:<br />collide(red, blue, kill).collide(blue, red, nothing).collide(red, green, bounce).collide(green, red, bounce).collide(green, blue,level_up).<br />
    15. 15. Representing other stuff<br />RTS level design<br />terrain_type(3,8,grass).terrain_type(3,9,rocks).…terrain_height(3,8,22).terrain_height(3,9,25).…resource_tile(5,20,energy(10)).…initial_base(10,22,player1).<br />4X tech tree structure<br />tech_name(22,level(5,upgrade(infantry,attack))).tech_requires(22,16).tech_requires(22,4).tech_unit_modifier(22,infantry,defense,plus(5)).<br />
    16. 16. Example ruleset in VF prototype<br />space_resolution(32,24).<br />space_topology(spherical).<br />background(grids; stars).<br />active_agent(red;yellow;white;cyan).<br />agent_movement(red,asteroids;white,asteroids;yellow,roguelike;cyan,pacman).<br />agent_population(red,many;white,singleton;yellow,singleton;cyan,many).<br />agent_collide_effect(red,white,kill;cyan,yellow,kill).<br />player_agent(white). <br />obstacle_distribution(enclosure;random_walls;random_blocks).<br />obstacle_collide_effect(red,kill;white,kill).<br />goal(kill_all(red)).<br />player_agent(white).<br />goal(kill_all(red)).<br />agent_collide_effect(red,white,kill).<br />agent_movement(white,asteroids).<br />
    17. 17. We need a generative space of logical terms.<br />
    18. 18. Generating logical terms<br />Answer Set Programming <br />Prolog-style logic programming (facts and rules) …<br />with choice rules<br />and integrity constraints<br />Usage:<br />Answer Sets<br />Logic Program<br />Answer Set<br />Solver<br />
    19. 19. Simple choice rules<br />Design task: Select an active subset of three or more agent colors.<br />Design space specification<br />color(red).<br />color(blue).<br />color(green).<br />color(white).<br />color(magenta).<br />color(yellow).<br />3 { agent(C) :color(C) }.<br /> Background facts<br /> Choice rule<br />agent(red).agent(white).agent(yellow).<br />agent(green).agent(white).agent(magenta).<br /> Example answer sets<br />
    20. 20. Complex choice rules<br />Design task: Assign every active agent type an optional obstacle collision effect if obstacles are actually enabled.<br />Design space specification<br />collide_effect(kill).<br />collide_effect(bounce).<br />0 { obstacle_collide_effect(C,Effect)<br /> :collide_effect(Effect) } 1 :- agent(C),obstacles_enabled.<br />obstacle_collide_effect(red, kill).<br />obstacle_collide_effect(white, bounce).<br />Example answer set<br />
    21. 21. Integrity constraints<br />Design task: Disallow roguelike-moving agents from bouncing.<br />Integrity constraint<br />:- agent(A),agent_movement(A,roguelike), agent(B),agent_collide_effect(A,B,bounce). <br />agent(red).<br />agent_movement(red,roguelike).<br />agent_collide_effect(red,white,bounce).<br />Undesirable answer set slice<br />
    22. 22. Expressive constraints via integrated analysis<br />Design task: Detect when a game requires indirect pushing to win, and then require all games have this property.<br />winnable_via(indirect_push(C1,C2)) :- … .<br />:- player_agent(A), goal(kill_all(B)),<br />notwinnable_via(indirect_push(A,B)).<br />
    23. 23. Evaluation<br />Was the ruleset space rich?<br />revealed engine design issues<br />contained unexpected twists!<br />Were the constraints expressive?<br />easily eliminate undesired design subspaces<br />creating a specialized indirect-push game generator<br />Can it be used in practice?<br />integrated it into a Flash game<br />Shippable PCG requires a trustable space with interesting variety. Pathological failure cases???<br />
    24. 24. Summary of approach<br />Logic Program<br />Design space specification<br />Enumerated options<br />Term structure grammars<br />Conditional dependence<br />Pattern detectors<br />Requirements<br />Exceptions<br />Optimizable metrics<br />…<br />Answer Sets<br />Game content artifacts<br />Boolean flags<br />Sets<br />Sequences<br />Tables<br />Graphs<br />…<br />Scripts<br />Triggers<br />FSMs<br />Behavior trees?<br />…<br />Answer Set<br />Solver<br />
    25. 25. Bonus round: Variations on anything<br />Goal:<br />Procedurally generate some rulesets.<br />Result:<br />Procedurally generate arbitrary logically-described content.<br />
    26. 26. Case in point: Warzone 2100 map generation<br />Diorama (Warzone Map Tools)<br />“Looks to make as good or better maps than 90% of mappers efforts over the last 10 years.” – player comment on public gaming forum<br />
    27. 27. Thank you<br />Variations Forever: Flexibly Generating Rulesets from a Sculptable Design Space of Mini-Games<br />Presenter:<br />Adam M. Smith<br /><br />