Giter VIP home page Giter VIP logo

othello's Introduction

The C++ files are for the AI, while the Java files are implementations of the actual Othello game, with the GUI and all, which were not written by me.

At first, I stuck to the minimax tree, and the naive evaluation function of comparing the number of stones

I quickly created a better evaluation function, and optimized all the square values according to a table I found on the internet.

I implemented AlphaBeta pruning and Negamax, since it was easier to code and worked better. It could also get up to about 10 ply. Negamax is simpler than minimax, taking advantage of the fact that Othello is a 0 sum game and the score of a side is the negative of the other sides score. Pruning makes it so useless branches are not searched further.

Now I focused on the evaluation function, making it return positive or negative infinity if the game is currently won by this side or the other side, since the normal evaluation function might accidentally return a favorable value when losing is definitely bad.

Next I drastically increased the search depth if only a certain number of squares are still empty, allowing for perfect end game play.

Next I completely changed the evaluation function to take into account number of possible moves and corner control more, as the pieces themselves are unimportant, as lots of pieces can simply be cannon fodder for the opposition.

othello's People

Contributors

michaelsmiller avatar

Watchers

 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.