GithubHelp home page GithubHelp logo

othellogame-team_ai_chaser's Introduction

Othello-game-Team-AI_Chaser

1.Project Description: Name: Game of Othello Author: Mutian Xu, Jing Liao, Qiqi Pan Version:1.0

2.Project Function: Initially, the input is a vector of 64 symbols {0,W,B} defining the starting board; The computer moves first; Output after each computers move is a pair (i,j) that defines the computers move on the 8x8 board; After computers move, it should expect as input a pair (x,y) that defines opposing players move until the game is over (current player cannot move).

3.Running Method: Open Python IDE; Create a new project file and copy the four python files into your project file.

If you want to check the Result 1 in the report, you should use right mouse to click othello.py and click °Ærun°Ø firstly. The Othello.py is a game between two AIplayers;

The check method: Change the last number of sentence48 and sentence 51 in player.py to respectively fit the number of the first 2 columns in the result graph of the report.

If you want to check the Result 2 in the report, you should right mouse click othello_2.py and click °Ærun°Ø firstly.

The check method: a. Play the game with AI according to the instruction of the game: input e3 and then e2. b. Change the last number of sentence48 in player_2.py to 5, which fits the number of the second depth in the Result 2 of the report. c. Play the game with AI according to the instruction of the game: input is same as step a.

4.For the developer: You can follow the explanation of the code to know how the code work.

Split into four files: board.py, player.py, ai.py, othello.py. Make the whole structure clearer, more versatile and easier to maintain.

The Board class is used for creating rules such as get_legal_actions() and define some basic method such as move() so that the other class can directly inherit the methods of this class to run. In this way, it will be easier to maintain and develop.

The level of AI is related to the recursion depth of minimax and the evaluation function. Based on this, I put the minimax and evaluation functions in the AI class.

AIPlayer uses multiple inheritance, inheriting two classes of Player and AI.

In the Game class, the part of the original run function that generates two players is proposed and written as a function make_two_players, which makes the run function structure clearer.

Every class and object are named intuitively so that you can easily understand the function of them.

5.Acknowledgement: Thanks to Dr. Kalev Kask for the instruction of the course, CS271: Introduction to Artificial Intelligence, in Fall 2018; Thanks to all the people who give our team suggestions for the project.

6.Referrence: AI-Minimax-Agent: github.com/k-time/ai-minimax-agent/blob/master/ksx2101.py Othello-evaluation-function: stackoverflow.com/questions/12334216/othello-evaluation-function Algorithms in Othello: https://aijunbai.github.io/publications/USTC07-Bai.pdf Game strategy of Othello: radagast.se/othello/Help/strategy.html

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.