Git Product home page Git Product logo

reversi's Introduction

Reversi

Computer Reversi Game and also an AI Player for AI Competition.

this project consists of a GUI for Playing Othello and also an AI Player.


AI Algorithm (Black) vs. Greedy Algorithm (White)

Play Modes

  • Human VS Human
  • Human VS AI
  • AI VS AI



AI Algorithm

Minimax Search

The search algorithm is a minimax search with alpha-beta pruning.

Evaluation Function

  • Realtime Evaluation : Evaluation function changes as you move from early-game to end-game with each move , using linear interpolation between static values.

  • Machine-Learning-Tuned Evaluation : i've used Hill-Climbing algorithm to train weights on each heuristic function based on game progress.

Heuristic Functions

One of the most critical components of the search algorithm is the heuristic function, which evaluates the strength and overall desireability of a given board position. It is implemented as a linear combination of the following statistics, with the weights adapting as the game progresses

  • Corner Grab (Measures if the current player can take a corner with its next move, Weighted highly at all times.)

  • Stability (Measures the number of discs that cannot be flipped for the rest of the game. Weighted highly at all times.)

  • Mobility (Measures the number of moves the player is currently able to make. Has significant weight in the opening game, but diminishes to zero weight towards the endgame.)

  • Placment (piece placement score of the current player minus the piece placement score of the opponent.)

  • Frontier Discs (number of spaces adjacent to opponent pieces minus the the number of spaces adjacent to the current player's pieces.)

  • Disc difference (Measures the difference in the number of discs on the board. Has zero weight in the opening, but increases to a moderate weight in the midgame, and to a significant weight in the endgame.)

  • Parity (Measures who is expected to make the last move of the game. Has zero weight in the opening, but increases to a very large weight in the midgame and endgame.) (currently unused feature)

Killer Move Detection

The AI Player takes some moves without searching within the Minimax tree:

  • Corner Grab Move (Move that leads to capturing a corner)

  • Blocking Move (Move that blocks the oponent on the next move)

Opening Book

In the opening, the AI may take its moves from a database of commonly played openings (source here)

Transposition Table

the AI keeps record of some previously searched and Evaluated Boards with use of Special Zorbist Hash Function.(see here) (This Feature is still under Development)

reversi's People

Contributors

arminkz avatar vmoucadeau 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.