This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-06-28 22:36:17

jimbobSr
Scratcher
Registered: 2010-05-18
Posts: 7

how to be unbeatable in tic-tac-toe

it really comes down to a few rules to follow

1st priority 

     if you have two in a row and the last is open WIN!

2nd priority

     if they have two in a row and the last is open BLOCK!

3rd priority (this is the actual unbeatable strategy)

     If they go in the corner go in the middle
     If they go in the middle go in the corner
     If they go on one of the sides go in the middle
     If they have two corners and one is open go on one of the sides


PLEASE NOTICE this is unbeatable NOT unTIEable  but I do garentee that you will never lose  big_smile   cool

Offline

 

#2 2011-06-28 22:37:36

jimbobSr
Scratcher
Registered: 2010-05-18
Posts: 7

Re: how to be unbeatable in tic-tac-toe

P.S. to see this strategy at work check this out
http://scratch.mit.edu/projects/jimbobSr/1888969

Last edited by jimbobSr (2011-06-28 22:38:12)

Offline

 

#3 2011-06-29 23:47:22

LeonardHofstadter
New Scratcher
Registered: 2011-06-29
Posts: 2

Re: how to be unbeatable in tic-tac-toe

Sorry, it's easily beatable (on how hard  set to 2, V39, waiting seconds between moves)
Your program doesn't respond to the same initial 2 moves the same each game, but you can beat it about at least 1/3 the time by picking a corner, (program will then take center), then you choose either outside center farthest from the corner you initially chose. After that the Program will sometimes obviously pick the wrong box. You can reproduce it by repeating this sequence a few times on a new game:
Define board:
123
456
789
Start with 7, computer plays 5 ,  you play 2.
Sometimes computer plays 8 or 9 next,  if so you play 1 and force a win on your next move.

Offline

 

#4 2011-06-30 00:12:30

LeonardHofstadter
New Scratcher
Registered: 2011-06-29
Posts: 2

Re: how to be unbeatable in tic-tac-toe

... BTW here's a tic-tac-toe I found that is really unbeatable:
http://scratch.mit.edu/projects/fcwang/1803996

Offline

 

Board footer