Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

gibson

VIEWS: 0 PAGES: 9

									An adaptable, multiplayer connect 4 game




        Variation of the traditional connect 4 game

                       Tara Gibson

                    December 7, 2010
                 Connect4 Overview
   Two-player game in which the players first choose a color and then take turns
    dropping their colored discs from the top into a seven-column, six-row vertically-
    suspended grid. The pieces fall straight down, occupying the next available
    space within the column.




   The object of the game is to connect four of one's own discs of the same color
    next to each other vertically, horizontally, or diagonally before one's opponent
    can do so.
Approach - Multiplayer heuristic search
   Making it Multi-player

   Final board:
   0 0 0 0 0 2 2
   0 0 0 2 0 2 2
   2 0 1 1 2 1 2              2 Players, Normal Dimensions
   1 1 2 1 1 2 1
   1 1 1 2 1 2 2
   1 2 1 1 1 2 2
   ________________________
   The winner is 2!!!


   0 0 0 0 0 0 0 0 0
   0 0 0 0 0 0 0 0 1
   0 0 0 0 0 0 0 0 1
   0 0 0 0 0 0 0 0 3          3 Players, Larger Dimensions
   0 3 3 2 0 0 0 3 1
   0 2 2 1 0 0 0 3 3
   3 2 2 2 1 0 0 1 1
   2 3 2 2 2 1 1 1 3
   ________________________
   The winner is 2!!!
                    Heuristics
   Find play that gets the player closest to
    winning, Option with fewest number of
    plays left to win should be chosen
   Alternatives considered
       Longest consecutive sequence, leaves many
        options unconsidered, eg, 10110 takes the
        same number of plays as 01110, but you also
        have a slightly better chance to win.
       How many subsequences have been created
        that are one away from winning?
       How many possibilities are left to win?
       Simple two player search that minimizes or
        maximizes based on chance to win.
                           Performance
   Search Tree is large, consider a width of 7
        Level 1 = 7
        Level 2 = 49
        Level 3 = 343
        Level 4 = 2401
        Level 5 = 16807
        Level 6 = 117649
        Level 7 = 823543 .......
        (some of the nodes will be pruned off because they aren't allowed within the constraints
         of the game)‫‏‬

   Time performance
        8000
                                             Performance also improves as more
        7000

        6000
                                                   plays are made
        5000
                                 Level 5
        4000
                                 Level 6
        3000

        2000

        1000

          0
          Improvements

 Evaluate and Improve Heuristics
 Can the search be more efficient?

  Parallelized?
 Pruning for a better search?
          Further Investigation
   Use of learning, to determine optimal first
    play, patterns of play
       Evaluate previous games, what did the winner
        do?
   Variable gravity, a variation on the 3 player
    game, each turn the 'token' falls a different
    direction
                        Other Research
   It has been proven that with perfect play, a
    win/loss/draw can be forced based on the location
    of the first play
   For example:
      The first player can force a win by starting in
        the middle column.
      By starting in the two adjacent columns, the first
        player allows the second player to reach a draw
      By starting with the four outer columns, the first
        player allows the second player to force a win.
   http://www.connectfour.net/Files/connect4.pdf
                Conclusions
   Connect 4 provides an interesting base for a
    2+ player AI game.
   Heuristics and a cutoff depth are needed due
    to the large search space
   Learning would be beneficial to better choose
    between options that seem similar early in
    the game.

								
To top