44
Mathematical and Computational Analysis of Chomp Salvador Badillo-Rios and Verenice Mojica

Mathematical and Computational Analysis of Chomp

  • Upload
    olwen

  • View
    48

  • Download
    5

Embed Size (px)

DESCRIPTION

Mathematical and Computational Analysis of Chomp. Salvador Badillo -Rios and Verenice Mojica. Goal. - PowerPoint PPT Presentation

Citation preview

Computational Analysis of Chomp

Mathematical and Computational Analysis of ChompSalvador Badillo-Rios and Verenice MojicaGoalThe goal of this research project was to provide an extended analysis of 2-D Chomp using computational and mathematical means in order to provide a pattern that may aid in finding the winning strategy for all board sizes.Game DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnGame DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnPlayer 1 makes a moveGame DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnPlayer 2 makes a moveGame DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnPlayer 1 makes a moveGame DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnPlayer 2 makes a moveGame DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnPlayer 1 makes a moveGame DescriptionGeometric 2-D Chomp:Two-player game

Players take turns choosing a square box from an m x n board

The pieces below and to the right of the chosen cell disappear after every turnxPlayer 2 loses!Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Player 1 chooses 12Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Player 2 chooses 9Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Player 1 chooses 8Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Player 2 chooses 2Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Player 1 chooses 3Game DescriptionNumeric 2-D Chomp:Players take turns choosing a divisor of a given natural number, N

They are not allowed to choose a multiple of a previously chosen divisor

The player to choose 1 loses2021222324301248163136122448329183672144332754108216432N = 24 * 33 = 432 Player 2 loses!Fair or Unfair?Strategy-Stealing ArgumentSuppose player one begins by removing the bottom right-most piece

Fair or Unfair?Strategy-Stealing ArgumentSuppose player one begins by removing the bottom right-most piece

If that move is a winning move, then player one wins

Fair or Unfair?Strategy-Stealing ArgumentIf it is a losing move, player two has a good countermove and player two wins

Fair or Unfair?Strategy-Stealing ArgumentIf it is a losing move, player two has a good countermove and player two winsBut player one could have gotten to that countermove from the very beginningTherefore, player one has the winning move and can always win, if he/she plays perfectly

Known Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

x12341234Known Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

The board is left as an L-shape, and player one copies player twos moves symmetricallyPlayer 1 chooses (2,2)Known Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

The board is left as an L-shape, and player one copies player twos moves symmetricallyPlayer 2 movesKnown Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

The board is left as an L-shape, and player one copies player twos moves symmetricallyPlayer 1 moves symmetricallyKnown Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

The board is left as an L-shape, and player one copies player twos moves symmetricallyPlayer 2 movesKnown Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

The board is left as an L-shape, and player one copies player twos moves symmetricallyPlayer 1 moves symmetricallyKnown Special Casesm x m ChompPlayer one chomps the piece located at (2,2)

The board is left as an L-shape, and player one copies player twos moves symmetricallyxPlayer 2 loses!Known Special CasesTwo-Rowed ChompProposition 0: (a, a-1) is P-position , where a 1

(a,b) is an N-position ONLY when a b 0 and a b+1

Winning Moves:(a,a-1) if a=b (b+1,b) if a b+2

Three-Rowed ChompZeilbergers Chomp3RowsDoron Zeilberger developed a program that computed P-positions for 3-rowed Chomp for c 115We will be using this notation throughout[c, b, a]|--------c---------||---b---||--------a--------|Three-Rowed ChompProposition 1:The only P-positions [c,b,a], with c = 1, are [1,1,0] and [1,0,2]N-positions with at least 6 pieces and with c = 1:[1,1,1], [1,2,0], [1,0,3+x], and [1,1+y,x]Winning Moves:[1,1,1], [1,2,0],[1,0,3+x] to [1,0,2][1,1+x,y] to [1,1,0]Proposition 2:[2,b0,a0] is a P-position iff a0 = 2[1,1,4] i.e., [1,0,3+x] where x = 1Move to: [1,0,2]Our ResearchTwo computers play against each other, both eventually learn to play at their best

Displays :Board1st computers opening winning move P-positions and their total amount Number of games playedAdaptive Learning ProgramApproximation of P-positionsApproximation of P-positionsApproximation of P-PositionsInitial attempt to Analyze P-PositionsInitially we decided to look at the sum of the P-positions to note obvious patternsOne obvious pattern was found (the one proposed by Zeilberger)Was not much of a success due to the various possible arrangements of pieces

Analyzing Opening Winning MovesComputers opening winning moves for 3,4, and 5 rows were analyzed

One significant pattern was observed for 3-rowed Chomp, and a possible pattern was observed as well

No clear patterns were found for 4 and 5-rowed ChompP-Positions after Computer Learned Opening Move3-RowsBoard Size:Value of NComputer 1's Opening Winning MoveResuting P-Position3x193[0,0,1]3x21818[1,1,0]3x3366[1,0,2]3x47212[2,0,2]3x514472[3,2,0]3x628824[3,0,3]3x7576144[4,3,0]3x8115248[4,0,4]3x92304576[6,3,0]3x10460896[5,0,5]3x119216192[6,0,5]3x12184322304[8,4,0]3x1336864384[7,0,6]3x14737289216[10,4,0]3x15147456768[8,0,7]Type 1: yn = [y0[1]+4n,0,y0[3]+3n]Opening Winning Move Conjecture for 3-Rowed ChompSuppose xn is the set of board sizes: 3 x (1+7n), 3 x (3+7n), 3 x (4+7n), 3 x (6+7n), where n0.Then the computers opening winning moves for xn are to the set of P-positions ynyn has a pattern such that: yn = [y0[1]+4n,0,y0[3]+3n], where :

