Japan Advanced Institute of Science and Technology
Title The Game of Synchronized Cutcake
Author(s) Cincotti, A.; Iida, H.
Citation IEEE Symposium on Computational Intelligence and Games, 2007. CIG 2007.: 374-379
Issue Date 2007-04
Type Conference Paper
Text version publisher
URL http://hdl.handle.net/10119/7809
Rights
Copyright (C) 2007 IEEE. Reprinted from IEEE Symposium on Computational Intelligence and Games, 2007. CIG 2007. This material is posted here with permission of the IEEE. Such permission of the IEEE does not in any way imply IEEE
endorsement of any of JAIST's products or services. Internal or personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution must be obtained from the IEEE by writing to pubs-permissions@ieee.org. By choosing to view this document, you agree to all provisions of the copyright laws protecting it.
Proceedingsof the 2007 IEEESymposium on
Computational Intelligence andGames(CIG 2007)
The
Game of Synchronized Cutcake
Alessandro Cincotti
Research Unit for Computers and Games School of Information Science
Japan Advanced Institute of Science and Technology cincotti@jaist.ac.jp
Abstract- In synchronized games the players make their
moves simultaneously and, as a consequence, the concept of
turndoes notexist. Synchronized Cutcake isthe synchronized version ofCutcake,aclassicaltwo-player combinatorial game. Even though to determine the solution of Cutcake is trivial, solving Synchronized Cutcake is challenging because of the
calculation of the game's value. We present the solution for
small board size and some general results for a board of arbitrary size.
Keywords: Combinatorial Games, Synchronized Cutcake
I. INTRODUCTION
Cutcake is a classical two-player combinatorial game introducedin [1], [2]. Everyinstance of thisgameis defined as a set of rectangles of integer side-lengths with edges parallel to the x- and y- axes. The two players are usually called Left andRight. Alegalmovefor Left istodivideone of therectangles intotworectangles of integer side-length by meansofasinglecutparallel tothe x-axis andalegal move forRight istodivideoneof therectangles intotworectangles ofinteger side-length bymeansofasinglecutparalleltothe y- axis. Players take turns making legal moves until one of themcannot move. Then thatplayer leaves thegameand the remaining player is deemed the winner.
We use
[L, R]
to indicate a L by R rectangle and we indicatealeft moveby[L,R]
-[L1,R]
+[L2,R]
and arightmove by[L, R]
-[L,
R1]
+[L, R2]
whereL1+L2 = L, R1+R2= R, and
Li,
L2,Ri,R2 >0.Werecall that in thegame of Cutcake the outcome fora
L by R rectangle depends onthe dimension ofL and R as shown in Table I. We recall that the floor of areal number is defined as thelargest integer less than or equalto x and it is also denotedby
[xj.
It isinteresting to observe that:* if
[log2
Lj >[log2
Rj then Left hasawinningstrategy, . if[log2
Lj <[log2
Rj then Right has a winningstrategy, and
. if
[log2
Lj =[log2
Rj then the game is a zero-game,i.e.,
the player that makes the firstmove is the loser. Forexample, inthe game[8,
7]
Left has awinning strategy andinthegame[3, 4]
Right has awinningstrategybut[7, 4]
is stillazero-game.
Hiroyuki lida
Research Unit for Computers and Games School of Information Science
Japan Advanced Institute of Science and Technology iida@jaist.ac.jp
II. SYNCHRONIZED GAMES
The idea ofsynchronizedgameshas been introducedin[3] and it has beenapplied tothe game of Tic-Tac-Toe inorder to revive this solvedgame.Following this, thesameidea has been applied to the game of Hex [4] in order to increase the interestingness of this game using the concept of late chanceor outcomeuncertainty. In synchronizedgames, both players play simultaneously, therefore it does not exist any unfairadvantage due to theturn to move. In this work, we apply thesameideatothegameof Cutcakeinordertostudy the effects ofsynchronismon atypical combinatorial game. Inthe game ofSynchronized Cutcake ageneral instance and the legal moves for Left and Right are defined exactly in the same way as defined for the game of Cutcake. There is only onedifference: Left andRight make their legal moves simultaneously, thereforeifthey chooseto moveinthe same rectangle then this rectangle will be dividedinfourrectangles because the two cuts areperformed simultaneously, i.e.,
[L,
R] -) [L1, R1] + [L1, R2] + [L2, R1] + [L2, R2]. IfLeft and Right chooseto movein twodifferentrectangles then each of theserectangles will be dividedin tworectangles asusual.In combinatorial game theory we can classify all games into 4 outcome classes, which specify who has the winning strategy when Left starts and who has the winning strategy whenRight starts. IfG is agamethenwehave:
. G> 0 (positivegame) ifLeft has awinning strategy, . G< 0 (negative game)ifRight has awinning strategy, . G= 0 (zero game)iftheplayer that makes the second
movehas awinning strategy, and
. G 0O (fuzzy game) if the player that makes the first movehas awinning strategy.
In synchronizedgames,bothplayersmovesimultaneously and there exists the possibility to get a draw, therefore for eachplayerwehave threepossible cases:
. theplayer has a winning strategy (WS) independently by theopponent's strategy,
. theplayerhas adrawingstrategy (DS), i.e.,he/she can
alwaysget adrawin the worstcase, and
. the player has a losing strategy (LS), i.e., he/she has neitherawinning nor adrawing strategy.
Table II shows all the possible cases. It is clear that if oneplayerhas awinning strategythen the other one cannot have eitherawinning strategy ordrawing strategytherefore
TABLE I
VALUEFORRECTANGLES INCUTCAKE
L\R
1 2 3 4 5 6 7 8 1 0 -1 -2 -314
15
-6T7
2 1 0 0 -1 1 -2 -2T3
3 2 0 O -1 -1 -2 -2 -3 4 3 1 1 0 0 0 0 -1 5 4 1 1 0 0 0 0 -1 6 5 2 2 0 0 0 0 1 7 6 2 2 0 0 0 0 1 8 7 3 3 1 1 1 1 0 TABLE IIIOUTCOMEFOR RECTANGLES INSYNCHRONIZED CUTCAKE
L\R
1 2 3 4 5 6 7 81
< < < < < <<T'
2
> < < < < <<T'
3 > > =< < < < < 4 > > > =< < < < 5 > > > > =< < < 6 > > > > > = < < 7 > > > > > > =< 8 > > > > > > >= TABLE IIOUTCOMECLASSES IN SYNCHRONIZED GAMES
the cases WS-WS, WS-DS, and DS-WS never happen. As consequence, ifG is a synchronized game then wehave 6 possible legal cases:
. G > 0 ifLeft has awinning strategy,
. G = 0 ifbothplayer have adrawing strategy and the
gamewill always end inadraw underperfectplay,
. G < 0 ifRighthas awinning strategy,
. G > 0 ifLeftcan always getadraw intheworst case
but he/she could be ableto winifRightmakesawrong move,
. G <U ifRightcanalways getadrawintheworst case
but he/she could be ableto win ifLeft makes awrong move,
. G <0 ifboth players have a losing strategy and the outcome isunpredictable.
III. SOLVING SYNCHRONIZED CUTCAKE
Table III shows the outcome for a L by R rectangle of Synchronized Cutcake with L,R < 9. Here, we
give
someresults forageneral L by Rrectangle.
Lemma 1: Let G =
[L,
R]
be a general rectangle ofSynchronized Cutcake. If L = R then either G = 0 or
GC O.
Proof: Becauseof thesymmetry of the board,wehave three possible cases:
1) both players haveawinning strategy, 2) bothplayers haveadrawing strategy, or
3) bothplayers have alosing strategy.
According to the Table II, the first case never
happens,
therefore either G=0 orG
<0.
ULemma2: Let K be a positive integer and let G be a general instance of Synchronized Cutcake where every rectangleorpairofrectanglesbelongsto oneof the
following
classes: 1)
[L,L],
2) [L+K,L],
3) [L,R] and [R,L],
4) [L,R] and [R+K,L],
whereL,R>0.Ifthere existsatleastonerectangle
belong-ing to the second class or apair ofrectangles belonging to
the fourth class then Right has not a strategy eitherto win or todraw inthegameG under perfectplay.
Proof: Wehave fourpossible cases:
1) if Right moves in [L, L] then Left can make the symmetrical move obtaining
[Ll,L1]
+[Ll,L2]
+[L2,L1]
+[L2,L2],
2) ifRightmoves in [L+K,L] then wehave
[Ll,Li] + [Ll, L2]+ [L2+K,
L1]
+ [L2+K,L2],
3) ifRightmoves in [L,R] then Left canmove in
[R, L]
obtaining
[L,Ri]
+[L,R2]
+[Rl,L]
+[R2,L],
4) ifRight moves in[L, R]
then Leftcan move in[R
+K,L] obtaining
[L, Ri]
+[L, R2]
+[Rl, L]
+[R2
+K,
L].
We observe that in each of these cases the newrectangles
belongto oneof the four classes mentionedinthe
hypothesis
and atleast one rectangle belongs to the second class or a
pair ofrectanglesbelongstothe fourth class therefore
by
the inductive hypothesis Righthas not a strategy eitherto winor todraw inG. U
Lemma 3: Let K be a positive integer and let G be a general instance of Synchronized Cutcake where every
rectangleorpairofrectanglesbelongsto oneof the
following
classes: 1)
[R,R],
2)
[R,R
+K],
3)
[L,R]
and[R,L],
4)
[L,R]
and[R,L
+K],
whereL,R>0.Ifthere existsatleastone
rectangle
belong-ing to the second class or apair ofrectangles
belonging
tothe fourth class then Left has not astrategyeitherto winor
to draw inthe game G underperfect
play.
Proof: Analogous to theLemma2. v
Proceedingsofthe 2007 IEEESymposiumon
Computational IntelligenceandGames(CIG2007)
Lemma4: Let G be a general instance ofSynchronized Cutcake. Iffor every rectangle [L, R] we have [log2Lj >
[log2 Rj and there exists atleastone rectangle [A, B] such that [log2 Aj > [log2 Bj then Left has awinning strategy.
Proof: We observe that if Left makes the following move
[A,B]
-,
[A1,B]
+[A2,B]
where Al =
LA/2j
and A2 =[A/2]
then we have twopossible cases:
1) IfRightmoves in [A, B] wehave
[A,B] ->[Al,Bl] + [Al,B2] + [A2,Bl] +
[A2,B2].
Assuming B1>B2, wehave a)
[1og2
Alj >[1og2
B1j, b)[1og2
Al]
>[1og2
B2j,C)
[1og2
A2j >[1og2
BR1,d)
[1og2
A2j >[1og2
B2j. 2) IfRightmoves in anotherrectangle[L,R]
-,
[L,R1]
+[L,R2]
thenwehave, assuming Rl > R2,a)
[1og2
Al]
>[1og2
Bj,b)
[1og2
A2j >[1og2
Bj,C)
[1og2
Lj >[1og2
Rl, d)[1og2
Lj >[1og2
R2j.Therefore,inbothcases andby the inductivehypothesis Left
has awinning strategy. U
Lemma5: Let G be a general instance ofSynchronized Cutcake. Iffor every rectangle [L, R] we have [log2Rj >
1log2
L]
and there exists atleast one rectangle [A,B]
such that [log2Bj > [log2Aj thenRighthas awinning strategy. Proof: Analogousto theLemma 4. U Theorem 1: Let G =[L, R]
be a rectangle ofSynchro-nized Cutcake. We can distinguish five different cases:
1) if
[log2
Lj >[log2
Rj then Left has a winningstrategy,
2) if
[log2
Lj =[log2
Rj and L > R thenRighthas nota strategyeitherto win or to draw,
3) if L= R then either G= O orG O,
4) if
[log2
Lj =[log2
Rj and L < R then Left has nota strategyeitherto win or to
draw,
5) if [log2Lj <
[log2
Rj then Right has a winningstrategy.
Proof: By the previous lemmas. U
Conjecture 1: Let G=
[L, R]
be arectangleofSynchro-nized Cutcake. We can distinguish three differentcases:
1) if L= R then G= 0, i.e., thegame ends in adraw,
2) if L >R then G >0, i.e., Left hasawinning strategy, 3) if L <R then G< 0,i.e.,Righthasawinningstrategy. Weobserve that ifwe prove
1)
thenwe can easily prove2)
and3).
Forexample, inthegame[L
+ K,L]
with K > 0 ifLeft applies his/her drawing strategy inthe sub-rectangle[L, L]
then he/she will haveatleastKLmoves ofadvantageatthe end of thegame. Theconjecture 1 is supported bythe previous theorem and the results for smallrectangles shown
in Table III but further efforts are necessary for a formal proof.
IV. VALUESOF RECTANGLES IN SYNCHRONIZED CUTCAKE
In order to establish the winning strategy for a general rectangle and for a general instance of Synchronized Cut-cake, it isnecessary todefine afunction v whichrepresents the value of the game, i.e., the advantage ofoneplayer, in terms ofmoves, with respect to the opponent. We observe that:
v([1,1])= 0 because thegame
isadraw.
. Analogously, thegame
endsin adraw therefore v([2, 2]) =0.
v([L,1])=L -1because Leftcanmake L-1 moves
respect toRight.
* Analogously, v([1,
R])
= -R+ 1, assuming that theadvantage for Right is negative. Which is the value of ?
After the first
synchro
ove, theinstance becomesand Left hastwo movesofadvantagethereforev([3, 2])must
be positive. In thegame
Right has awinning strategybecause wehave
andsuccessively,
D+D+D+D+w+w
therefore
v([3, 2])
mustbe less than 1. Youcancheckeasilythat inthe game
Right has stillawinning strategytherefore
v([3, 2])
mustbe less than -Actually,
Right
has awinning
strategy
even ifweaddanarbitrary number of
[3, 2]
rectangles,therefore
v([3, 2])
is aninfinitesimal number because itmustTABLE IV
VALUEFOR RECTANGLES INSYNCHRONIZEDCUTCAKE
2 3 4 5 6 7
2 0 -E -1 - 1 -2 -2-E
3 E 0 -1+2E 1 1+E -2+3E
-2+2E
4 1 1-2E 0 _E3 -E -3E
5 1+E 1 E 3 _ 2 -2E +E
6 2 2 3E 2 oE3
7 2+E 2 2E 3E 2E- o3E3 0
The game [6,5] is really
amazing
because in the game [2,3] +[6,5] Righthas awinning
strategy, thereforev([6,
5])
mustbe less than E. You cancheckeasily
thatin the game[2,3] +
[6, 5]
+[6,
5]
Right has still awinning
strategy,therefore v([6,5]) mustbe less than 2.
Actually,
Right
has a winning strategy even if we add anarbitrary
number of[6,5] rectangles therefore v
([6,
5])
must be smaller than nn for any n and we denote itby
E2.Analogously,
we denotev([5,
4]) by£3
beinginfinitesimally
smaller thanv([6,
5]).
Using the samereasoning
we cancalculate the values of the otherrectangles as shown in Table IV.The following theorems hold.
Theorem 2: Let [n,
2]
be arectangle
ofSynchronized
Cutcake with n>4. Wehave
n 2
if
nis evenProof: We can distinguish 4 different cases.
1) n 0 (mod
4).
v([n,2])
v(jj,2])
+v([-2])
+1 n-4 n-4 + 4 +1 4 4n-2
2 2) n_ 1(mod
4).
4) n = 3 (mod 4).v([n,2])
v([jv2,2])
+v([
212])
+ 1 n-3 n-7 4 4 n-3 2 +In each casethe middle
equality
follows from the inductivehypothesis. U
Theorem 3: Let [n,3] be a
rectangle
ofSynchronized
Cutcake withn>4. WehaveI 2 if
n~
is evenv([n,
3])
n{
2 2 ifisd2
n-3
E£If
niS
odd Proof: We can distinguish 4 differentcases.1) n 0O (mod 4).
v([n,3])
v(jj,3])
+v(
j
3])
+1 n-4 n n- 4 n 4 4 + 4 4 +1nr-2
n~ 2 2 2) n_ 1 (mod4).
v(In,3])
v([3])
+v([ 23])
+1 n-5 n-5 n-5 n- 1 4 4 + 4 +1 n-3 2n-3
2 3) n_ 2 (mod4).
v([n,3])
= v([2,3])
+v([23
])1
n-2nr+2
n-6 n-2 = -~ £+ ~~+ £~+ 1 4 4 4 4 n-2 n = - -£E 2 2 4) n = 3 (mod4).
v[n,2])
=v([
,2])
2+v([v
12
+1 n-5
n-5
4 ++ + 1 4 ~~4 n-3 2 3) n_ 2(mod
4).
v([n,2])
=v([
2,2])
+v([22])
+1 n-2 n-6 = - + 4 +1 4 4 n-22
v([n,3])
= v([ 2'3]
n- 3nt+l
n -3n E 4 4 n-3 n-3 + (Kn 12])+1 n-7 n-7 '+ + £ +1 4 4 2 2In each casethe middle
equality
follows from the inductivehypothesis. E
Theorem 4: Let [n,
4]
be arectangle
ofSynchronized
Cutcake withn> 8. Wehaven-4 if
n_0
(mod4)
v([n,4]) =in46 +
ift
2(mod
4)I
4+
3E ifn_3 (mod4)
Proof: We candistinguish
8 differentcases.Proceedings ofthe 2007 IEEESymposiumon
Computational IntelligenceandGames(CIG
2007)
4 4) n1 3 (mod8
v([n,
4])
= 5) n1 4 (mod8v([n,
4])
= 6) n1 5(mod8
v([n,
4])
= 7) n1 6(mod8
v([n,
4])
= + n 11 n11-1211
+ 3£ + +1 n 7 n+43n-£ v -4]
+v(~
[ 4] )1272
n-4 n- 12 8 + +1 8 8 n-4 4 v -4]
+v( [ 4] ) n-5 n- 13 3 8 8 n-5 3 + 4 8) n_ 7 (mod 8).v([In,4])
v([n
2 4]) +v([24])
+1 n-7 n- 15 + 8+3£+
1 8 8 n-7 + 3£In each case the middle
equality
follows from the inductivehypothesis. U
Theorem 5: Let [n,5] be a
rectangle
ofSynchronized
Cutcake with n > 8. We have
-4
n£3
ifn 0 (mod4)
v(n,
VK[12,5n)6j+A2
5]) 4n6
E3if n2
it2(mod
(mod4)4)
n4 +
2-
_n4
3 ifn 3 (mod4)
Proof: We can distinguish 8 differentcases.
1) n 0O(mod 8). = n £ n
v([1
45])
v(- ] +v(j
]
+1
1 813+2
82
2 8 8 8 8 4 4 2) n1 1 (mod8v([n,
5])
= 3) n1 2 (mod8v([n,
5])
= 4) n1 3 (mod8v([n,
5])
= (F11 T(+ ( n-9 n-9 3 _ £ + 8 8 + n-9 n-13+1
8 8 n-5 4n-5 3 4 4I[n
])+1
(n
1+2
-([1 21
n i ~5j- +vI ,5J~ +111
122
+[
2j)
n-10 +£2 _n-103
£3 n- 10 n-231
8 8 n-6 2n-63
+ - 3 4 4v([123 B5] +([12 31)
n+32£- £3+ n-11 n-333
v 2E1i-vii +5i+
8 8 + - £~+1 8 8 n-7 n-3 3 +2£- £ 4 4 1) n 0O (mod8
v([n,
4])
2) n = 1 (mod8v([n,
4])
= 3) n_ 2 (mod8v([n,
4])
= ') n =v([2,4])+j[2,4]) + 1
12
2 n-8 n-8 =8 + 8 +1 n-4 4 ')-- v ~ v([2 : ])+v([2 ]) n-9 3 n-9 + + +1 8 8 n-5 3 4 + ')-- v ~ v([2 : ])+v([2 ]) n-10 n-10 +£+ +1 8 8 n-6
(n
1+2
n\(-122 v\[2
-4]
j/+v(~
[[2j,
4] ) n 6 2n- 14 8 8 1264 +£ -')-5) n = 4 (mod 8).
v[n,5])
=v([2n
4])
+ v 245
+ 1 fn-4 nt+43n=
- n £3+ 8 8 n-112 nn-4 8 8 n-4 n 3 4 4 6) n_ 5 (mod8).
v([n,5])
=v([ 2 ])v 5 +122 22F3
n-5 n+3 3 8 8 + n- 13 n- 13 3 - + 1 8 8 n-54 + n- 5 3 £ 4 4 7) n =6 (mod 8).v([Qn,5])
v([ 2 5]) +v([ 2])+1
n-6 n+2 3 = - £ + n- 14 2 8 + n-6 2 4 + 12 14 3 - £ + 1 8 1263 4 8) n1 7 (mod8).
v([n,5])
=([n
+15])
+ (K 21])
+1 1 n-7 n+13 8 8 tV n- 15 n-7 +2£- £3E+ 1 8 8 n-7 n-33 A +2£ £ 4 4In eachcase the middle
equality
follows from the inductivehypothesis. U
The following theorems canbeproven in thesame way.
Theorem 6: Let [n,
6]
be arectangle
ofSynchronized
Cutcake with n>8. Wehave( n4 £ ifn
n-5 2 ifn
v([n,
6])
1n46
n6 fifn
n-7 _n-7£-3ifn
Theorem 7: Let [n,
7]
be a rectangleCutcake withn> 8. We have
4 34n ifn v([n,7]) 46 3n 184 i 1 n-7 3n 21£ ifn o0 (mod 4) = 1 (mod 4) _ 2 (mod 4) _ 3 (mod4) of Synchronized o0 (mod4) = 1 (mod4) _ 2 (mod4) _3 (mod 4) V. CONCLUSIONS
In conclusion, introducing
synchronism
in the game of Cutcake has two remarkable effects on this game. On the onehand, there existno morezero-games,i.e,
games where the winner dependsexclusively
ontheplayer
that makes the secondmove; on the otherhand,
there exists thepossibility
to get adraw which isimpossible
inatypical
combinatorial game.To establish the value ofageneral
Lby
Rrectangle
is muchmoredifficult than Cutcake because ofsynchronism
and further efforts are necessary to solvecompletely
this game.Future works concern the resolution of thefollowing
openproblems:* toprove theConjecture
1,
* todetermine the value ofan
arbitrary
Lby
Rrectangle,
* to analyze other games in orderto establish ageneral
mathematical theory about
synchronized
combinatorial games.ACKNOWLEDGMENTS
The authors would like to thank the anonymous referees for their usefulcomments.
REFERENCES
[1] E. R.Berlekamp,J. H.Conway,andR. K.Guy,Winningwaysforyour
mathematicalplays,2nd ed. Natick,Massachusetts:A KPeters,2001,
vol.1, ch.2, pp.24-26.
[2] J. H.Conway,Onnumbers and games, 2nd ed. Natick,Massachusetts:
A KPeters,2001,ch. 15,pp. 200-201.
[3] T.Nakamura,A.Cincotti,andH.lida,"The rebirth of solvedgames,"in
Proceedingsofthe 8th International ConferenceonComputerScience
and Informatics in conjunction with the 8th Joint Conference on
InformationSciences, 2005,pp.265-269,onCD-ROM.
[4] A. Cincotti andH. lida, "Outcome uncertainty and interestedness in
game-playing:Acasestudyusingsynchronized hex,"NewMathematics and NaturalComputation, vol.2,no.2,pp. 173-181,2006.