Giter Site home page Giter Site logo

alphazeromcts's Introduction

7343 Homework 2

Your task in this homework is to implement the Monte Carlo Tree Search used in AlphaZero for the board game Gomoku (five in a line). For simplicity, we consider only the Gomoku game with a 11x11 board.

  1. You should implement a class named "MCTS" which must be a subclass of the class MCTSBase. The MCTSBase class already has the overall search process. In your MCTS class, you need to fill in the missing components by implementing (override) the abstract methods. (Do not change/override the non-abstract methods.)
  2. Your code also needs to implement another class (use any class name you want) that is a subclass of the TreeNode class and completes the implementation of the abstract methods in that class.
  3. The tree search process needs to utilize a deep neural network. Given a state s, the DNN estimates the state value of s as well as computes the policy at s (the probability of actions). You should implement such a neural network and use it in the code for some of the abstract methods.

Also pay attention:

  • Do not copy code from MCTSBase.py into your hw2.py file. Simply import the symbols from MCTSBase.
  • Do not change/override non-abstract methods in the provided .py files.
  • Read the documentation on the abstract method carefully. When you override a method, you must use the same function signature. When coding, you should have a good understanding on what parameter will be passed to that method and what we expect that method to return. If these are not followed, the tree search process cannot run.

Submit your work

Put all your code in a single file named "hw2.py" (you must use this file name) and submit the file in moodle. (Different from hw1, you don't need to have code for downloading the weights of your trained model.)

We'll test your code as shown at the end of the gomoku.py file. The MCTS class will be imported from hw2.py. A MCTS object will be created and used in the NeuralMCTSPlayer to choose a move at each step. Make sure that your code works with gomoku.py.

alphazeromcts's People

Contributors

edxmorgan avatar zhang8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.