Board Size (x0):Computer 1's Opening Winning Move:Resulting P-Positions (y0):3x13[0,0,1]3x36[1,0,2]3x412[2,0,2]3x624[3,0,3]Board Size (x1):Computer 1's Opening Winning Move:Resulting P-Positions (y1):3x848[4,0,4]3x1096[5,0,5]3x11192[6,0,5]3x13384[7,0,6]y0 = { [0,0,1]}[1,0,2][2,0,2][3,0,3]Type 1: yn = [y0[1]+4n,0,y0[3]+3n]Board Size (x0):Computer 1's Opening Winning Move:Resulting P-Positions (y0):3x13[0,0,1]3x36[1,0,2]3x412[2,0,2]3x624[3,0,3]Board Size (x1):Computer 1's Opening Winning Move:Resulting P-Positions (y1):3x848[4,0,4]3x1096[5,0,5]3x11192[6,0,5]3x13384[7,0,6]Board Size:Computer 1's Opening Winning MoveResuting P-Position3x218[1,1,0]3x572[3,2,0]3x7144[4,3,0]3x9576[6,3,0]3x122304[8,4,0]3x149216[10,4,0]Type 2: In ProgressNo Patterns Found4-RowsBoard SizeValue of NComputer 1's Opening Winning MoveResuting P-Position4 x1273[0,0,0,1]4x25454[1,1,0,0]4x310818[1,0,2,0]4x42166[1,0,0,3]4x543236[2,0,3,0]4x686412[2,0,0,4]4x7172872[3,0,3,0]4x8345624[3,0,0,4]4x969123456[7,2,0,0]4x1013824288[5,0,5,0]4x112764848[4,0,0,7]4x125529696[5,0,0,7]4x13110592576[6,0,7,0]5-RowsBoard SizeValue of NComputer 1's Opening Winning MoveResuting P-Position5x1813[0,0,0,0,1]5x2162162[1,1,0,0,0]5x3324108[2,0,1,0,0]5x464836[2,0,0,0,2]5x512966[1,0,0,0,4]5x6259272[3,0,0,3,0]5x7518412[2,0,0,0,5]5x8103685184[7,1,0,0,0]5x920736288[5,0,0,4,0]5x104147224[3,0,0,0,7]5x118294441472[9,2,0,0,0]Analyzing All P-positions by Grouping3, 4, and 5-rowed Chomp was analyzedThe P-positions within these n-rowed Chomp sets were grouped by the amount of pieces in the bottom row

The P-positions for each group were then sorted into their possible permutations4 Rows: d = 2[2,0,0,4][2,0,0,4][2,0,0,4][2,0,0,4][2,0,0,4][2,0,0,4][2,0,0,4][2,1,0,2][2,1,1,5][2,1,2,2][2,1,3,2][2,1,4,3][2,1,5,3][2,1,6,3][2,2,1,3][2,2,1,3][2,2,1,3][2,2,1,3][2,2,1,3][2,2,1,3][2,2,1,3][2,3,0,4][2,3,0,4][2,3,0,4][2,3,0,4][2,3,0,4][2,3,0,4][2,3,0,4][2,4,0,6][2,4,0,6][2,4,0,6][2,4,0,6][2,4,0,6][2,4,0,6][2,4,0,6][2,5,1,5][2,5,1,5][2,5,1,5][2,5,1,5][2,5,1,5][2,5,1,5][2,5,1,5][2,6,3,2][2,6,3,2][2,6,3,2][2,6,3,2][2,6,3,2][2,6,3,2][2,6,3,2][2,7,4,0][2,7,4,0][2,7,4,0][2,7,4,0][2,7,4,0][2,7,4,0][2,7,4,0]Pattern Found After Grouping Constant Row Value ConjectureFor n-rowed Chomp, when n3, at least one subset of its total P-positions will have a pattern as follows: n-2 columns of the data for the subset will be fixed to distinct constant valuesIn the following column the values will increase by a value of oneThe values of the remaining columns may vary or have a constant value as well 3-Rows: c = 4[c,b,a][4,0,4][4,1,4][4,2,4][4,3,0] 4-Rows: d = 4[d,c,b,a][4,0,0,7][4,0,1,5][4,0,2,7][4,0,3,2][4,0,4,4] 5-Rows: e = 1[e,d,c,b,a][1,0,0,0,4][1,0,0,1,2][1,0,0,2,3][1,0,0,3,3][1,0,0,4,3][1,0,0,5,3][1,0,0,6,3][1,0,0,7,3]Concluding RemarksDeveloped a learning program to analyze ChompApproximated amount of P-positions per board sizeInitially analyzed sum of P-positions to find patternsAnalyzed Computers opening moves and resulting P-positionsOpening Winning Move Conjecture for 3-Rowed ChompGrouped P-positions of certain board sizes with fixed boards by amount of pieces in bottom rowConstant Row Value ConjectureAknowledgementsiCAMP ProgramFaculty Advisor: Dr. EichhornRobert CampbellGame Theory fellow researchersSheet1C=1C=2C=3C=4C=5C=658121620235101318202412141823251420252716271820222426

Sheet2D=1D=2D=3D=4D=5D=6D=7D=8D=9D=10712172127303441434581319232832389142022303614202430371720253038172027301823273518242635192430371925284121253121262822263123273323293324293724303826312632

Sheet3E=1E=2E=3E=4E=5E=6E=7E=8E=99132029303845515391421303138499152130334410172230331218253133122025323913212533401423263415232634162327341823273519252835192529372026293921263041222730442327302327312328322430323532323234323534353535394143