NOTE SOLVING RENJU. János Wágner 1 István Virág 2. Budapest, Hungary ABSTRACT



Similar documents
Go-Moku and Threat-Space Search

Generalized Widening

A Knowledge-based Approach of Connect-Four

A Defensive Strategy Combined with. Threat-Space Search for Connect6

One pile, two pile, three piles

On the Laziness of Monte-Carlo Game Tree Search in Non-tight Situations

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four

JOURNEY THROUGH CHESS

COACHING THE TACKLE Jim Mc CORRY

Principles of Soccer

n 2 + 4n + 3. The answer in decimal form (for the Blitz): 0, 75. Solution. (n + 1)(n + 3) = n lim m 2 1

How To Play Go Lesson 1: Introduction To Go

The Taxman Game. Robert K. Moniot September 5, 2003

BASIC RULES OF CHESS

Gamesman: A Graphical Game Analysis System

DEVELOPING HOCKEY SENSE

MAKING MATH MORE FUN BRINGS YOU FUN MATH GAME PRINTABLES FOR HOME OR SCHOOL

INSTRUCTIONS FOR USE OF THE USA VOLLEYBALL OFFICIAL BEACH VOLLEYBALL SCORESHEETS

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Problem of the Month: Fair Games

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

Introducing Students to the Game of Science. David P. Maloney and Mark F. Masters. Physics Department. Indiana University Purdue University Fort Wayne

Special Notice. Rules. Weiss Schwarz Comprehensive Rules ver Last updated: October 15 th Outline of the Game

That s Not Fair! ASSESSMENT #HSMA20. Benchmark Grades: 9-12

Lab 11. Simulations. The Concept

Would You Like To Earn $1000 s With The Click Of A Button?

SCORESHEET INSTRUCTIONS. RALLY POINT SCORING (RPS 2 out of 3 sets)

THE COLLEGES OF OXFORD UNIVERSITY MATHEMATICS, JOINT SCHOOLS AND COMPUTER SCIENCE. Sample Solutions for Specimen Test 2

How To Play The Math Game

Hooray for the Hundreds Chart!!

FIVB WORLD LEAGUE PREVIEWS WEEK 1 JUNE 17-19, 2016

Book One. Beginning Bridge. Supplementary quizzes and play hands edition

An Australian Microsoft Partners in Learning (PiL) Project

COLE VALLEY CHRISTIAN BOYS BASKETBALL PROGRAM PHILOSOPHY!

Baltic Way Västerås (Sweden), November 12, Problems and solutions

Making Decisions in Chess

Planar Graphs. Complement to Chapter 2, The Villas of the Bellevue

Rafael Witten Yuze Huang Haithem Turki. Playing Strong Poker. 1. Why Poker?

YMCA Basketball Games and Skill Drills for 3 5 Year Olds

Lab 2.1 Tracking Down the Bugs

Current California Math Standards Balanced Equations

Midterm Practice Problems

(Refer Slide Time: 2:03)

Math 728 Lesson Plan

Math Board Games. For School or Home Education. by Teresa Evans. Copyright 2005 Teresa Evans. All rights reserved.

Counting the Score: Position Evaluation in Computer Go

Optimal Drawing Strategy for Deuces Wild Video Poker Stephen Jensen

Roman Board Games. I. Lusoria

Doubles Strategy by Robert Bj Jacobucci

Project 2: Bejeweled

ACL Soccer 4 v 4 Small Sided Games (SSG s)

IB Math Research Problem

Players: 2-4 Age: up to 10 years Duration: approx. 45 minutes

HOW TO ATTACK THE ZONE DEFENSE

Rules for TAK Created December 30, 2014 Update Sept 9, 2015

The Progression from 4v4 to 11v11

Math Games For Skills and Concepts

7 Gaussian Elimination and LU Factorization

The Physics and Math of Ping-pong and How It Affects Game Play. By: Connor Thompson & Andrew Johnson

REWARD System For Even Money Bet in Roulette By Izak Matatya

Texas Hold em. From highest to lowest, the possible five card hands in poker are ranked as follows:

Elements and the Teaching of Creative and Deceptive Play F. Trovato Alaska Youth Soccer Association

