Re: TIB: Othello


[Prev][Next][Index][Thread]

Re: TIB: Othello




In a message dated 12/19/98 7:47:43 AM Central Standard Time, philhuck@club-
internet.fr writes:

> I'm planning to do an Othello game (I have already done one for two players
>  on the same calc) for two players with the link cable and one player vs the
>  calc. Has anyone an idea how I could code the AI (artificial intelligence)
>  of the calc and how to transmit data with the link in assembly ?
>  Thank you.
>  
>  MP <philhuck@club-internet.fr> <http://mp.ifrance.com>
AI! on a calc?  Well, since this is a relatively simple game you could
(assuming you store the board in an array, with 1 being a white chip, -1 being
a black chip and 0 being an open square) write a subroutine to check the total
number of flips you would get if you went to a certain square, and then store
the coordinates of the highest value and have the computer go there.  Better
yet, I just thought of this:  You have your array for the board, but make
another one of the same size and assign a point value to each square.
Initialize them all to zero, except the center (the four center ones are ones
because that's where the first move is), and then after every move set the
corresponding covered squares to zero on the ai board (so that the comp won't
go there) and raise the value of surrounding squares based upon the player's
move.  That way, the comp can make its decision much more quickly and not run
out of mem.  Plus, if you do it correctly the comp won't even consider making
a legal move, and the game is over when the sum of the ai array is equal to
zero, meaning the comp can't move.  This sounds neat, so if you want any help
with code let me know.
PJC II