0

I'm just beginning to experiment with neural networks and was hoping to create a neural network capable of learning to play the game Gomoku via q-learning. After reading through some of the Lasagne tutorials and API, I unsure how to proceed with my project. Also, looking at the mnist example that comes with Lasagne, I'm uncertain what code, if any, applies to what I'm trying to do. So I guess my question is, what Lasagne code do I need to create and train such a network? I don't need the most effective solution; something simple and comprehensible for a beginner would be much appreciated.

Some additional details:

  • I would like to have two instances of the network play against each other
  • I've written a basic program that can take in player moves (a single integer value in range(0, total board positions - 1)) to simulate a Gomoku game and return a victor, which should be necessary for providing reinforcement to the networks

Thanks.

Maxim
  • 52,561
  • 27
  • 155
  • 209
  • Hi and welcome to Stack Overflow, please take a time to go through the [welcome tour](https://stackoverflow.com/tour) to know your way around here (and also to earn your first badge), read how to create a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) and also check [How to Ask Good Questions](https://stackoverflow.com/help/how-to-ask) so you increase your chances to get feedback and useful answers. – DarkCygnus Jul 17 '17 at 19:20
  • Any reasons why you want the Q-learning approach? Do note that QLearning is a reinforcement learning technique, while neural networks are supervised learning tools for regressions; both reinforcement and supervised differ in several things, beginning with the absence of input/output data to train on (like Neural nets require). I believe other approaches could be more straightforward and correct, have you heard of the [mini-max algorithm](http://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/)? – DarkCygnus Jul 17 '17 at 19:26
  • While I know there are algorithms which can play Gomoku to an advanced level, I wanted to try using a neural network to learn the game more organically as a fun introduction to neural networks. I'm not especially hung up on Q-learning, it just seemed to be one possibility for what I'm trying to achieve. I was intending to have my Gomoku simulator produce input for the network and have a victory condition provide feedback for learning Q-values of various board states. – Patrick Lin Jul 20 '17 at 18:14
  • Here's the example I found that inspired me to try this approach (using Tensorflow rather than Lasagne): https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0 – Patrick Lin Jul 20 '17 at 18:15

0 Answers0