Easy Casino Profits. Congratulations!!

Team Defending. Understand the terms that describe the roles of players and parts of the field. The person you are marking.

TEACHER S GUIDE TO RUSH HOUR

Graph Theory Problems and Solutions

A NOTE ON OFF-DIAGONAL SMALL ON-LINE RAMSEY NUMBERS FOR PATHS

SCORESHEET INSTRUCTIONS. RALLY POINT SCORING (RPS 2 out of 3 sets)

Regions in a circle. 7 points 57 regions

MATHS ACTIVITIES FOR REGISTRATION TIME

Balls, Hoops and Odds & Ends

Three daily lessons. Year 5

Age of Wonders I Quick Start Guide

You can place bets on the Roulette table until the dealer announces, No more bets.

Excel -- Creating Charts

Networks and Paths. The study of networks in mathematics began in the middle 1700 s with a famous puzzle called the Seven Bridges of Konigsburg.

Advice to USENIX authors: preparing presentation slides

How to Win at Tic-Tac-Toe

BEGINNER S BRIDGE NOTES. Leigh Harding

Session 7 Bivariate Data and Analysis

THE WINNING ROULETTE SYSTEM by

Minesweeper as a Constraint Satisfaction Problem

On Frequency Assignment in Cellular Networks

Pythagorean Theorem: Proof and Applications

GAP CLOSING. 2D Measurement GAP CLOSING. Intermeditate / Senior Facilitator s Guide. 2D Measurement

Chess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / October 3, 2012

#1 Prioritizing Libero Responsibilities

6.042/18.062J Mathematics for Computer Science. Expected Value I

SCRATCHING THE SURFACE OF PROBABILITY. Robert J. Russell, University of Paisley, UK

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

Youth for Good Governance distance learning program. Module IV. Causes of Corruption

Terminology and Scripts: what you say will make a difference in your success

Loteria Workshop is a great way to bring Mexican art and gaming tradition to your computer!

Soccer Control and Trapping Small Sided Game, Soccer Control, Soccer Trapping

Factorizations: Searching for Factor Strings

THE WINNING ROULETTE SYSTEM.

OFFICIAL PICK 4 GAME RULES. I. Pick 4 Drawings

Why Your Business Needs a Website: Ten Reasons. Contact Us: Info@intensiveonlinemarketers.com

Transcription:

30 ournal arch 2001 T SV RU ános Wágner 1 stván Virág 2 udapest, ungary STRT Renju is a very old two-player board game with subtle tactics and strategies. t comes from apan and is a professional variant of o-oku. n many countries, such as hina, stonia, apan, atvia, Russia, and Sweden, Renju is played on a high level of performance. ompared to Renju, the game of o-oku, mainly played in hina and apan, has rather simple rules. o-oku was solved by llis in 1992. e proved that it is a won game for the player to move first. n this note we claim that Renju is a first-player win too. We describe our research approach and how we arrived at this game-theoretical value. 1. TRUT n 1992 llis solved the game of o-oku by means of the computer program VTR (llis, Van den erik, and untjes, 1993; llis, 1994). The main techniques applied were proof-number search (llis, Van der eulen, and Van den erik, 1994) and threat-space search (llis, Van den erik, and untjes, 1995). Since the advantage for the first player was well-known (Sakata and kawa, 1981), many variants of o-oku were developed so as to reduce the advantage of the first player, attempting to create a balanced game. lready around 1900 apanese professional players improved the simple rules of o-oku by introducing that the first player (lack) is prohibited from making a double three, a double four, and an overline. fter that the Renju board was diminished from 19 19 (o board size) to 15 15 when it was discovered that the larger board size increases lack s advantage. These improvements were to restrict lack s moves so as to offset his initial advantage. n 1936 when the apanese ederation of Renju was founded the rules of Renju were fully accomplished. Professional players believed that the new rules would result in a more evenly-balanced game. When the Renju players became stronger they found that the above-mentioned advanced new rules still gave great advantage to lack. Some apanese players even showed a black victory in two frequently-played opening patterns (cf. Sakata and kawa, 1981), but their solution was incomplete because some good white moves were not analysed and later on even mistakes were found in it. n the Sakata s book igures 31 and 32 facing page 77 japanese authors suggested an strong 15 th move (, see igure 1). fter move, if the White's reply was move (16 th move) the lack victory will be become very complicated, but not fully analysed by pro players. White's defence move (16 th move) is not mentioned in this book, after this White's response we were not able to find the lack victory in some weeks. So move was rejected (and considered to be not good move) and we chose another 15 th move (), which turn out a success. nother problem was, that there are 35 distinct second white moves possible, but only two main variations (adjacent to lack s first move) were exhaustively analysed in that book. n apan professional Renju players continued to study Renju in detail. Sakata and kawa (1981) published their analysis in 32 pages. We have exploited the analysis for our work and found other mistakes and lacunae (see also llis, 1994). evertheless, the apanese prediction is now confirmed, extended and corrected by our computer program which established Renju s game-theoretical value. ur project was to carry out a complete proof about the game of Renju by a computer program and to create a database of the solved game tree. n 1988, the Renju nternational ederation was created. t the same time, to equalise the chances of the players at the official tournaments new opening-rules regulations were adopted. The official Renju rules and the new opening regulations are described in Section 2. owever, this article focuses on establishing the gametheoretical value of Renju without the new opening-rules regulations. The game we deal with is called free 1 1193 udapest eák. u. 1 V/32. -mail: wagjan@mail.datanet.hu. 2 epartment of norganic and nalytical hemistry, ötvös oránd University, P. ox 32, udapest 112, -1518, ungary. -mail: virag@para.chem.elte.hu.

Solving Renju 31 Renju, it is a quite aggressive game in which almost every black move is a threat. The remainder of this note is structured as follows. fter the description of the rules in Section 2, Section 3 provides a list of terms and gives their definitions. n Section 4 we explain our experimental approach and provide empirical evidence for our claim. n Section 5 some technical details on a checking program are given and in Section 6 results are presented. Section 7 contains our conclusions. 15 15 14 14 13 13 12 12 11 11 10 10 10 9 2 3 9 8 13 1 4 6 8 7 9 8 5 7 7 6 11 12 6 5 14 5 4 4 3 3 2 2 1 1 igure 1: n instance, that human players may have some incompleteness their analysis. 2. T RUS RU The game of Renju is a professional variant of o-oku. The rules of Renju, although more complex than those of o-oku, are still rather simple (Sakata and kawa, 1981). The game is played on a board with 15 15 points of intersections. Vertical lines are lettered from 'a'to 'o', and the horizontal lines are numbered from 1 to 15. The left bottom position on the board is a1. Two players, lack and White, place alternately a stone of their own colour on an empty intersection. lack starts the game and must place a black stone on the centre intersection (h8). The first player completing an unbroken line of five stones (vertically, horizontally, or diagonally) wins the game. n Renju lack has some restrictions with respect to o-oku, e.g., some moves are considered to be prohibited for lack. f lack makes a prohibited move either accidentally or by being forced to, White wins the game. The prohibited moves for lack are: overline, double-four, double-three (for definitions, see Section 3). White does not have prohibited moves, so White may make, e.g., an overline and wins the game. f none of the players succeeds in completing a five-in-a-row, and lack did not make a prohibited move and the board is full of stones, the game is considered to be drawn. The above-mentioned rules are known as the free Renju rules. n an attempt to make the game more evenlybalanced for a fair competition in official tournaments, the following eight opening-rules restrictions have been imposed on lack (i.e., the professional Renju Rules). a. Players start the game as tentative lack and tentative White. Tentative lack plays the first move on the centre intersection. b. Tentative White makes the second move diagonally, horizontally or vertically to the first move and adjacent to the first move (i.e., two different openings). c. Tentative lack plays the third move on an empty place within a zone of 5 5 intersections in the centre of the board (26 opening patterns). d. Tentative White has the right to change the colour of the stones (swap option). e. The player, who now has the white stones, plays the fourth move wherever (s)he wants. f. lack has to offer the opponent two possible asymmetrical fifth moves. g. White chooses one of the fifth moves which will be more advantageous to him/herself and tells lack to make the moves (s)he prefers. h. There are no restrictions on the sixth and later moves. 3. TRS TS

