1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What is the formula for winning at Pentago?

  1. Nov 6, 2015 #1
    Pentago is a board game and you can think of it as a highly advanced version of tic-tac-toe.

    With the aid of supercomputers, it has been strongly solved. Just like tic-tac-toe, it is possible for the player who starts first to always in.

    I'm looking for a formula to always win at Pentago if I'm the first player. For tic-tac-toe, always mark the central square. For Pentago, never touch the 4 corners.

    Tic-tac-toe is simple enough, but what is a formula for Pentago that can be applied by humans anytime?

    Just like once someone memorises the algorithm, he can solve any Rubik's cube problem.
  2. jcsd
  3. Nov 7, 2015 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member
    2017 Award

    Tic-tac-toe is impossible to lose for either player unless they make mistakes. If both players know what they are doing, it will end in a draw.
  4. Nov 15, 2015 #3
    Oops. My bad.

    So in Tic-Tac-Toe perfect play, it will always end in a draw. What constitutes perfect play for Pentago?
  5. Nov 15, 2015 #4
    look here:


    They store the result of all positions with less than 18 stones. Every first move is winning, except for the corners.
  6. Nov 15, 2015 #5
    omg i didnt see that earlier. looks like they've just updated the site
  7. Nov 15, 2015 #6
    but anyway, is there a general formula that can be applied to all stages of the game? what constitutes perfect play?
  8. Nov 16, 2015 #7


    User Avatar
    Science Advisor

    Depends on what you mean by "formula".

    Is there an algorithm to determine perfect play? Yes.

    Is there a polynomial formula that returns an optimal move for any possible position. Yes, trivially. Encode the board position as 36 variables x1 through x36 with values 0 (no stone), 1 (black stone) or -1 (white stone). Then a polynomial with 336 terms exists which will return the required result. That polynomial could, in principle, be constructed as a sum of 336 products like the following one that embodies the starting board position:

    k * (x1 - 1 )(x1+1)(x2-1)(x2+1) ... (x36-1)(x36+1)

    Is there a formula that a human can use in reasonable time with pencil and paper? The fact that the Perfect Pentago site used a supercomputer to accomplish the task suggests that no such formula is known.
  9. Nov 16, 2015 #8
    perhaps it could be simplified? that would be very hard though
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook