Is the following approach on the right track?

Use a recursive function to finish out all possible remaining moves to

assess the end result as one of three possible options:

1) -1 if end result would be a loss

2) 0 if end result would be a tie

3) +1 if end result would be a win

Then choose one of the possible remaining moves that would result in

eitther a +1 or 0. (If more than one possible "win" moves remains,

use a random number to pick the move to go with

In the first few moves of a game, assuming the human player goes

first, the program would use recursion to assess all 8 follow up

moves, with all folow ups to each reply move.

Example, a starting move of the following:

X | |

-----------------

| |

-----------------

| |

would be possible countered by one of 8 follow up moves

X | O |

-----------------

| |

-----------------

| |

or...

X | | O

-----------------

| |

-----------------

| |

or...

X | |

-----------------

O | |

-----------------

| |

or...

X | |

-----------------

| O |

-----------------

| |

etc.....

And for EACH of the 8 possible follow up moves, there will be 7 reply

moves, with each of the 7 reply moves having 6 follow up moves....

etc.

On Mon, 2 Aug 2004 22:45:12 -0600, "Jonathan Turkanis"

<te******@kangaroologic.com> wrote:

<jb*******@yahoo.com> wrote in message

news:12********************************@4ax.com.. . Does anyone have C++ source code for a Tic Tac Toe game where

recursion is used?

...

This is not for a course... it is a starting program that I am using

to learn C++ basics on my own.

If you're really trying to learn, you shouldn't be asking for

completed source code. You should try to solve it yourself, and post

here when you get stuck.

Jonathan