32 ournal arch 2001 elow we provide a list of the terms together with their definitions. verline: ive: Straight four: our: Three: ouble-our: ouble-three: our-three: V: VT: Six or more stones of the same colour in an unbroken row, either horizontally, vertically or diagonally. xact five stones of the same colour arranged in an unbroken row, either horizontally, vertically or diagonally. our stones of the same colour in an unbroken row (horizontally, vertically or diagonally) with both ends open. straight four ensures a win. our stones of one colour in a row, which in one move can become a five. Three stones of the same colour in an unbroken row, or with one-intersection gap between the stones that can become a straight four on the next move. single move, which builds simultaneously more than one four at one time. single move, which builds simultaneously more than one three at one time. four and a three produced simultaneously with a single move. t is the usual way for lack to create a winning formation. This acronym means: Victory by onsecutive ours. win that results from making fours one after another. This acronym means: Victory by onsecutive Threats. win that results from making threats (four or three) one after another. apanese terms: ukumi: Yobi: move which threatens to win by V. Who played the fukumi move has a V if the opponent does not defend against this move. positional offensive move, which threatens to win by VT. yobi move is not a direct forced method of attack. igure 2: ive definitions illustrated. 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 n igure 2 we illustrate five definitions given above. Playing leads to an overline. Playing leads to a double-four. Playing leads to a double-three. Playing leads to a straight four. Playing leads to a four-three. 4. T PRR T XPRT PPR The solving program was written in orland Pascal language. The program s goal was to establish the gametheoretical value. The program generated a winning tree for lack and stored the tree in a database. The search process used transposition tables to avoid searching symmetrical positions. oreover, the solving program used the threat-sequence search as suggested by llis et al. (1993). There was only a very limited possibility to play no-threat moves, e.g., the first black moves after a bad opining by White (such as moves far away from the board centre). f a white defending move in such a variation also was a threat then lack countered it and did not lose a tempo in the end. The program operated an iterative-deepening search based on threat sequences up to 17 plies. The speed of the threat-sequence search was 400 nodes/second on a Pentium 200 z machine. The deepest variations of the iterative-deepening search (17 plies) took about 15 minutes, then a VT line was found.

Solving Renju 33 t was not possible to speed up the threat-sequence search (cf. llis, 1994) since by the overline, double-four and double-three rule the order of moves became more complex. n the solving program we had implemented an automatic database builder, but all openings, fukumi, yobi, and positional moves were inputted by the hand of a human expert. n the past, the human expert assistance has been used in game solving (. Patashnik, 1980). n total, human players produced approximately 5000 positional moves. The threat-sequence search module built all black threat sequences up to a given depth and investigated whether the position is a win for lack against every possible defence by White. fter a positional black move, another module examined how lack can win if White passes. f a winning line exists then this module stores the moves of these sequences and in the next step the solving program will use these moves (usually about 60 to 70 moves, resulting in some 200 lines) as white answers. ll moves of the game tree were stored in the database with the exception of the last 10 plies, since 10 or fewer plies of winning sequences can be found quickly by the threat-sequence search engine. enerating the whole game tree took about 3000 hours on a Pentium 200 z P. 5. T PRUR fter the generation of the whole game tree, the second stage of the project was checking the database. To making sure of generated database, there is necessary to develop a checking program, which plays backwards all possible white moves and then communicates with the solving program on the forward white moves (meanwhile inspecting the database). When a not-analysed white move was encountered, the solving program first took the black answer most frequently-played in that stage of the game tree. This approach gave many typical first omissions. n the checking loop, we stored white wins, black prohibited answers, and non-proved positions. The checking file contained approximately 2000 previously missing positions, which were corrected in the next proof run. The proof runs and the correction of positions were repeated several times even when the checking log did no longer contain any lacking positions. The programming of the checking program was performed by the second author in orland Pascal programming language. This part of the solving took about 6000 PU hours on a Pentium 200 z machine. 6. S RSUTS Table 1 shows the statistics of the database of the solved game tree. The first column contains the opening pattern depending on White s second move. umbers 10, 11, 20, 21, 22 mean relative x and y coordinates according to the centre intersection of the board (h8). So 10 means positions 9, 11 means 9 and so on. umbers 3x means 3 differences in one direction and any difference in the other direction, which leads to nonsymmetric patterns (30, 31, 32, 33). The average depth was calculated by the following equation: verage epth ax = 1 = ax * odes = 1 odes where is the depth (lack moves) given a winning line and ax is the maximal depth. (ote that final 5 moves (lack moves) not stored.) White s 2 nd move umber of nodes verage depth 10 169228 9.070 11 69682 7.107 20 73121 7.058 21 30236 6.019 22 27953 6.131 3x 88315 5.454 4x 85879 5.092 5x 92389 4.950 6x 87354 4.752 7x 87996 4.660 Total: 813674 Table 1: atabase results of the solved Renju game tree.

