home *** CD-ROM | disk | FTP | other *** search
- 11 April 1989
- Release Notes
-
- Othello game-playing program, as described in
- The C Users Journal,
- Vol. 7, Number 3 (April 1989)
- pp. 89-96
-
- Authors:
- Gary Culp, Jonathan Ward
- EmTech, Inc.
- 1418 Upfield, Suite 117
- Carrollton, TX 75006
-
- =====================================================================
- Files:
-
- L.BAT batch file created because Jon is too lazy to type
- BDTTY.C display routines
- BD_EVAL.C board scoring
- BLDFA.C separate utility that builds table in FATABL.C
- BUILDLVL.C build the move tree a level deeper
- DUMPTREE.C debugging functions
- FATABL.C full-axis bits table (data)
- GETMOV.C gets the human's move
- HEADER.C junk
- MINIMAX.C minimax search of move tree
- MOVEIT.C verify & execute move (human's or computer's move)
- MOVE_GEN.C move generator (finds 1 possible move)
- OTHDBM.C database management routines
- OTHELLO.C main
- PIECE_CT.C count pieces of a given type / check each player's ability to move
- PROTECT.C determines what pieces are permanent
- TESTDBM.C dummy caller for testing database manager
- TESTDISP.C dummy caller for testing display routines
- BLDFA.EXE executable of BLDFA.C
- OTHELLO.EXE executable game program
- OTHELLO.H header file with #defines, prototypes, typedefs, etc.
- OTHELLO.LNK linker response file for Microsoft LINK
- OTHELLO.MAK makefile for Microsoft MAKE
-
- =====================================================================
- Known bugs:
-
- If the human player has just moved, and the game is now over, the
- computer may not immediately recognize that the game is over.
- Instead, it will say that it is unable to move and ask the player to
- press a key; THEN it will recognize that the game is over.
-
- =====================================================================
- Enhancements:
- The rest of this document lists some of the improvements and
- variations we have considered for our Othello program, but not
- implemented.
-
-
- [] Pruning
-
- The current version of the program considers every possible sequence
- of moves to a particular depth. Alpha-beta pruning would reduce the
- number of boards that have to be scored, while still giving the same
- result. The program would either be faster or could look ahead
- deeper (or both).
-
- To implement alpha-beta pruning would require considerable changes to
- the database and tree-build sections of the program.
-
-
- [] Improvements to tree-build
-
- The portion of the program that builds a level of the move tree is
- more complicated than it needs to be. It should have been written as
- a recursive function.
-
-
- [] Different board scoring methods
-
- Originally, the score for a board was based mostly on the number of
- permanent pieces of each color. The number of non-permanent pieces
- of each color also had a small influence on the score.
-
- The current version of the program uses the same scoring scheme with
- a slight modification to discourage the computer from playing
- adjacent to an empty corner. Playing adjacent to an empty corner is
- dangerous because, later in the game, it may provide the opponent a
- bridge to the corner.
-
- Scoring boards according to the number of permanent pieces is a good
- technique for the middle of the game; but determining whether pieces
- are permanent is computationally expensive. For the first few moves
- and the last few moves in the game, this effort is wastful.
-
- In the early moves of the game, there are no permanent pieces, so
- there is no reason to look for them. We can't make up our minds how
- boards should be scored in the early moves of the game. The schemes
- we have considered involve assigning a weight to each square on the
- board which indicates how desirable it is to occupy that square. One
- program we know of (written by Bart "Flatfingers" Stewart) tries to
- play in the 12 squares adjacent to the 4 central squares. (Remember,
- the 4 central squares are occupied at the beginning of the game.) The
- idea is to avoid playing adjacent to the outer edge, which would give
- the opponent a bridge to the outer edge.
-
- In the last few moves of the game, it is practical to look ahead all
- the way to the end of the game, so just counting the number of pieces
- of each color is the most sensible way to score the boards
-
-
- [] Display routines
-
- The display routines in the current version make very few assumptions
- about the display hardware. A much prettier display, with graphics
- and colors, could be written. Also, mouse support could be added to
- the program.
-
-
- [] .EXE size reduction
-
- The limb_array in OTHDBM.C is allocated at compile time and make the
- .EXE file very big. If limb_array were allocated at run time (with
- _fmalloc or some such function), the .EXE file would be a lot
- smaller. The EXEPACK utility that comes with the Microsoft C
- compiler will also reduce the file size by about the same amount,
- with no changes to the source code.
-