Ngày đăng: 14/05/2018, 13:42
Computational Synthesis and Creative Systems Noor Shaker Julian Togelius Mark J Nelson Procedural Content Generation in Games Computational Synthesis and Creative Systems Series editors Franỗois Pachet, Paris, France Pablo Gervỏs, Madrid, Spain Andrea Passerini, Trento, Italy Mirko Degli Esposti, Bologna, Italy Creativity has become the motto of the modern world: everyone, every institution, and every company is exhorted to create, to innovate, to think out of the box This calls for the design of a new class of technology, aimed at assisting humans in tasks that are deemed creative Developing a machine capable of synthesizing completely novel instances from a certain domain of interest is a formidable challenge for computer science, with potentially ground-breaking applications in ﬁelds such as biotechnology, design, and art Creativity and originality are major requirements, as is the ability to interact with humans in a virtuous loop of recommendation and feedback The problem calls for an interdisciplinary perspective, combining ﬁelds such as machine learning, artiﬁcial intelligence, engineering, design, and experimental psychology Related questions and challenges include the design of systems that effectively explore large instance spaces; evaluating automatic generation systems, notably in creative domains; designing systems that foster creativity in humans; formalizing (aspects of) the notions of creativity and originality; designing productive collaboration scenarios between humans and machines for creative tasks; and understanding the dynamics of creative collective systems This book series intends to publish monographs, textbooks and edited books with a strong technical content, and focuses on approaches to computational synthesis that contribute not only to speciﬁc problem areas, but more generally introduce new problems, new data, or new well-deﬁned challenges to computer science More information about this series at http://www.springer.com/series/15219 Noor Shaker Julian Togelius Mark J Nelson • Procedural Content Generation in Games 123 Noor Shaker Department of Architecture, Design and Media Technology Aalborg University Copenhagen (AAU CPH) Copenhagen Denmark Mark J Nelson The MetaMakers Institute Falmouth University Penryn, Cornwall UK Julian Togelius Department of Computer Science and Engineering New York University Brooklyn, NY USA ISSN 2509-6575 ISSN 2509-6583 (electronic) Computational Synthesis and Creative Systems ISBN 978-3-319-42714-0 ISBN 978-3-319-42716-4 (eBook) DOI 10.1007/978-3-319-42716-4 Library of Congress Control Number: 2016955069 © Springer International Publishing Switzerland 2016 This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, speciﬁcally the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microﬁlms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed The use of general descriptive names, registered names, trademarks, service marks, etc in this publication does not imply, even in the absence of a speciﬁc statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made Printed on acid-free paper This Springer imprint is published by Springer Nature The registered company is Springer International Publishing AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland Preface Welcome to the Procedural Content Generation in Games book.1 This is, as far as we know, the ﬁrst textbook about procedural content generation in games As far as we know it is also the ﬁrst book-length overview of the research ﬁeld We hope you ﬁnd it useful, whether you are studying in a course, on your own, or are a researcher We wrote this book for two reasons The ﬁrst reason was that all three of us were doing research on PCG in games, and we wanted a good overview As we come from somewhat different methodological backgrounds, we realized that many researchers did not know about methods that had been developed in other communities For example, researchers using logic programming and those using evolutionary computation might not know that the other type of algorithms was applicable to the same problem; and researchers coming from computer graphics might not even know that artiﬁcial intelligence methods are being used for PCG problems As PCG in games has just recently started to be seen as its own research ﬁeld, this was not surprising, but pointed to the need for a book such as this one The second reason was that we were teaching a course on PCG (in fact, entitled simply “Procedural Content Generation in Games”) at the IT University of Copenhagen, where at the time the three of us were faculty members When this course was started in 2010, it was probably the ﬁrst of its kind in the world Naturally, there was no textbook to teach it from, so we assembled a syllabus out of academic papers, mostly recent ones As we taught the course in subsequent years, the syllabus matured, and we felt that we were ready to turn the content of our lectures into a textbook In writing the book, we based it on the structure of the existing course In fact the ﬁrst draft of this textbook was written quite literally as part of the fourth iteration of the course in autumn 2013 A draft of each chapter was completed in advance of the corresponding lecture, and given out as a handout to accompany the lecture This ensured that a complete draft of the textbook was written within one semester, and perhaps more importantly ensures that the book is designed to be used as a textbook Unfortunately, adding polish and ﬁnalising each chapter took a lot longer, Throughout the book, we will often use PCG as an acronym for procedural content generation v vi Preface which explains why the book did not come out in 2014 We believe however that the added time to work on the book was worth it, as the ﬁnal product is much better than those early drafts were As you will see, the book is not strictly divided according to either methods or application domains Most chapters introduce both a domain and method This follows how we structured our PCG course, which we did in order to make the course more engaging and easier to teach: new methods are introduced together with interesting and relevant domains that demonstrate why they are practically useful, and can be used as settings for lab exercises to further experiment with the methods We decided early on that we wanted to involve many of the most active people in the research ﬁeld, in particular those who had written the papers we relied on when teaching the course initially Therefore, most chapters are coauthored with other researchers This ensures that we have the most relevant expertise for the topic of each chapter As mentioned above, one of the main purposes of this book is as a textbook Its origins as a set of course notes has also helped ensure that the book is “battle-tested” and ready to teach from In particular, the book can be used as the main course text for a graduate-level or advanced undergraduate-level course on Procedural Content Generation in Games It is assumed that students are familiar with basic artiﬁcial intelligence concepts (in particular heuristic search and basic concepts of logic and machine learning) and it is very beneﬁcial (though not strictly necessary) that students have some experience of game development and using a game engine This book could be used as course literature in several ways One is to base each lecture on a speciﬁc chapter, and assign a few recent papers from the literature related to that chapter as additional reading for that week The assignment at the end of each chapter could then be used as that week’s assignment, and a conventional pen-and-paper exam could be held at the end of the course Another way of organizing such a course, more closely aligning with the way the original course at the IT University of Copenhagen is taught, could be to use the ﬁrst half of the semester for intensive lectures, covering two chapters per week The second half of the semester is then used for group projects.2 Finally, you can always use parts of the book, for example if you want to teach PCG as part of a larger course in AI for games Most chapters are reasonably self-contained, with the most important dependencies being on the ﬁrst two chapters, which establish core concepts and terminology Therefore it is advisable to start with chapters and even if only using parts of the book The book is accompanied by a webpage, pcgbook.com, which contains digital versions of the book chapters, along with example lecture slides, links to relevant mailing groups and conferences, and other supplemental material We welcome suggestions for new supplemental material (e.g your own lecture slides) to add to the website Our updated contact information can also be found there Of course, in any book-sized effort, one relies on the help of a large number of other people Our ﬁrst and foremost thanks go to our collaborators and co-authors on the various chapters of the book We are also very grateful to our students in the Many good papers came out of the group projects from that course Preface vii PCG course who endured various draft versions of the book, as well as our actual lectures, and in many cases provided very useful feedback Several other colleagues have provided useful feedback or helped out in other ways; the list includes Steve Dahlskog, Amy Hoover and Aaron Isaksen Noor Shaker, Julian Togelius, and Mark Nelson Contents Introduction Julian Togelius, Noor Shaker, and Mark J Nelson 1.1 What is procedural content generation? 1.2 Why use procedural content generation? 1.3 Games that use PCG 1.4 Visions for PCG 1.5 Desirable properties of a PCG solution 1.6 A taxonomy of PCG 1.6.1 Online versus ofﬂine 1.6.2 Necessary versus optional 1.6.3 Degree and dimensions of control 1.6.4 Generic versus adaptive 1.6.5 Stochastic versus deterministic 1.6.6 Constructive versus generate-and-test 1.6.7 Automatic generation versus mixed authorship 1.7 Metaphors for PCG 1.8 Outline of the book 1.9 Summary References The search-based approach Julian Togelius and Noor Shaker 2.1 What is the search-based approach to procedural content generation? 2.2 Evolutionary search algorithms 2.2.1 Other types of search algorithms 2.3 Content representation 2.4 Evaluation functions 2.4.1 Direct evaluation functions 2.4.2 Simulation-based evaluation functions 2.4.3 Interactive evaluation functions 1 7 8 9 10 10 12 14 14 17 17 18 20 20 22 23 23 24 ix x Contents 2.5 Example: StarCraft maps 2.6 Example: Racing tracks 2.7 Example: Board game rules 2.8 Example: Galactic Arms Race 2.9 Lab exercise: Evolve a dungeon 2.10 Summary References 24 25 26 27 27 28 29 Constructive generation methods for dungeons and levels Noor Shaker, Antonios Liapis, Julian Togelius, Ricardo Lopes, and Rafael Bidarra 3.1 Dungeons and levels 3.2 Space partitioning for dungeon generation 3.3 Agent-based dungeon growing 3.4 Cellular automata 3.5 Grammar-based dungeon generation 3.6 Advanced platform generation methods 3.7 Example applications to platform generation 3.7.1 Spelunky 3.7.2 Inﬁnite Mario Bros 3.8 Lab session: Level generator for InﬁniTux (and Inﬁnite Mario) 3.9 Summary References 31 Fractals, noise and agents with applications to landscapes Noor Shaker, Julian Togelius, and Mark J Nelson 4.1 Terraforming and making noise 4.1.1 Heightmaps and intensity maps 4.2 Random terrain 4.2.1 Interpolated random terrain 4.2.2 Gradient-based random terrain 4.3 Fractal terrain 4.4 Agent-based landscape creation 4.4.1 Doran and Parberry’s terrain generation 4.5 Search-based landscape generation 4.5.1 Genetic terrain programming 4.5.2 Simple RTS map generation 4.6 Lab session: Generate a terrain with the diamond-square algorithm 4.7 Summary References Grammars and L-systems with applications to vegetation and levels Julian Togelius, Noor Shaker, and Joris Dormans 5.1 Plants are everywhere 5.2 Grammars 5.3 L-systems 31 33 38 42 45 47 49 49 51 52 53 54 57 57 58 59 59 61 62 64 65 68 68 69 70 71 71 73 73 74 75 ... de Kraker, K., Bidarra, R.: Integrating procedural generation and manual editing of virtual worlds In: Proceedings of the Workshop on Procedural Content Generation in Games ACM (2010) 27 Smith,... Computational Intelligence and AI in Games 2(1), 1–16 (2010) Compton, K., Osborn, J.C., Mateas, M.: Generative methods In: Proceedings of the 4th Workshop on Procedural Content Generation in Games (2013)... for procedural content generation in games In: Proceedings of the 2013 ACM SIGCHI Conference on Human Factors in Computing Systems, pp 1509–1518 (2013) 15 Maxis: (2008) Spore, Electronic Arts Introduction
- Xem thêm -
Xem thêm: Procedural content generation in games , Procedural content generation in games , 8 Lab session: Level generator for InfiniTux (and Infinite Mario), 6 Lab session: Generate a terrain with the diamond-square algorithm, 7 Lab exercise: Create plants with L-systems, 7 Lab exercise: Write a story domain model, 7 Exercises: Elaborations in dungeon generation, 2 Representing dungeons: A maze of choices, 5 Lab exercise: Generate personalised levels for Super Mario Bros.