Synthesizing Interpretable Strategies for Solving Puzzle Games

Total Page:16

File Type:pdf, Size:1020Kb

Synthesizing Interpretable Strategies for Solving Puzzle Games Synthesizing Interpretable Strategies for Solving Puzzle Games Eric Butler Emina Torlak Zoran Popovic´ [email protected] [email protected] [email protected] Paul G. Allen School of Computer Paul G. Allen School of Computer Paul G. Allen School of Computer Science and Engineering Science and Engineering Science and Engineering University of Washington University of Washington University of Washington ABSTRACT Understanding how players interact with games is an important challenge for designers. When playing games centered around problem solving, such as logic puzzles like Sudoku or Nonograms, people employ a rich structure of domain-specic knowledge and strategies that are not obvious from the description of a game’s rules. is paper explores automatic discovery of player-oriented knowl- edge and strategies, with the goal of enabling applications ranging from diculty estimation to puzzle generation to game progression analysis. Using the popular puzzle game Nonograms as our target Figure 1: An example of a Nonograms puzzle, with the start domain, we present a new system for learning human-interpretable state on the le and completed puzzle on the right. e num- rules for solving these puzzles. e system uses program synthesis, bered hints describe how many contiguous blocks of cells powered by an SMT solver, as the primary learning mechanism. are lled with true. We mark cells lled with true as a black e learned rules are represented as programs in a domain-specic square and cells lled with false as a red X. We use the X to language for condition-action rules. Given game mechanics and a distinguish from unknown cells, which are blank. training set of small Nonograms puzzles, our system is able to learn sound, concise rules that generalize to a test set of large real-world puzzles. We show that the learned rules outperform documented eectiveness [38]. One potential use is automatically understand- strategies for Nonograms drawn from tutorials and guides, both in ing game strategies: if we can analyze the rules of the game and terms of coverage and quality. automatically deduce what the eective player strategies are, we can support a range of intelligent tools for design feedback, con- CCS CONCEPTS tent generation, or diculty estimation. For humans to use these •Computing methodologies →Articial intelligence; computer-generated strategies, they need the strategies to be both eective in the domain of interest and concisely expressed so a KEYWORDS designer can understand the whole strategy in their mind. Automated Game Analysis, Program Synthesis, Articial Intelli- Modeling player interaction is challenging because the game gence mechanics do not fully capture how human players might approach the game. is is true for all games, but especially for logic puzzle ACM Reference format: Eric Butler, Emina Torlak, and Zoran Popovic.´ 2017. Synthesizing Inter- games such as Sudoku or Nonograms. ese puzzles are straight- pretable Strategies for Solving Puzzle Games. In Proceedings of FDG’17, forward for a computer to solve mechanically by reduction to SAT Hyannis, MA, USA, August 14-17, 2017, 12 pages. or brute-force search, but humans solve them in very dierent DOI: 10.1145/3102071.3102084 ways. Rather than search, human players use a collection of in- terconnected strategies that allow them to make progress without 1 INTRODUCTION guessing. For example, there are dozens of documented strategies for Sudoku1 [33], and puzzle designers construct puzzles and rank Automated game analysis is a growing research area that aims to their diculty based on which of these strategies are used [34]. e uncover designer-relevant information about games without hu- strategies take the form of interpretable condition-action rules that man testing [21, 24, 31, 35], which can be particularly advantageous specify (1) where a move can be made, (2) what (easy-to-check) in situations where human testing is too expensive or of limited conditions must hold to make it, and (3) how to make the move. Permission to make digital or hard copies of all or part of this work for personal or Human players solve puzzles by looking for opportunities to apply classroom use is granted without fee provided that copies are not made or distributed these strategies rather than by manual deduction or search in the for prot or commercial advantage and that copies bear this notice and the full citation problem space. on the rst page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permied. To copy otherwise, or Learning and applying these strategies is the core of human republish, to post on servers or to redistribute to lists, requires prior specic permission expertise in the game. Understanding these strategies as a designer and/or a fee. Request permissions from [email protected]. allows one to eectively build and analyze puzzles and progressions. FDG’17, Hyannis, MA, USA © 2017 Copyright held by the owner/author(s). Publication rights licensed to ACM. While many such strategies can be uncovered through user testing 978-1-4503-5319-9/17/08...$15.00 DOI: 10.1145/3102071.3102084 1hp://www.sudokuwiki.org/Strategy Families contains a rather extensive list. FDG’17, August 14-17, 2017, Hyannis, MA, USA Eric Butler, Emina Torlak, and Zoran Popovic´ and designer introspection, they may not eectively cover the the resulting large set of rules to an optimal subset that strikes a puzzle design space or be the most useful or simple strategies. balance between game-state coverage and conciseness according Designers can benet from tools that, given a game’s rules, can to the given cost function. We evaluate the system by comparing help understand its strategy space. While we would prefer nding its output to documented strategies for Nonograms drawn from strategies people use, as a necessary step, we must nd strategies tutorials and guides, nding that it fully recovers many of these we can easily understand and can demonstrate are eective for the control rules and covers nearly all of game states covered by the problem-solving task. remaining rules. In this paper, we investigate automatically learning human- Our approach to learning interpretable strategies by representing friendly game playing strategies expressed as condition-action rules. them as condition-action rules dened over domain-specic con- We focus on the popular puzzle game Nonograms, also known as cepts is motivated by cognitive psychology and education research. Picross, Hanjie, O’Ekaki, or Paint-by-Numbers. A nonogram (see In this approach, a set of rules represents (a part of) domain-specic Figure 1) is a puzzle in which the player must ll in a grid of cells procedural knowledge of the puzzle game—the strategies a person with either true (black square) or false. Integer hints are given for takes when solving problems. Such domain-specic knowledge is each row and column that specify how many contiguous segments crucial for expert problem solving in a variety of domains [3, 8], of lled cells exist in each row or column. Solutions oen form from math to chess to professional activities. e DSL denes the interpretable pictures, though this is not necessary. By convention, (domain-specic) concepts and objects to which the player can refer nonograms have unique solutions and, like other logic puzzles such when solving puzzles, thus constraining the space of strategies that as Sudoku, can be solved by deducing parts of the answer in any can be learned to human-friendly ones. Our system takes this space order. Also like many logic puzzles, Nonograms is, for arbitrarily as input provided by a designer, and produces the procedural knowl- sized puzzles, NP-complete [37], but typical puzzles used in com- edge to be used by players. us, the designer can dene (and iterate mercial books and games can oen be solved with a xed set of on) the concepts over which rules are dened. e designer also greedy strategies. Even for puzzles that require some tricky moves, provides a cost function (dened over the syntax of the DSL) that greedy strategies can suce to nd a large portion of the solution. measures interpretability in terms of rule complexity, which allows A key challenge in learning these strategies is interpretability: the our system to bias the learning process toward concise, interpretable learned strategies need to be expressed in terms of game-specic rules. e eventual goal of this line of research is automatically concepts meaningful to human players, such as, in the case of discovering strategies that players are likely to use. In this work, we Nonograms, the numerical hints or state of the board. To address focus on the immediate task of nding human-interpretable rules this challenge, we developed a new domain-specic programming in a structure compatible with evidence of how players behave. language (DSL) for modeling interpretable condition-action rules. While our implementation and evaluation focuses on Nono- In contrast to previous DSLs designed for modeling games [5, 18, 23, grams, the system makes relatively weak assumptions (discussed in 24, 27], which focus on encoding the rules and representations of the detail) about the DSL used as input. Variations could be used, and game, our DSL focuses on capturing the strategies that a player can we expect DSLs representing other logic puzzles could be used in the use when puzzle solving. us, the constructs of the language are system. And while many parts of the learning mechanism are spe- game-specic notions, such as hint values and the current state of cic to logic puzzles, we expect the approach of using program syn- the board. In this way, we frame the problem of discovering player thesis for learning of human-interpretable strategies to apply more strategies for Nonograms as the problem of nding programs in our broadly, especially to domains with well-structured problem solving DSL that represent (logically) sound, interpretable condition-action (even beyond games, such as solving algebraic equations [7]).
Recommended publications
  • Programsko Rješenje Logičke Zagonetke Nonogram U Programskom Jeziku C
    Programsko rješenje logičke zagonetke nonogram u programskom jeziku C#. Džijan, Matej Undergraduate thesis / Završni rad 2018 Degree Grantor / Ustanova koja je dodijelila akademski / stručni stupanj: Josip Juraj Strossmayer University of Osijek, Faculty of Electrical Engineering, Computer Science and Information Technology Osijek / Sveučilište Josipa Jurja Strossmayera u Osijeku, Fakultet elektrotehnike, računarstva i informacijskih tehnologija Osijek Permanent link / Trajna poveznica: https://urn.nsk.hr/urn:nbn:hr:200:718571 Rights / Prava: In copyright Download date / Datum preuzimanja: 2021-09-24 Repository / Repozitorij: Faculty of Electrical Engineering, Computer Science and Information Technology Osijek SVEUČILIŠTE JOSIPA JURJA STROSSMAYERA U OSIJEKU FAKULTET ELEKTROTEHNIKE, RAČUNARSTVA I INFORMACIJSKIH TEHNOLOGIJA Sveučilišni studij PROGRAMSKO RJEŠENJE LOGIČKE ZAGONETKE NONOGRAM U PROGRAMSKOM JEZIKU C# Završni rad Matej Džijan Osijek, 2018. SADRŽAJ 1. UVOD ...................................................................................................................................... 1 1.1. Zadatak rada ..................................................................................................................... 1 2. RJEŠAVANJE NONOGRAMA .............................................................................................. 2 2.1. Koraci rješavanja .............................................................................................................. 2 2.2. Primjer rješavanja nonograma .........................................................................................
    [Show full text]
  • The Fewest Clues Problem of Picross 3D
    The Fewest Clues Problem of Picross 3D Kei Kimura1 Department of Computer Science and Engineering, Toyohashi University of Technology, 1-1 Hibarigaoka, Tempaku, Toyohashi, Aichi, Japan [email protected] Takuya Kamehashi Department of Computer Science and Engineering, Toyohashi University of Technology, 1-1 Hibarigaoka, Tempaku, Toyohashi, Aichi, Japan [email protected] Toshihiro Fujito2 Department of Computer Science and Engineering, Toyohashi University of Technology, 1-1 Hibarigaoka, Tempaku, Toyohashi, Aichi, Japan [email protected] Abstract Picross 3D is a popular single-player puzzle video game for the Nintendo DS. It is a 3D variant of Nonogram, which is a popular pencil-and-paper puzzle. While Nonogram provides a rectangular grid of squares that must be filled in to create a picture, Picross 3D presents a rectangular parallelepiped (i.e., rectangular box) made of unit cubes, some of which must be removed to construct an image in three dimensions. Each row or column has at most one integer on it, and the integer indicates how many cubes in the corresponding 1D slice remain when the image is complete. It is shown by Kusano et al. that Picross 3D is NP-complete. We in this paper show P that the fewest clues problem of Picross 3D is Σ2 -complete and that the counting version and the another solution problem of Picross 3D are #P-complete and NP-complete, respectively. 2012 ACM Subject Classification Theory of computation → Theory and algorithms for appli- cation domains Keywords and phrases Puzzle, computational complexity, fewest clues problem Digital Object Identifier 10.4230/LIPIcs.FUN.2018.25 Acknowledgements The authors are grateful to the reviewers for their valuable comments and suggestions.
    [Show full text]
  • Metadefender Core V4.17.3
    MetaDefender Core v4.17.3 © 2020 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of MetaDefender Core 14 1. Quick Start with MetaDefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Process Files with MetaDefender Core 21 2. Installing or Upgrading MetaDefender Core 22 2.1. Recommended System Configuration 22 Microsoft Windows Deployments 22 Unix Based Deployments 24 Data Retention 26 Custom Engines 27 Browser Requirements for the Metadefender Core Management Console 27 2.2. Installing MetaDefender 27 Installation 27 Installation notes 27 2.2.1. Installing Metadefender Core using command line 28 2.2.2. Installing Metadefender Core using the Install Wizard 31 2.3. Upgrading MetaDefender Core 31 Upgrading from MetaDefender Core 3.x 31 Upgrading from MetaDefender Core 4.x 31 2.4. MetaDefender Core Licensing 32 2.4.1. Activating Metadefender Licenses 32 2.4.2. Checking Your Metadefender Core License 37 2.5. Performance and Load Estimation 38 What to know before reading the results: Some factors that affect performance 38 How test results are calculated 39 Test Reports 39 Performance Report - Multi-Scanning On Linux 39 Performance Report - Multi-Scanning On Windows 43 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3.
    [Show full text]
  • Physical Zero-Knowledge Proof: from Sudoku to Nonogram
    Physical Zero-Knowledge Proof: From Sudoku to Nonogram Wing-Kai Hon (a joint work with YF Chien) 2008/12/30 Lab of Algorithm and Data Structure Design 1 (LOADS) Outline •Zero-Knowledge Proof (ZKP) 1. Cave Story 2. 3-Coloring 3. Sudoku 4. Nonogram (our work) 2008/12/30 2 Cave story 2 1 2008/12/30 3 3 Cave story If Peggy really knows the magical password 2 always pass the test 1 Victor should be convinced 3 If Peggy does not know the password very unlikely to pass all the tests Victor should be able to catch Peggy lying 2008/12/30 4 Zero-Knowledge Proof It is an interactive method : allows a Prover to prove to a Verifier that a statement is true Extra requirement : Zero-Knowledge : •Verifier cannot learn anything 2008/12/30 5 3-Coloring of a Graph Given a graph G, can we color the vertices with 3 colors so that no adjacent vertices have same color? 2008/12/30 6 3-Coloring of a Graph One possible method: 1. Verifier leaves the room 2. Prover colors vertices properly (in R, G, B) and then covers each vertex with a cup lid 3. Verifier comes back to the room and select any edge (u,v) 4. Verifier removes cup lids of u and v and checks if they have different colors 2008/12/30 7 Consequence NP Any NP ?? problem 3-Coloring ZKP exists of a Graph 2008/12/30 8 Sudoku Puzzle A numeric logic puzzle Target: Fill each entry with an integer from {1,2, …, 9} such that each row, each column, and each 3 x 3 block contains 1 to 9 Created by David Eppstein 2008/12/30 9 Sudoku Puzzle Some Facts: • Invented in 1979 by Howard Garns • Named “Sudoku”in 1986 • Made popular by Wayne Gould • NP-Complete (Takayuki Yato, 2003) • A Simple ZKP (Gradwohl and others, 2007) 2008/12/30 10 Sudoku Puzzle One possible method: 1.
    [Show full text]
  • Learning During Search Alejandro Arbelaez Rodriguez
    Learning during search Alejandro Arbelaez Rodriguez To cite this version: Alejandro Arbelaez Rodriguez. Learning during search. Other [cs.OH]. Université Paris Sud - Paris XI, 2011. English. NNT : 2011PA112063. tel-00600523 HAL Id: tel-00600523 https://tel.archives-ouvertes.fr/tel-00600523 Submitted on 15 Jun 2011 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. THESE` DE L’UNIVERSITE´ PARIS–SUD presentee´ en vue de l’obtention du grade de DOCTEUR DE L’UNIVERSITE´ PARIS–SUD Specialite:´ INFORMATIQUE par ALEJANDRO ARBELAEZ RODRIGUEZ LEARNING DURING SEARCH Soutenue le 31 Mai 2011 devant la commission d’examen : Susan L. EPSTEIN, Hunter College of The City University of New York (Rapporteur) Youssef HAMADI, Microsoft Research (Directeur de these)` Abdel LISSER, LRI (Examinateur) Eric MONFROY, Universite´ de Nantes / Universidad de Valparaiso (Invite)´ Barry O’SULLIVAN, University College Cork (Rapporteur) Fred´ eric´ SAUBION, Universite´ d’Angers (Examinateur) Thomas SCHIEX, INRA (Examinateur) Michele` SEBAG, CNRS / LRI (Directeur de these)` Microsoft Research - INRIA Joint Centre 28 rue Jean Rostand 91893 Orsay Cedex, France PHDTHESIS by ALEJANDRO ARBELAEZ RODRIGUEZ LEARNING DURING SEARCH Microsoft Research - INRIA Joint Centre 28 rue Jean Rostand 91893 Orsay Cedex, France Acknowledgements First, I would like to express my gratitude to my supervisors Youssef Hamadi and Michele` Sebag for their continuous guidance and advice during this time.
    [Show full text]
  • Texture, Nonogram, and Convexity Priors in Binary Tomography
    PH.D. THESIS Texture, Nonogram, and Convexity Priors in Binary Tomography Author: Supervisor: Judit SZUCS˝ Péter BALÁZS, Ph.D. Doctoral School of Computer Science Department of Image Processing and Computer Graphics Faculty of Science and Informatics University of Szeged, Hungary Szeged, 2021 iii Acknowledgements First of all, I would like to say a special thank you to my supervisor, Péter Balázs, who always supported me throughout the years of my PhD studies, even during hard times. I would like to thank the following people for helping me in my research: Gábor Lékó, Péter Bodnár, László Varga, Rajmund Mokso, Sara Brunetti, Csaba Olasz, Gergely Pap, László Tóth, Laura Szakolczai, and Tamás Gémesi. I would also like to thank Zsófia Beján-Gábriel for correcting this thesis from a linguistic point of view. Last but not least, I would like to thank my family, especially my mother, my father, my grandmother, and my significant other for supporting me dur- ing my studies. Without their support, this PhD thesis would not have been possible. Finally, I would like to thank the Doctoral School of Computer Science and the Department of Image Processing and Computer Graphics of the University of Szeged for providing me with a productive work environment. This research presented in this thesis was supported by the following: • NKFIH OTKA K112998 grant, • ÚNKP-18-3 New National Excellence Program of the Ministry of Human Capacities, • ÚNKP-19-3 New National Excellence Program of the Ministry for Innovation and Technology, Hungary, • ÚNKP-20-4 New National Excellence Program of the Ministry for Innovation and Technology from the Source of the National Research, Development and Innovation Fund, • The project “Integrated program for training new generation of scientists in the fields of computer science“, no.
    [Show full text]
  • Penyelesaian Permasalahan Nonogram Dengan Algoritma Runut-Balik
    Penyelesaian Permasalahan Nonogram dengan Algoritma Runut Balik Hendra Hadhil Choiri (135 08 041) Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung, Jl. Ganesha 10 Bandung 40132, Indonesia [email protected] Abstract —Permainan nonogram memang cukup jarang II. NONOGRAM diketahui orang, karena memang permasalahan ini cukup kompleks, bahkan sudah dibuktikan ini merupakan masalah A. Definisi NP-complete. Sebenarnya permainan ini cukup menarik, Permainan nonogram diciptakan pada tahun 1987 oleh yakni mengatur piksel membentuk suatu gambar Tetsuya Nishio, dan dikenal dengan berbagai nama, antara berdasarkan petunjuk angka-angka yang diberikan. Ada lain: griddler (grid riddle), pixel puzzles, paint by banyak metode yang bisa digunakan untuk menyelesaikan permainan ini. Salah satunya adalah dengan algoritma numbers , dsb. backtracking, yang dibahas dalam makalah ini. Agar lebih Pada sebuah puzzle nonogram, terdapat sebuah matriks mangkus, algoritma dibantu dengan teknik heuristic dua dimensi, dan setiap sel dapat diwarnai atau dibiarkan berdasarkan logika-logika yang digunakan jika dimainkan kosong berdasarkan sequence bilangan-bilangan sebagai secara manual. “clue ” yang tertera di sekeliling matriks tersebut. Bilangan-bilangan tersebut menyatakan kelompok sel Kata Kunci - game, nonogram, runut balik, NP-Complete berwarna yang harus berada pada sebuah baris atau kolom. Contohnya, jika sebuah baris memiliki clue [3 1 2], I. PENDAHULUAN maka pada baris tersebut harus terdapat sebuah kelompok yang terdiri dari 3 sel berwarna, diikuti oleh sebuah Di dunia ini ada banyak permainan-permainan kelompok yang terdiri dari 1 sel berwarna, dan diakhiri pengasah logika yang sudah diciptakan dan dengan sebuah kelompok yang terdiri dari 2 sel berwarna. dikembangkan. Mulai dari permainan tabel sederhana Masing-masing kelompok harus dipisah oleh sekurangnya seperti Sudoku dan Kakuro.
    [Show full text]
  • Penciptaan Game 2D Nonogram Puzzle “Memoria”
    PENCIPTAAN GAME 2D NONOGRAM PUZZLE “MEMORIA” LAPORAN TUGAS AKHIR untuk memenuhi sebagian persyaratan mencapai derajat Ahli Madya Program Studi D-3 Animasi Disusun oleh: Euis Kurniati NIM 1500123033 PROGRAM STUDI D-3 ANIMASI JURUSAN TELEVISI FAKULTAS SENI MEDIA REKAM INSTITUT SENI INDONESIA YOGYAKARTA 2021 ii iii iv Tugas akhir ini saya persembahkan untuk kedua orang tua saya, Kakak – kakak dan adik saya yang saya sayangi v vi ABSTRAKSI Nonogram atau yang biasa dikenal sebagai Picross (Picture Crossword) adalah sebuah puzzle game yang berasal dari negara Jepang dan biasa dikenal sebagai Japanese Crossword. Nonogram merupakan sebuah game dengan gabungan dari logic puzzle dan logic numbers pada suatu gambar yang mana terdapat kotak-kotak yang harus ditandai atau dibiarkan kosong menurut angka- angka yang diberikan pada tepi terluar kotak-kotak untuk membentuk suatu gambar. Game Nonogram Puzzle “Memoria” merupakan sebuah game puzzle dengan menggunakan sub-genre reveal picture game yang dibuat dan dikemas dengan semenarik mungkin dengan menambahkan element seperti penambahan sebuah cerita fiksi fantasi yang menceritakan tentang bagaimana Calla dapat bertemu dengan peri pelindung dan mengatasi rasa takutnya. Game ini dibuat dengan menggunakan game engine Unity dan dapat langsung diinstal oleh pengguna smartphone yang menggunakan system android sebagai operasi system defaultnya. Banyak sekali varian game puzzle di pasar aplikasi game namun masih sedikit orang yang melirik untuk mencoba game logic dikarenakan terlihat sulit dan terlihat kurang menarik yang membuat orang menjadi enggan untuk memainkannya. Dengan adanya Penciptaan karya ini diharapkan dapat membantu memperkenalkan dan menumbuhkan minat untuk mencoba memainkan game- game dengan jenis genre yang serupa. Kata kunci : Memoria, Game, Nonogram, puzzle , Android, Unity.
    [Show full text]
  • Constraint Programming – Modeling –
    Constraint Programming { Modeling { Christophe Lecoutre CRIL-CNRS UMR 8188 Universite d'Artois Lens, France January 2021 1 Outline 1 Reminder 2 Languages and Formats 3 Some Popular Constraints Generic Constraints Case Study \Nonogram" introducing regular Case Study \Sudoku" introducing allDifferent Case Study \Magic Sequence" introducing sum and cardinality Case Study \Warehouse Location" introducing count and element Case Study \Black hole" introducing channel 2 Constraint Programming CP = Modeling + Solving 1 Modeling: describing the real-world problem in a declarative way, typically as : • a CSP (Constraint Satisfaction Problem) instance, or • a COP (Constraint Optimization Problem) instance. 2 Solving: applying efficient techniques to explore the search space, in order to find solutions. Modeling and Solving are somehow independent processes: a model can be applied various search/solving techniques • a solver can be applied to various problems/models • 4 CSP/COP Instances Definition An instance P of the Constraint Satisfaction Problem (CSP), also called a Constraint Network (CN), is composed of: a finite set of variables, denoted by vars(P), • a finite set of constraints, denoted by ctrs(P). • Definition An instance P of the Constraint Optimisation Problem (COP) additionally involves: an objective function obj(P) to be minimized or maximized. • 5 Declarativity Modeling is a declarative process. \Describe what you see/want. Not, how to get it!" A CSP/COP instance describes what the solutions are like, and specifies the search space: dom(x1) dom(x2) dom(xn) × × · · · × Variables represents the view we have of the problem. There are several types of variables: Boolean variables • integer variables our focus! • real variables • set variables • ::: • 6 Constraints Basically, CP is thinking Constraints.
    [Show full text]
  • Arxiv:2106.15585V1 [Cs.CC] 29 Jun 2021 Which Is the Thin Constraint of [7, 14]
    CCCG 2021, Halifax, Canada, August 10{12, 2021 Yin-Yang Puzzles are NP-complete Erik D. Demaine∗ Jayson Lynch† Mikhail Rudoy‡ Yushi Uno§ Abstract We prove NP-completeness of Yin-Yang / Shiromaru- Kuromaru pencil-and-paper puzzles. Viewed as a graph partitioning problem, we prove NP-completeness of par- titioning a rectangular grid graph into two induced trees (normal Yin-Yang), or into two induced connected sub- graphs (Yin-Yang without 2 × 2 rule), subject to some Figure 1: A simple Yin-Yang puzzle (left) and its unique vertices being pre-assigned to a specific tree/subgraph. solution (right). Circles added in the solution have dot- ted boundaries. 1 Introduction The Yin-Yang puzzle is an over-25-year-old type of connectivity constraint above constrains each color class pencil-and-paper logic puzzle, the genre that includes to induce a connected subgraph, so with this constraint Sudoku and many other puzzles made famous by e.g. alone, the problem is to partition the graph's vertices Japanese publisher Nikoli.1 Figure 1 shows a simple into two connected induced subgraphs. We thus also example of a puzzle and its solution. In general, a Yin- prove NP-completeness of this graph partitioning prob- Yang puzzle consists of a rectangular m × n grid of unit lem: squares, called cells, where each cell either has a black circle, has a white circle, or is empty. The goal of the puzzle is to fill each empty cell with either a black circle Grid Graph Connected Partition Comple- or a white circle to satisfy the following two constraints: tion: Given an m × n grid graph G = (V; E) and given a partition of V into A, B, and U, is there • Connectivity constraint: For each color (black a partition of V into A0 and B0 such that A ⊆ A0, and white), the circles of that color form a single B ⊆ B0, and G[A0] and G[B0] are connected? connected group of cells, where connectivity is ac- cording to four-way orthogonal adjacency.
    [Show full text]
  • Imperial Academics Talk Trump and Climate Change How to Break Up
    ISSUE 1667 ... the penultimate issue FRIDAY 9 JUNE 2017 THE STUDENT NEWSPAPER OF IMPERIAL COLLEGE LONDON v elix Imperial f academics talk Trump and climate change PAGE 3 News It’s not rational to be scared of terror PAGE 7 Comment Archer, the show that keeps on giving PAGE 16 Culture The great age of 3DS PAGE 18 Millennials How to break up with someone (you met in Metric) PAGE 22 Millennials 2 felixonline.co.uk [email protected] Friday 9 June 2017 felix EDITORIAL What a week hat a week. Since last Friday, weekend when everyone was shit-faced, but we’ve shit has hit the fan. Much like an also had to deal with the General Election, less than evil mastermind in a superhero a week after the London Bridge and Borough Market movie, Donald Trump has incidents. (Also this is London and we don’t’ have time announced to the world his evil to care for other people. ) plan to fuck over the planet: Meanwhile we have Theresa May going around Wquitting the Paris Agreement. The only differences are making dirty confessionals, like that time she ran that he’s as thick (but slightly more orange) as mustard, through a field of wheat. I mean, how can someone and that the rest of the world has gone fuck you back that dirty be trusted with the leadership of a country? and is now probably conspiring to send him to deep And that’s coming from me! space, leaving behind only the faintest Cheeto-dust The thing that really pisses me off about the General trail as proof that he ever existed.
    [Show full text]
  • Tuition Cuts A
    FR IDAY, 7 TH JUNE, 2019 – Keep the Cat Free – ISSUE 1724 Felix The Student Newspaper of Imperial College London COMMENT No sympathy for Theresa May PAGE 4 MUSIC Five reasons to visit Strawberries & Creem Festival PAGE 14 POSTGRADUATE Will a reduction in tuition fees help or hinder students? // Flickr Tuition cuts a “shallow gesture” claims Silwood: Imperial's Green Labour minister Cupboard A recent report recommends cutting tuition fees but a shadow education minister says this will not resolve problems within PAGE 18 higher education. SPORTS NEWS longer period of time a wide-ranging review of student loans over 40 per year – a proposal that before being written off, higher education, recom- years and be charged has been championed by Joanna Wormald according to an independ- mended tuitions fees for less interest. At present, outgoing Prime Minister, Deputy Editor ent report published last domestic students should student debts accrue Theresa May. The week. The report also be capped at £7,500. interest of up to 6.3% and Treasury has warned that recommends the reintro- Universities can currently are written off after 30 this could cost £6 billion duction of maintenance charge up to £9,250 per years. per year. The national uition fees should grants. year. In addition to this, The government budget may also be hit by Battle of be slashed and The Augar report, the independent panel led should also reintroduce the report’s recommenda- repaid with less commissioned in by Philip Augar advised means-tested maintenance tion that the government Battersea interest over a February 2018 as part of graduates should repay grants of at least £3,000 PAGE 24 T Cont.
    [Show full text]