Abigail
Posts:
13
Registered:
12/12/04
|
|
Re: Tic Tac Toe program.
Posted:
Feb 20, 1997 8:42 PM
|
|
On Thu, 20 Feb 1997 17:22:51 GMT, odie wrote in rec.puzzles,sci.math: ++ In article <5eho54$leh@netnews.upenn.edu> sharker@saul.cis.upenn.edu ++ (Scott M. Harker) writes: ++ > ++ >Unless it's been deleted from my news spool, no one has given a complete ++ >set of winning strategies. The following rules should give a win for the ++ >computer wherever possible. I'm using the (standard?) notation: ++ > ++ > 1 | 2 | 3 ++ > ---+---+--- ++ > 4 | 5 | 6 ++ > ---+---+--- ++ > 7 | 8 | 9 ++ > ++ ++ ++ ++ It may prove useful to use a "magic square" notation. Then a winning ++ position is simply one with three squares that add up to 15. I ++ would think that a computer would be much happier with this notation. ++ ++ 6 | 1 | 8 ++ ---+---+--- ++ 7 | 5 | 3 ++ ---+---+--- ++ 2 | 9 | 4 for example, if you can find an i and j which ++ ++ are "owned" by the opponemt, are not equal and add to less than ++ 15, then your move is 15-i-j to block.
Well, if your opponent has 6 & 3, then I can't play 6. Or 10 in case he has 2 & 3. Furtermore, if my oponent has 6 & 4, and I have 5, I should play uneven. All your rule says I shouldn't play 5.
Abigail
|
|