Skip to content

rcrr/reversi

Repository files navigation

Reversi is a suite of programs to play the Reversi (Othello) board game.

The source code is written in Common Lisp, Clojure, Java, C and PL/pgSQL.
The CL, Clojure, and Java versions share the underlaing logic and AI, taken from the PAIP book.
The CL version is the original source code plus a very limited set of adaptations.
The Clojure version is a complete rewrite that follows one by one the steps given by the text.
The Java version is a complete refactoring of the algorithms given by the CL version. On top
of it the Java version has a Graphic UI.

The C utilities are centered around the point of solving an endgame position, these utils have a complete
new implementation, fully departing from the PAIP design.
Since three years all the effort is dedicated to this objective.
The game machinery, that is identified by the two tasks of computing legal moves and updating the
board after a move, are redesigned around Intel AVX2 new instructions.
The list of todo enhancement is huge and embedded into the source.
There is no detailed description of all the features and functions provided by the C implementation.
The principal variation (PV) computation is not working when the solution has a huge number of variations.
This has to be fixed before a final refactoring that might close the software release. From there new
directions of evolution will probably be iterative deepening, trasposition table, and MTD(f) algorithm,
following directions that are already common practice.

The program is distributed under the GNU GPLv3 license.

The steps so far completed are:

 (1) Adapt the COMMON LISP programs taken from the PAIP book to run smoothly in the two following env:

      - Ubuntu 12.04 (x86_64)
      - SBCL version 1.0.55.0.debian
      - GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) installed from ppa:cassou/emacs
      - Quicklisp and Slime (2012-08-04) from http://www.quicklisp.org/
      - Read the README-CL for a detailed configuration

      - Microsoft Windows 7
      - ABCL 

     To operate the CL program type from the REPL:

           (asdf:operate 'asdf:load-op 'reversi)
           (in-package :reversi)

     The aim is to use the PAIP (Paradigm of Artificial Intelligence Programming. Case Studies in Common Lisp) examples
     that describe how to write an AI strategy to play the board game named REVERSI.

 (2) Translate the CL code into Clojure.

      - This work is almost complete.
         The basic game rules are working. The minimax and alpha-beta functions are ok.
	 Unit tests are complete.
	 The complete translation of advanced tecniques is complete (Reversi tournament, and Iago strategy).

 (3) Revrite the CL code into Java.

      - This work is complete.
         The complete set of function have been developed.
         A very extensive set of test cover the complete codebase.
         A GUI has been added. For it a complete refactoring is needed, as long as a test suite.
         A completely new set of Board implementation has been prepared.

     To build the software follow those steps:

       - Make sure you have a JDK 6 or newer installed (currently I am using OpenJDK 7).
       - Make sure you have ANT installed.
       - cd $REVERSI_PROJECT_HOME/java.
       - ant

     To operate the program run:

       - java -jar $REVERSI_PROJECT_HOME/java/build/jar/JavaReversi-full-1_0_0.jar

 (4) Future lines of development that currently are appealing, could be:

      - Develop a complete game analysis suite.
      - Further enhance advanced strategies, following the paper written by Rosenbloom, Lee & Mahajan, Buro.
      - Write the software documentation and publish it on GitHub and as PDF documents.

About

A Reversi (Othello) board game set of programs in different languages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published