Archived from groups: comp.ai.games (
More info?)
"stef" <bastin@xs4all.be> wrote in
news:40968f43$0$564$e4fe514c@news.xs4all.nl:
> Hello,
>
> I've just made a connect 4 game with an AI that uses Minimax with
> Ab-pruning. Now i 've read some articles about neural networks and i
> want to try it on my program but i don't really see what my input and
> output should. Can i use this neural network to decide which column to
> play or just to evaluate a board in my minimax tree?
Well, as inputs you could consider one input for each field in each column,
giving a -1 when a piece of the opponent is there, 1 for a piece of the
player itself, and a zero if it's empty. For outputs, you could use an
output neuron for each column, the neuron with the highest activation level
then would give the column where should be played.
The problem with this is the evaluation. With what data will you train your
neural network ? You only know if it's playing good or bad when the game is
over, and if you adapt the network weights then, you should do so for all
moves - even the ones which were very good, if the game would lose because
of one silly mistake at the end.
You *could* use minimax for the evaluation of any board, to train the
network. Whether this is useful, that is another question.
So, in short, the point is that, to train a neural network, you should have
some evaluation of the boards on which it is trained. Afterwards, yes, such
a network could be used to evaluate an arbitrary board position (you should
then have only a single output neuron, or two : one for each opponent, the
neuron with the highest activity would give the most probable victor).
--
Pento
De wereld was soep, en het denken meestal een vork,
tot smakelijk eten leidde dat zelden. - H. Mulisch