34 ournal arch 2001 15 15 14 14 13 13 12 12 11 42 11 10 46 45 41 31 43 47 10 9 4 40 9 44 16 39 9 8 1 6 14 15 38 8 7 25 2 3 13 21 17 22 7 6 8 26 7 5 11 12 18 6 5 29 30 27 23 10 5 4 33 32 28 24 20 19 4 3 34 36 3 2 35 37 2 1 1 other stones. We admit that the method of solving the game as performed by us does not necessarily leads to producing an optimal solution. n fact we only established the game-theoretical value (our goal). ence, it is possible that our shortest (database) winning lines is not optimal since we missed a stronger black move somewhere. Whatever the case, igure 3 contains our solution of the best line in solving Renju, where White is on the best defensive. ccording to the database it takes 47 plies. Table 1. points to the fact that White best moves are 10 and 11 (according to japanese professional Renju players). ut we were led to the conclusion, if White s second move is far from the centre point, lack victory is not unambigously easy. fter White s second move 20, 21 and 22 there were a lot of hard line for lack. n all winning lines, distance of the black moves from remainder stones are not bigger than 2 intersections. t means that all played lack moves are very close to igure 3: ur shortest solution (in best White protection): a win in 47 plies. 7. USS We verified and expanded the statement of apanese Renju experts that the game of free Renju is a theoretical win for the first player to move. The game was solved after 9000 hours of using a Pentium 200 z. The size of the overall database is 7 egabyte. fter the final database creation, the database was checked once more and accepted as correct by a checking program written by an independent programmer. n the last checking run, no missing variations were found by the checking program. n conclusion, free Renju should be considered a solved game. The result is that the game is a first-player win. n igure 3 we provided forced winning line. owever it may be that it is not the shortest one. inally, we have good reason to believe that after building a good opening book, say of 5000 moves, there is no middle game, provided that an appropriate endgame-analysing routine is available. WT We would like to acknowledge the help by eonid luchovsky for sharing his Renju knowledge with us. e proposed many positional moves in difficult positions. 8. RRS llis,.v. (1994). Searching for Solutions in ames and rtificial ntelligence. Ph.. Thesis, University of imburg. aastricht, The etherlands. S 90-9007488-0.

Solving Renju 35 llis,.v., erik,.. van den, and untjens,.p.. (1993). o-oku and Threat-Space Search. Report S 93-02, epartment of omputer Science, aculty of eneral Sciences, University of imburg. aastricht, The etherlands. SS 0922-8721. llis,.v., erik,.. van den, and untjens,.p.. (1996). o-oku Solved by ew Search Techniques. omputational ntelligence: n nternational ournal, Vol. 12, o. 1, pp. 7-24. Special ssue on ames. lackwell Publishers. SS 0824-7935. llis,.v., eulen,. van der, and erik,.. van den (1994). Proof-umber Search. rtificial ntelligence, Vol. 66, o. 1, pp. 91-124. SS 0004-3702. Sakata,. and kawa, W. (1981). ive-n--row, Renju. The shi Press, nc. Tokyo, apan.. Patashnik, Qubic: 4x4x4 Tic-Tac-Toe, athematics agazine 53, (1980), 202-216