[Tutor] Todays Learning Python Question From a Newbie ;)

Andre Roberge andre.roberge at gmail.com
Thu Feb 2 16:13:25 CET 2006


As I indicated in private email yesterday to Jon, there is indeed a
hole in the computer stratey when the following three first moves are
made:
x:2
o:4  (first available "best move" for the computer)
x:7

I also sketched a "solution", which I will rephrase here in a different way.

The next "best move" from the list leads to a win for the human, if
she/he plays correctly.
So, one has to put in "somewhere" (there are a few possible places) a
test to see if this combination of the first three moves has occurred;
if so, hard-code a computer response that defeats this strategy; if
not, go and use the standard "best move" list.

André

On 2/2/06, Jon Moore <jonathan.r.moore at gmail.com> wrote:
> All that does is reverse the hole!?!?
>
> x:2
> o:4
> x:7
> o:0
> x:8
> 0:5
>
>     O |   | X
>     ---------
>       | O | O
>     ---------
>       | X | X
>
>
> On 02/02/06, Wolfram Kraus <kraus at hagen-partner.de> wrote:
> > Jon Moore wrote:
> > [...]
> >
> > > Thanks to  André, there is a way to win every time if you take the first
> > > move (see below), so there MUST be a whole in the computers stratergy!
> > > Based on what we all know about the game, I would say that you can not
> > > make it so that the computer can win every time, but it should be
> > > possable to make it tie.
> > >
> > > x: 0
> > > o: 4
> > > x: 7
> > > o: 2
> >       ^
> > Make this 6,3,8 or 5 and it will be a tie
> >
> > > x: 6
> > >
> > >                     0 | 1 | 2
> > >                     ---------
> > >                     3 | 4 | 5
> > >                     ---------
> > >                     6 | 7 | 8
> > >
> > >
> >
> >
> > Wolfram
> >
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > http://mail.python.org/mailman/listinfo/tutor
> >
>
>
>
> --
> Best Regards
>
> Jon Moore
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
>


More information about the Tutor mailing list