>>> OTHELLO/REVERSI V1.1   (C) 1999 by Zeljko Juric <<<
>>> Compiled using TI-GCC compiler by Xavier Vassor <<<

Introduction
------------

Othello/Reversi is a famous board game for two players. This program allows
you to play this game against the TI-92 Plus. This is the first version of the
Othello game designed specially for TI-92 Plus (e.g. which uses full screen
display). For TI-89 a three versions of Othello exist: one written by Franois
Leiber in TI BASIC, another one written by Alban Gervaise in assembler, and
mine (with the same name). But, it seems that my program is a first game for
TI-92 Plus made in C language and compiled using TI-GCC compiler by Xavier
Vassor. So, I believe that it is worth to look on it (there already exists
another very serious C program for TI-92 Plus: VI editor - for more info look
on dba.ticalc.com). This game does not require any shells (DoorsOS nor
PlusShell) and does not require any libraries too. Source code is included,
and if you are programmer, you can learn how to make quite usable programs on
TI-92 Plus in a high programming language (e.g in C) which don't require any
shells for running...

Rules
-----

In this game, you and TI-92 Plus will take turns to move on the 8x8 chess-like
field (you have black pieces). A move is made by placing a new piece on the
field of play, into a vacant space next to an opponent's piece. Each move must
result in the capture of one or more of the opponent's pieces. A capture is
made by trapping the opponent's piece (or continuous line of pieces) between
the one just placed and one of the same color already in play. Captures can be
made in a straight line horizontally, vertically or diagonally, or in any
combination of these at once. All the opposing pieces trapped by the piece
just played are then converted to its color (if you don't quite understand it,
try and see - TI-92 Plus will check whether a move is legal). Pieces do not
move once placed but they do change color if captured. If a capture is not
possible then the player has to "Pass" (e.g. skip a move) and it is then the
turn of the other player (TI-92 Plus will inform you if such situation
happened). The game ends when neither player can make a move. This happens
either when the board is full, or when the pieces are so placed that no
captures are possible, i.e. both players can only "Pass". The winner is the
player owning the largest army at the end of the game. The most striking
feature of this game for the newcomer is the dramatical reversal in the
fortunes of each side as the game progresses: first Black seems to have
undisputable territory, then White dominates until Black forces concessions
and so on. That's why one of the names of the game is Reversi.

How to play on TI-92 Plus
-------------------------

In this implementation of the game, first select playing level (1=novice,
2=elementary, 3=medium, 4=good, 5=advanced, 6=expert; 3 is recommended for
normal playing). Then, you can select who will play the first move (you or
TI-92 Plus). When you is on the turn, enter coordinates of your move (for
example, if you want to put a piece on A6, just type "A6" then press ENTER).
If you made a mistake, press backspace key to delete an entry before pressing
ENTER. TI-92 Plus will check legality of the move, and you will be informed if
the move is not legal (in this case, you must enter a move again). Or, if you
have not any legal moves, you will be informed about it (so, you must pass a
move). When TI-92 Plus is on turn, after a bit of thinking, his move will be
displayed, and after a keypress, you will have a chance for a new move.
Response speed of TI-92 Plus depends of the selected level of the game:
immidiately on levels 1 and 2, 1-2 seconds per one move on level 3, 3-7
seconds on level 4, 5-20 seconds on level 5 and about 30-60 seconds (sometimes
even up to 2 minutes) per one move on level 6. When the game is over, the
calculator will display who is the winner. During the game, you can break the
game by pressing ESC key when you is on the turn. You can not break the game
while TI-92 Plus thinks about a his move.

Strategy
--------

The strategy which TI-92 Plus uses is just a simple recursive minmax search
with alpha pruning which tries to make an advance in the material during next
N moves (N depends of the selected level) as big as possible, assuming that
the opponent tries to do the same thing. This program is more the programing
excerise in TI-92 Plus C language than an attempt to become a world champion
in Reversi. However, it is not so easy to win in higher levels.

History
-------

V1.0 (21. XI 1999.)

- First released version (TI-89 only)

V1.1 (25. XI 1999.)

- Corrected one bug in alpha pruning which slowed down minmax search: level 5
  is now 3-5 times faster;
- Introduced level 6 (correcting slowdown bug allows level 6 on still
  acceptable waiting per one move);
- Levels are now named.
- Converted to TI-92 Plus too.

To do in the future
-------------------

- Improving the strategy further;
- Improving the speed in higher levels further;
- Introducing two-player mode (human against human, maybe using TI link cable
  between two calculators);
- Porting a chess program to TI-92 Plus (does anybody have a generic C source
  code portable as many as possible? If not, I will try to make a chess
  program by myself). But I don't know when I would have a time for this.

Contact
-------

If you have any suggestions, comments, questions (especially about TI-GCC
programming) or bug reports, please mail to me at:

zjuric@utic.net.ba

Zeljko Juric
Sarajevo
Bosnia and Herzegovina

