0 votes
1 view
in AI and Deep Learning by (44.8k points)

I would like to build a Connect 4 engine that works using an artificial neural network - just because I'm fascinated by ANNs.

I've created the following draft of the ANN structure. Would it work? And are these connections right (even the cross ones)?

alt text

Could you help me to draft up a UML class diagram for this ANN?

I want to give the board representation to the ANN as its input. And the output should be the move to chose.

The learning should later be done using reinforcement learning and the sigmoid function should be applied. The engine will play against human players. And depending on the result of the game, the weights should be adjusted then.

What I'm looking for ...

... is mainly coding issues. The more it goes away from abstract thinking to coding - the better it is.

1 Answer

0 votes
by (97.2k points)

There are many different ways to implement neural network that range from simple/easy-to-understand to highly-optimized. there are many links that have implementations in C++, C#, Java, etc. which could serve as good references if you're interested in seeing how other people have done it.

Your design will be highly dependant on the specific type of reinforcement learning that you plan to use.

The simplest solution would be to use backpropagation. This can be done by feeding the error back into the network (in reverse fashion) and using the inverse of the (sigmoid) function to determine the adjustment to each weight. After the number of iterations, the weights will automatically get adjusted to fit the input.

Genetic Algorithms are an alternative to back-propagation which yield better results (although a bit slower). This is done by treating the weights as the schema so that it can easily be inserted and removed. The schema is replaced with a mutated version (using principles of natural selection) several times until a fit is found.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !