The reversi Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The reversi Reference Manual

This is the reversi Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:46:31 2022 GMT+0.

Table of Contents


1 Introduction

This is a Common Lisp implementation of the Reversi game.

The web site for this package is http://reversi.kpe.io which has
documentation for this package.

Reversi is based on the Othello(tm) game presented in Peter Norvig's
book "Paradigms of Artificial Intelligence Programming", chapter 18.
I highly suggest this book in general. If you wish to take full
advantage of this package, you should read the chapter referenced.

Quickstart
==========

First, you need to download and load ASDF -- the system definition loader.
It's home page is http://www.cliki.net/asdf. After downloading asdf.lisp, load it in your Lisp environment:
  (load "asdf.lisp")

Next, you need to load the Reversi ASDF definition file:
  (load "reversi.asd")

Next, load the Reversi program itself using ASDF:
  (asdf:operate 'asdf:load-op 'reversi)

If you are using AllegroCL, Lispworks, CMUCL, or SBCL with CLIM, you
can play Reversi with a graphical user interface using the command:
   (reversi:clim-reversi)

Otherwise, you can play in a text mode, such as:
   (reversi:reversi #'reversi:human (reversi:iago 1))


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 reversi

Source

reversi.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 reversi/reversi.asd

Source

reversi.asd.

Parent Component

reversi (system).

ASDF Systems

reversi.

Packages

reversi-system.


3.1.2 reversi/package.lisp

Source

reversi.asd.

Parent Component

reversi (system).

Packages

reversi.


3.1.3 reversi/utils.lisp

Dependency

package.lisp (file).

Source

reversi.asd.

Parent Component

reversi (system).

Internals

Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.4 reversi/base.lisp

Dependency

utils.lisp (file).

Source

reversi.asd.

Parent Component

reversi (system).

Public Interface
Internals

3.1.5 reversi/io.lisp

Dependency

base.lisp (file).

Source

reversi.asd.

Parent Component

reversi (system).

Public Interface

human (function).

Internals

3.1.6 reversi/edge-table.lisp

Dependency

io.lisp (file).

Source

reversi.asd.

Parent Component

reversi (system).

Internals

3.1.7 reversi/edge-table-storage.lisp

Dependency

edge-table.lisp (file).

Source

reversi.asd.

Parent Component

reversi (system).

Internals

3.1.8 reversi/strategies.lisp

Dependency

edge-table-storage.lisp (file).

Source

reversi.asd.

Parent Component

reversi (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 reversi

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

Previous: , Up: Packages   [Contents][Index]

4.2 reversi-system

Source

reversi.asd.

Use List
  • asdf/interface.
  • common-lisp.

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: alpha-beta-searcher (depth eval-fn)

A strategy that searches to DEPTH and then uses EVAL-FN.

Package

reversi.

Source

strategies.lisp.

Function: alpha-beta-searcher2 (depth eval-fn)

Return a strategy that does A-B search with sorted moves.

Package

reversi.

Source

strategies.lisp.

Function: alpha-beta-searcher3 (depth eval-fn)

Return a strategy that does A-B search with killer moves.

Package

reversi.

Source

strategies.lisp.

Function: count-difference (player board)

Count player’s pieces minus opponent’s pieces.

Package

reversi.

Source

base.lisp.

Function: human (player board)

A human player for the game of Reversi

Package

reversi.

Source

io.lisp.

Function: iago (depth)

Use an approximation of Iago’s evaluation function.

Package

reversi.

Source

strategies.lisp.

Function: modified-weighted-squares (player board)

Like WEIGHTED-SQUARES, but don’t take off for moving near an occupied corner.

Package

reversi.

Source

strategies.lisp.

Function: random-reversi-series (strategy1 strategy2 n-pairs &optional n-random)

Play a series of 2*n games, starting from a random position.

Package

reversi.

Source

base.lisp.

Function: reversi (bl-strategy wh-strategy &optional print minutes)
Package

reversi.

Source

base.lisp.

Function: reversi-series (strategy1 strategy2 n-pairs)

Play a series of 2*n-pairs games, swapping sides.

Package

reversi.

Source

base.lisp.

Function: round-robin (strategies n-pairs &optional n-random names)

Play a tournament among the strategies.
N-PAIRS = games each strategy plays as each color against each opponent. So with N strategies, a total of N*(N-1)*N-PAIRS games are played.

Package

reversi.

Source

base.lisp.

Function: text-reversi ()
Package

reversi.

Source

strategies.lisp.

Function: weighted-squares (player board)

Sum of the weights of player’s squares minus opponent’s.

Package

reversi.

Source

strategies.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Constants

Constant: +default-max-minutes+
Package

reversi.

Source

base.lisp.

Constant: black

A black piece

Package

reversi.

Source

base.lisp.

Constant: empty

An empty square

Package

reversi.

Source

base.lisp.

Constant: losing-value
Package

reversi.

Source

strategies.lisp.

Constant: outer

Marks squares outside the 8x8 board

Package

reversi.

Source

base.lisp.

Constant: white

A white piece

Package

reversi.

Source

base.lisp.

Constant: winning-value
Package

reversi.

Source

strategies.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.2 Special variables

Special Variable: *board*

A copy of the game board

Package

reversi.

Source

base.lisp.

Special Variable: *clock*

A copy of the game clock

Package

reversi.

Source

base.lisp.

Special Variable: *edge-and-x-lists*

The four edges (with their X-squares).

Package

reversi.

Source

edge-table.lisp.

Special Variable: *edge-table*

Array of values to player-to-move for edge positions.

Package

reversi.

Source

edge-table.lisp.

Special Variable: *et-path*
Package

reversi.

Source

edge-table-storage.lisp.

Special Variable: *move-number*

The number of the move to be played

Package

reversi.

Source

base.lisp.

Special Variable: *ply-boards*
Package

reversi.

Source

base.lisp.

Special Variable: *static-edge-table*
Package

reversi.

Source

edge-table.lisp.

Special Variable: *top-edge*
Package

reversi.

Source

edge-table.lisp.

Special Variable: *weights*
Package

reversi.

Source

strategies.lisp.

Special Variable: +all-directions+
Package

reversi.

Source

base.lisp.

Special Variable: all-squares

A list of all squares

Package

reversi.

Source

base.lisp.


5.2.3 Macros

Macro: aif (test then &optional else)
Package

reversi.

Source

utils.lisp.

Macro: awhen (test-form &body body)
Package

reversi.

Source

utils.lisp.

Macro: awhile (expr &body body)
Package

reversi.

Source

utils.lisp.

Macro: bref (board square)
Package

reversi.

Source

base.lisp.

Macro: missing-argument ()
Package

reversi.

Source

utils.lisp.

Macro: opponent (player)
Package

reversi.

Source

base.lisp.

Macro: until (test &body body)
Package

reversi.

Source

utils.lisp.

Macro: while (test &body body)
Package

reversi.

Source

utils.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.4 Ordinary functions

Function: 88->h8 (num)

Convert from numeric to alphanumeric square notation.

Package

reversi.

Source

io.lisp.

Function: ab3-df (ply)
Package

reversi.

Source

strategies.lisp.

Function: ab3-md-wt (ply)
Package

reversi.

Source

strategies.lisp.

Function: ab3-wt (ply)
Package

reversi.

Source

strategies.lisp.

Function: ab3w-df (ply)
Package

reversi.

Source

strategies.lisp.

Function: ab3w-md-wt (ply)
Package

reversi.

Source

strategies.lisp.

Function: ab3w-wt (ply)
Package

reversi.

Source

strategies.lisp.

Function: alpha-beta (player board achievable cutoff ply eval-fn)

Find the best move, for PLAYER, according to EVAL-FN, searching PLY levels deep and backing up values, using cutoffs whenever possible.

Package

reversi.

Source

strategies.lisp.

Function: alpha-beta-searcher3w (depth eval-fn)

Return a strategy that does A-B search with killer moves.

Package

reversi.

Source

strategies.lisp.

Function: alpha-beta2 (player node achievable cutoff ply eval-fn)

A-B search, sorting moves by eval-fn

Package

reversi.

Source

strategies.lisp.

Function: alpha-beta3 (player board achievable cutoff ply eval-fn killer)

A-B search, putting killer move first.

Package

reversi.

Source

strategies.lisp.

Function: alpha-beta3w (player board achievable cutoff ply eval-fn killer)

A-B search, putting killer move first.

Package

reversi.

Source

strategies.lisp.

Function: any-legal-move? (player board)

Does player have any legal moves in this position?

Package

reversi.

Source

base.lisp.

Function: combine-edge-moves (possibilities player)

Combine the best moves.

Package

reversi.

Source

edge-table.lisp.

Function: concat-symbol (&rest args)

Concatenate symbols or strings to form an interned symbol

Package

reversi.

Source

utils.lisp.

Function: copy-board (board)
Package

reversi.

Source

base.lisp.

Function: copy-node (instance)
Package

reversi.

Source

strategies.lisp.

Function: copy-state (instance)
Package

reversi.

Source

base.lisp.

Function: corner-for (xsq)
Package

reversi.

Source

edge-table.lisp.

Function: corner-p (sq)
Package

reversi.

Source

edge-table.lisp.

Function: count-edge-neighbors (player board square)

Count the neighbors of this square occupied by player.

Package

reversi.

Source

edge-table.lisp.

Function: cross-product (fn xlist ylist)

Return a list of all (fn x y) values.

Package

reversi.

Source

utils.lisp.

Function: edge-index (player board squares)

The index counts 1 for player; 2 for opponent, on each square—summed as a base 3 number.

Package

reversi.

Source

edge-table.lisp.

Function: edge-move-probability (player board square)

What’s the probability that player can move to this square?

Package

reversi.

Source

edge-table.lisp.

Function: edge-stability (player board)

Total edge evaluation for player to move on board.

Package

reversi.

Source

strategies.lisp.

Function: final-value (player board)

Is this a win, loss, or draw for player?

Package

reversi.

Source

strategies.lisp.

Function: final-value-weighted (player board)

Is this a win, loss, or draw for player?

Package

reversi.

Source

strategies.lisp.

Function: find-bracketing-piece (square player board dir)

Return the square number of the bracketing piece.

Package

reversi.

Source

base.lisp.

Function: get-move (game strategy player board print clock)

Call the player’s strategy function to get a move. Keep calling until a legal move is made.

Package

reversi.

Source

base.lisp.

Function: h8->88 (str)

Convert from alphanumeric to numeric square notation.

Package

reversi.

Source

io.lisp.

Function: iago-eval (player board)

Combine edge-stability, current mobility and potential mobility to arrive at an evaluation.

Package

reversi.

Source

strategies.lisp.

Function: init-edge-table ()

Initialize *edge-table*, starting from the empty board.

Package

reversi.

Source

edge-table.lisp.

Function: initial-board ()

Return a board, empty except for four pieces in the middle.

Package

reversi.

Source

base.lisp.

Returns a list of legal moves for player

Package

reversi.

Source

base.lisp.

Return a list of legal moves, each one packed into a node.

Package

reversi.

Source

strategies.lisp.

A Legal move must be into an empty square, and it must flip at least one opponent piece.

Package

reversi.

Source

base.lisp.

Function: list-to-delimited-string (list &optional separator)
Package

reversi.

Source

utils.lisp.

Function: load-edge-table (&optional path)
Package

reversi.

Source

edge-table-storage.lisp.

Function: make-edge-table ()
Package

reversi.

Source

edge-table.lisp.

Function: make-flips (move player board dir)

Make any flips in the given direction.

Package

reversi.

Source

base.lisp.

Function: make-game (bl-strategy wh-strategy &key print minutes record-game)
Package

reversi.

Source

base.lisp.

Function: make-game-move (game move player)
Package

reversi.

Source

base.lisp.

Function: make-move (move player board)

Update board to reflect move by player

Package

reversi.

Source

base.lisp.

Function: make-moves ()
Package

reversi.

Source

base.lisp.

Function: make-node (&key square board value)
Package

reversi.

Source

strategies.lisp.

Function: make-state (move player clock board)
Package

reversi.

Source

base.lisp.

Function: make-state-struct (&key move player board clock)
Package

reversi.

Source

base.lisp.

Function: map-edge-n-pieces (fn player board n squares index)

Call fn on all edges with n pieces.

Package

reversi.

Source

edge-table.lisp.

Function: mappend (fn list)

Append the results of calling fn on each element of list. Like mapcon, but uses append instead of nconc.

Package

reversi.

Source

utils.lisp.

Function: maximize-difference (player board)

A strategy that maximizes the difference in pieces.

Package

reversi.

Source

strategies.lisp.

Function: maximizer (eval-fn)

Return a strategy that will consider every legal move, apply EVAL-FN to each resulting board, and choose the move for which EVAL-FN returns the best score. FN takes two arguments: the player-to-move and board

Package

reversi.

Source

strategies.lisp.

Function: minimax (player board ply eval-fn)

Find the best move, for PLAYER, according to EVAL-FN, searching PLY levels deep and backing up values.

Package

reversi.

Source

strategies.lisp.

Function: minimax-searcher (ply eval-fn)

A strategy that searches PLY levels and then uses EVAL-FN.

Package

reversi.

Source

strategies.lisp.

Function: mm-df (ply)
Package

reversi.

Source

strategies.lisp.

Function: mm-md-wt (ply)
Package

reversi.

Source

strategies.lisp.

Function: mm-wt (ply)
Package

reversi.

Source

strategies.lisp.

Function: mobility (player board)

Current Mobility is the number of legal moves. Potential mobility is the number of blank squares adjacent to an opponent that are not legal moves. Returns current and potential mobility for player.

Package

reversi.

Source

strategies.lisp.

Function: mobility-simple (player board)

The number of moves a player has.

Package

reversi.

Source

strategies.lisp.

Function: moves-to-string (moves)
Package

reversi.

Source

io.lisp.

Function: mx-df ()
Package

reversi.

Source

strategies.lisp.

Function: mx-md-wt ()
Package

reversi.

Source

strategies.lisp.

Function: mx-wt ()
Package

reversi.

Source

strategies.lisp.

Function: name-of (piece)
Package

reversi.

Source

base.lisp.

Function: negate-value (node)

Set the value of a node to its negative.

Package

reversi.

Source

strategies.lisp.

Function: neighbors (square)

Return a list of all squares adjacent to a square.

Package

reversi.

Source

strategies.lisp.

Function: next-to-play (board previous-player &optional print)

Compute the player to move next, or NIL if nobody can move.

Package

reversi.

Source

base.lisp.

Reader: node-board (instance)
Writer: (setf node-board) (instance)
Package

reversi.

Source

strategies.lisp.

Target Slot

board.

Function: node-p (object)
Package

reversi.

Source

strategies.lisp.

Reader: node-square (instance)
Writer: (setf node-square) (instance)
Package

reversi.

Source

strategies.lisp.

Target Slot

square.

Reader: node-value (instance)
Writer: (setf node-value) (instance)
Package

reversi.

Source

strategies.lisp.

Target Slot

value.

Function: piece-stability (board sq)
Package

reversi.

Source

edge-table.lisp.

Function: play-game (game)
Package

reversi.

Source

base.lisp.

Function: possible-edge-move (player board sq)

Return a (prob val) pair for a possible edge move.

Package

reversi.

Source

edge-table.lisp.

Function: possible-edge-moves-value (player board index)

Consider all possible edge moves. Combine their values into a single number.

Package

reversi.

Source

edge-table.lisp.

Function: print-board (&optional board clock)

Print a board, along with some statistics.

Package

reversi.

Source

io.lisp.

Function: put-first (killer moves)

Move the killer move to the front of moves, if the killer move is in fact a legal move.

Package

reversi.

Source

strategies.lisp.

Function: random-nth (list)

Pick a random element out of a list.

Package

reversi.

Source

utils.lisp.

Function: random-strategy (player board)

Make any legal move.

Package

reversi.

Source

strategies.lisp.

Function: replace-board (to from)
Package

reversi.

Source

base.lisp.

Function: reset-game (game &optional move-number)
Package

reversi.

Source

base.lisp.

Function: rr (ply n-pairs)
Package

reversi.

Source

strategies.lisp.

Function: some-neighbors (board opp neighbors)
Package

reversi.

Source

strategies.lisp.

Reader: state-board (instance)
Writer: (setf state-board) (instance)
Package

reversi.

Source

base.lisp.

Target Slot

board.

Reader: state-clock (instance)
Writer: (setf state-clock) (instance)
Package

reversi.

Source

base.lisp.

Target Slot

clock.

Reader: state-move (instance)
Writer: (setf state-move) (instance)
Package

reversi.

Source

base.lisp.

Target Slot

move.

Function: state-p (object)
Package

reversi.

Source

base.lisp.

Reader: state-player (instance)
Writer: (setf state-player) (instance)
Package

reversi.

Source

base.lisp.

Target Slot

player.

Function: static-edge-stability (player board)

Compute this edge’s static stability

Package

reversi.

Source

edge-table.lisp.

Function: store-edge-table (et &optional path)
Package

reversi.

Source

edge-table-storage.lisp.

Function: switch-strategies (strategy1 m strategy2)

Make a new strategy that plays strategy1 for m moves, then plays according to strategy2.

Package

reversi.

Source

base.lisp.

Function: time-string (time)

Return a string representing this internal time in min:secs.

Package

reversi.

Source

io.lisp.

Function: title-of (piece)
Package

reversi.

Source

base.lisp.

Function: valid-p (move)

Valid moves are numbers in the range 11-88 that end in 1-8.

Package

reversi.

Source

base.lisp.

Function: would-flip? (move player board dir)

Would this move result in any flips in this direction? If so, return the square number of the bracketing piece.

Package

reversi.

Source

base.lisp.

Function: x-square-for (corner)
Package

reversi.

Source

edge-table.lisp.

Function: x-square-p (sq)
Package

reversi.

Source

edge-table.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.5 Generic functions

Generic Reader: bl-strategy (object)
Package

reversi.

Methods
Reader Method: bl-strategy ((reversi-game reversi-game))

Strategy function for black

Source

base.lisp.

Target Slot

bl-strategy.

Generic Reader: board (object)
Package

reversi.

Methods
Reader Method: board ((reversi-game reversi-game))

The board configuration

Source

base.lisp.

Target Slot

board.

Generic Reader: clock (object)
Generic Writer: (setf clock) (object)
Package

reversi.

Methods
Reader Method: clock ((reversi-game reversi-game))
Writer Method: (setf clock) ((reversi-game reversi-game))

An array of time-units left

Source

base.lisp.

Target Slot

clock.

Generic Reader: final-result (object)
Generic Writer: (setf final-result) (object)
Package

reversi.

Methods
Reader Method: final-result ((reversi-game reversi-game))
Writer Method: (setf final-result) ((reversi-game reversi-game))

Final count, is NIL while game in play

Source

base.lisp.

Target Slot

final-result.

Generic Function: make-clock (clock)
Package

reversi.

Source

base.lisp.

Methods
Method: make-clock ((minutes integer))
Method: make-clock ((clock array))
Generic Reader: max-minutes (object)
Package

reversi.

Methods
Reader Method: max-minutes ((reversi-game reversi-game))

Maximum minites for each player

Source

base.lisp.

Target Slot

max-minutes.

Generic Reader: move-number (object)
Generic Writer: (setf move-number) (object)
Package

reversi.

Methods
Reader Method: move-number ((reversi-game reversi-game))
Writer Method: (setf move-number) ((reversi-game reversi-game))

The number of the move to be played

Source

base.lisp.

Target Slot

move-number.

Generic Reader: moves (object)
Generic Writer: (setf moves) (object)
Package

reversi.

Methods
Reader Method: moves ((reversi-game reversi-game))
Writer Method: (setf moves) ((reversi-game reversi-game))

An array of moves played in the game

Source

base.lisp.

Target Slot

moves.

Generic Reader: player (object)
Generic Writer: (setf player) (object)
Package

reversi.

Methods
Reader Method: player ((reversi-game reversi-game))
Writer Method: (setf player) ((reversi-game reversi-game))

ID of next player to move

Source

base.lisp.

Target Slot

player.

Generic Reader: print? (object)
Package

reversi.

Methods
Reader Method: print? ((reversi-game reversi-game))

Whether to print progress of this game

Source

base.lisp.

Target Slot

print?.

Generic Reader: record-game? (object)
Package

reversi.

Methods
Reader Method: record-game? ((reversi-game reversi-game))

Whether to record moves and clcck of this game

Source

base.lisp.

Target Slot

record-game?.

Generic Reader: wh-strategy (object)
Package

reversi.

Methods
Reader Method: wh-strategy ((reversi-game reversi-game))

Strategy function for white

Source

base.lisp.

Target Slot

wh-strategy.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.6 Structures

Structure: node
Package

reversi.

Source

strategies.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: square
Type

reversi::square

Initform

(reversi::missing-argument)

Readers

node-square.

Writers

(setf node-square).

Slot: board
Type

reversi::board

Initform

(reversi::missing-argument)

Readers

node-board.

Writers

(setf node-board).

Slot: value
Type

integer

Initform

(reversi::missing-argument)

Readers

node-value.

Writers

(setf node-value).

Structure: state
Package

reversi.

Source

base.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: move
Readers

state-move.

Writers

(setf state-move).

Slot: player
Readers

state-player.

Writers

(setf state-player).

Slot: board
Readers

state-board.

Writers

(setf state-board).

Slot: clock
Readers

state-clock.

Writers

(setf state-clock).


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.7 Classes

Class: reversi-game
Package

reversi.

Source

base.lisp.

Direct methods
Direct Default Initargs
InitargValue
:bl-strategynil
:wh-strategynil
:board(initial-board)
:move-number1
:playerblack
:moves(make-moves)
:print?nil
:record-game?nil
:final-resultnil
:max-minutes+default-max-minutes+
:clock(make-clock +default-max-minutes+)
Direct slots
Slot: bl-strategy

Strategy function for black

Initargs

:bl-strategy

Readers

bl-strategy.

Writers

This slot is read-only.

Slot: wh-strategy

Strategy function for white

Initargs

:wh-strategy

Readers

wh-strategy.

Writers

This slot is read-only.

Slot: board

The board configuration

Type

reversi::board

Initargs

:board

Readers

board.

Writers

This slot is read-only.

Slot: move-number

The number of the move to be played

Type

fixnum

Initargs

:move-number

Readers

move-number.

Writers

(setf move-number).

Slot: player

ID of next player to move

Type

reversi::player

Initargs

:player

Readers

player.

Writers

(setf player).

Slot: moves

An array of moves played in the game

Type

reversi::moves

Initargs

:moves

Readers

moves.

Writers

(setf moves).

Slot: print?

Whether to print progress of this game

Type

boolean

Initargs

:print?

Readers

print?.

Writers

This slot is read-only.

Slot: record-game?

Whether to record moves and clcck of this game

Type

boolean

Initargs

:record-game?

Readers

record-game?.

Writers

This slot is read-only.

Slot: final-result

Final count, is NIL while game in play

Type

(or null fixnum)

Initargs

:final-result

Readers

final-result.

Writers

(setf final-result).

Slot: max-minutes

Maximum minites for each player

Type

fixnum

Initargs

:max-minutes

Readers

max-minutes.

Writers

This slot is read-only.

Slot: clock

An array of time-units left

Type

reversi::clock

Initargs

:clock

Readers

clock.

Writers

(setf clock).


Previous: , Up: Internals   [Contents][Index]

5.2.8 Types

Type: board ()
Package

reversi.

Source

base.lisp.

Type: clock ()
Package

reversi.

Source

base.lisp.

Type: dir ()
Package

reversi.

Source

base.lisp.

Type: edge-table ()
Package

reversi.

Source

edge-table.lisp.

Type: move ()
Package

reversi.

Source

base.lisp.

Type: moves ()
Package

reversi.

Source

base.lisp.

Type: piece ()
Package

reversi.

Source

base.lisp.

Type: player ()
Package

reversi.

Source

base.lisp.

Type: square ()
Package

reversi.

Source

base.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (   8  
A   B   C   E   F   G   H   I   L   M   N   O   P   R   S   T   U   V   W   X  
Index Entry  Section

(
(setf clock): Private generic functions
(setf clock): Private generic functions
(setf final-result): Private generic functions
(setf final-result): Private generic functions
(setf move-number): Private generic functions
(setf move-number): Private generic functions
(setf moves): Private generic functions
(setf moves): Private generic functions
(setf node-board): Private ordinary functions
(setf node-square): Private ordinary functions
(setf node-value): Private ordinary functions
(setf player): Private generic functions
(setf player): Private generic functions
(setf state-board): Private ordinary functions
(setf state-clock): Private ordinary functions
(setf state-move): Private ordinary functions
(setf state-player): Private ordinary functions

8
88->h8: Private ordinary functions

A
ab3-df: Private ordinary functions
ab3-md-wt: Private ordinary functions
ab3-wt: Private ordinary functions
ab3w-df: Private ordinary functions
ab3w-md-wt: Private ordinary functions
ab3w-wt: Private ordinary functions
aif: Private macros
alpha-beta: Private ordinary functions
alpha-beta-searcher: Public ordinary functions
alpha-beta-searcher2: Public ordinary functions
alpha-beta-searcher3: Public ordinary functions
alpha-beta-searcher3w: Private ordinary functions
alpha-beta2: Private ordinary functions
alpha-beta3: Private ordinary functions
alpha-beta3w: Private ordinary functions
any-legal-move?: Private ordinary functions
awhen: Private macros
awhile: Private macros

B
bl-strategy: Private generic functions
bl-strategy: Private generic functions
board: Private generic functions
board: Private generic functions
bref: Private macros

C
clock: Private generic functions
clock: Private generic functions
combine-edge-moves: Private ordinary functions
concat-symbol: Private ordinary functions
copy-board: Private ordinary functions
copy-node: Private ordinary functions
copy-state: Private ordinary functions
corner-for: Private ordinary functions
corner-p: Private ordinary functions
count-difference: Public ordinary functions
count-edge-neighbors: Private ordinary functions
cross-product: Private ordinary functions

E
edge-index: Private ordinary functions
edge-move-probability: Private ordinary functions
edge-stability: Private ordinary functions

F
final-result: Private generic functions
final-result: Private generic functions
final-value: Private ordinary functions
final-value-weighted: Private ordinary functions
find-bracketing-piece: Private ordinary functions
Function, (setf node-board): Private ordinary functions
Function, (setf node-square): Private ordinary functions
Function, (setf node-value): Private ordinary functions
Function, (setf state-board): Private ordinary functions
Function, (setf state-clock): Private ordinary functions
Function, (setf state-move): Private ordinary functions
Function, (setf state-player): Private ordinary functions
Function, 88->h8: Private ordinary functions
Function, ab3-df: Private ordinary functions
Function, ab3-md-wt: Private ordinary functions
Function, ab3-wt: Private ordinary functions
Function, ab3w-df: Private ordinary functions
Function, ab3w-md-wt: Private ordinary functions
Function, ab3w-wt: Private ordinary functions
Function, alpha-beta: Private ordinary functions
Function, alpha-beta-searcher: Public ordinary functions
Function, alpha-beta-searcher2: Public ordinary functions
Function, alpha-beta-searcher3: Public ordinary functions
Function, alpha-beta-searcher3w: Private ordinary functions
Function, alpha-beta2: Private ordinary functions
Function, alpha-beta3: Private ordinary functions
Function, alpha-beta3w: Private ordinary functions
Function, any-legal-move?: Private ordinary functions
Function, combine-edge-moves: Private ordinary functions
Function, concat-symbol: Private ordinary functions
Function, copy-board: Private ordinary functions
Function, copy-node: Private ordinary functions
Function, copy-state: Private ordinary functions
Function, corner-for: Private ordinary functions
Function, corner-p: Private ordinary functions
Function, count-difference: Public ordinary functions
Function, count-edge-neighbors: Private ordinary functions
Function, cross-product: Private ordinary functions
Function, edge-index: Private ordinary functions
Function, edge-move-probability: Private ordinary functions
Function, edge-stability: Private ordinary functions
Function, final-value: Private ordinary functions
Function, final-value-weighted: Private ordinary functions
Function, find-bracketing-piece: Private ordinary functions
Function, get-move: Private ordinary functions
Function, h8->88: Private ordinary functions
Function, human: Public ordinary functions
Function, iago: Public ordinary functions
Function, iago-eval: Private ordinary functions
Function, init-edge-table: Private ordinary functions
Function, initial-board: Private ordinary functions
Function, legal-moves: Private ordinary functions
Function, legal-nodes: Private ordinary functions
Function, legal-p: Private ordinary functions
Function, list-to-delimited-string: Private ordinary functions
Function, load-edge-table: Private ordinary functions
Function, make-edge-table: Private ordinary functions
Function, make-flips: Private ordinary functions
Function, make-game: Private ordinary functions
Function, make-game-move: Private ordinary functions
Function, make-move: Private ordinary functions
Function, make-moves: Private ordinary functions
Function, make-node: Private ordinary functions
Function, make-state: Private ordinary functions
Function, make-state-struct: Private ordinary functions
Function, map-edge-n-pieces: Private ordinary functions
Function, mappend: Private ordinary functions
Function, maximize-difference: Private ordinary functions
Function, maximizer: Private ordinary functions
Function, minimax: Private ordinary functions
Function, minimax-searcher: Private ordinary functions
Function, mm-df: Private ordinary functions
Function, mm-md-wt: Private ordinary functions
Function, mm-wt: Private ordinary functions
Function, mobility: Private ordinary functions
Function, mobility-simple: Private ordinary functions
Function, modified-weighted-squares: Public ordinary functions
Function, moves-to-string: Private ordinary functions
Function, mx-df: Private ordinary functions
Function, mx-md-wt: Private ordinary functions
Function, mx-wt: Private ordinary functions
Function, name-of: Private ordinary functions
Function, negate-value: Private ordinary functions
Function, neighbors: Private ordinary functions
Function, next-to-play: Private ordinary functions
Function, node-board: Private ordinary functions
Function, node-p: Private ordinary functions
Function, node-square: Private ordinary functions
Function, node-value: Private ordinary functions
Function, piece-stability: Private ordinary functions
Function, play-game: Private ordinary functions
Function, possible-edge-move: Private ordinary functions
Function, possible-edge-moves-value: Private ordinary functions
Function, print-board: Private ordinary functions
Function, put-first: Private ordinary functions
Function, random-nth: Private ordinary functions
Function, random-reversi-series: Public ordinary functions
Function, random-strategy: Private ordinary functions
Function, replace-board: Private ordinary functions
Function, reset-game: Private ordinary functions
Function, reversi: Public ordinary functions
Function, reversi-series: Public ordinary functions
Function, round-robin: Public ordinary functions
Function, rr: Private ordinary functions
Function, some-neighbors: Private ordinary functions
Function, state-board: Private ordinary functions
Function, state-clock: Private ordinary functions
Function, state-move: Private ordinary functions
Function, state-p: Private ordinary functions
Function, state-player: Private ordinary functions
Function, static-edge-stability: Private ordinary functions
Function, store-edge-table: Private ordinary functions
Function, switch-strategies: Private ordinary functions
Function, text-reversi: Public ordinary functions
Function, time-string: Private ordinary functions
Function, title-of: Private ordinary functions
Function, valid-p: Private ordinary functions
Function, weighted-squares: Public ordinary functions
Function, would-flip?: Private ordinary functions
Function, x-square-for: Private ordinary functions
Function, x-square-p: Private ordinary functions

G
Generic Function, (setf clock): Private generic functions
Generic Function, (setf final-result): Private generic functions
Generic Function, (setf move-number): Private generic functions
Generic Function, (setf moves): Private generic functions
Generic Function, (setf player): Private generic functions
Generic Function, bl-strategy: Private generic functions
Generic Function, board: Private generic functions
Generic Function, clock: Private generic functions
Generic Function, final-result: Private generic functions
Generic Function, make-clock: Private generic functions
Generic Function, max-minutes: Private generic functions
Generic Function, move-number: Private generic functions
Generic Function, moves: Private generic functions
Generic Function, player: Private generic functions
Generic Function, print?: Private generic functions
Generic Function, record-game?: Private generic functions
Generic Function, wh-strategy: Private generic functions
get-move: Private ordinary functions

H
h8->88: Private ordinary functions
human: Public ordinary functions

I
iago: Public ordinary functions
iago-eval: Private ordinary functions
init-edge-table: Private ordinary functions
initial-board: Private ordinary functions

L
legal-moves: Private ordinary functions
legal-nodes: Private ordinary functions
legal-p: Private ordinary functions
list-to-delimited-string: Private ordinary functions
load-edge-table: Private ordinary functions

M
Macro, aif: Private macros
Macro, awhen: Private macros
Macro, awhile: Private macros
Macro, bref: Private macros
Macro, missing-argument: Private macros
Macro, opponent: Private macros
Macro, until: Private macros
Macro, while: Private macros
make-clock: Private generic functions
make-clock: Private generic functions
make-clock: Private generic functions
make-edge-table: Private ordinary functions
make-flips: Private ordinary functions
make-game: Private ordinary functions
make-game-move: Private ordinary functions
make-move: Private ordinary functions
make-moves: Private ordinary functions
make-node: Private ordinary functions
make-state: Private ordinary functions
make-state-struct: Private ordinary functions
map-edge-n-pieces: Private ordinary functions
mappend: Private ordinary functions
max-minutes: Private generic functions
max-minutes: Private generic functions
maximize-difference: Private ordinary functions
maximizer: Private ordinary functions
Method, (setf clock): Private generic functions
Method, (setf final-result): Private generic functions
Method, (setf move-number): Private generic functions
Method, (setf moves): Private generic functions
Method, (setf player): Private generic functions
Method, bl-strategy: Private generic functions
Method, board: Private generic functions
Method, clock: Private generic functions
Method, final-result: Private generic functions
Method, make-clock: Private generic functions
Method, make-clock: Private generic functions
Method, max-minutes: Private generic functions
Method, move-number: Private generic functions
Method, moves: Private generic functions
Method, player: Private generic functions
Method, print?: Private generic functions
Method, record-game?: Private generic functions
Method, wh-strategy: Private generic functions
minimax: Private ordinary functions
minimax-searcher: Private ordinary functions
missing-argument: Private macros
mm-df: Private ordinary functions
mm-md-wt: Private ordinary functions
mm-wt: Private ordinary functions
mobility: Private ordinary functions
mobility-simple: Private ordinary functions
modified-weighted-squares: Public ordinary functions
move-number: Private generic functions
move-number: Private generic functions
moves: Private generic functions
moves: Private generic functions
moves-to-string: Private ordinary functions
mx-df: Private ordinary functions
mx-md-wt: Private ordinary functions
mx-wt: Private ordinary functions

N
name-of: Private ordinary functions
negate-value: Private ordinary functions
neighbors: Private ordinary functions
next-to-play: Private ordinary functions
node-board: Private ordinary functions
node-p: Private ordinary functions
node-square: Private ordinary functions
node-value: Private ordinary functions

O
opponent: Private macros

P
piece-stability: Private ordinary functions
play-game: Private ordinary functions
player: Private generic functions
player: Private generic functions
possible-edge-move: Private ordinary functions
possible-edge-moves-value: Private ordinary functions
print-board: Private ordinary functions
print?: Private generic functions
print?: Private generic functions
put-first: Private ordinary functions

R
random-nth: Private ordinary functions
random-reversi-series: Public ordinary functions
random-strategy: Private ordinary functions
record-game?: Private generic functions
record-game?: Private generic functions
replace-board: Private ordinary functions
reset-game: Private ordinary functions
reversi: Public ordinary functions
reversi-series: Public ordinary functions
round-robin: Public ordinary functions
rr: Private ordinary functions

S
some-neighbors: Private ordinary functions
state-board: Private ordinary functions
state-clock: Private ordinary functions
state-move: Private ordinary functions
state-p: Private ordinary functions
state-player: Private ordinary functions
static-edge-stability: Private ordinary functions
store-edge-table: Private ordinary functions
switch-strategies: Private ordinary functions

T
text-reversi: Public ordinary functions
time-string: Private ordinary functions
title-of: Private ordinary functions

U
until: Private macros

V
valid-p: Private ordinary functions

W
weighted-squares: Public ordinary functions
wh-strategy: Private generic functions
wh-strategy: Private generic functions
while: Private macros
would-flip?: Private ordinary functions

X
x-square-for: Private ordinary functions
x-square-p: Private ordinary functions

Jump to:   (   8  
A   B   C   E   F   G   H   I   L   M   N   O   P   R   S   T   U   V   W   X  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
A   B   C   E   F   L   M   O   P   R   S   V   W  
Index Entry  Section

*
*board*: Private special variables
*clock*: Private special variables
*edge-and-x-lists*: Private special variables
*edge-table*: Private special variables
*et-path*: Private special variables
*move-number*: Private special variables
*ply-boards*: Private special variables
*static-edge-table*: Private special variables
*top-edge*: Private special variables
*weights*: Private special variables

+
+all-directions+: Private special variables
+default-max-minutes+: Private constants

A
all-squares: Private special variables

B
bl-strategy: Private classes
black: Private constants
board: Private structures
board: Private structures
board: Private classes

C
clock: Private structures
clock: Private classes
Constant, +default-max-minutes+: Private constants
Constant, black: Private constants
Constant, empty: Private constants
Constant, losing-value: Private constants
Constant, outer: Private constants
Constant, white: Private constants
Constant, winning-value: Private constants

E
empty: Private constants

F
final-result: Private classes

L
losing-value: Private constants

M
max-minutes: Private classes
move: Private structures
move-number: Private classes
moves: Private classes

O
outer: Private constants

P
player: Private structures
player: Private classes
print?: Private classes

R
record-game?: Private classes

S
Slot, bl-strategy: Private classes
Slot, board: Private structures
Slot, board: Private structures
Slot, board: Private classes
Slot, clock: Private structures
Slot, clock: Private classes
Slot, final-result: Private classes
Slot, max-minutes: Private classes
Slot, move: Private structures
Slot, move-number: Private classes
Slot, moves: Private classes
Slot, player: Private structures
Slot, player: Private classes
Slot, print?: Private classes
Slot, record-game?: Private classes
Slot, square: Private structures
Slot, value: Private structures
Slot, wh-strategy: Private classes
Special Variable, *board*: Private special variables
Special Variable, *clock*: Private special variables
Special Variable, *edge-and-x-lists*: Private special variables
Special Variable, *edge-table*: Private special variables
Special Variable, *et-path*: Private special variables
Special Variable, *move-number*: Private special variables
Special Variable, *ply-boards*: Private special variables
Special Variable, *static-edge-table*: Private special variables
Special Variable, *top-edge*: Private special variables
Special Variable, *weights*: Private special variables
Special Variable, +all-directions+: Private special variables
Special Variable, all-squares: Private special variables
square: Private structures

V
value: Private structures

W
wh-strategy: Private classes
white: Private constants
winning-value: Private constants

Jump to:   *   +  
A   B   C   E   F   L   M   O   P   R   S   V   W  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   D   E   F   I   M   N   P   R   S   T   U  
Index Entry  Section

B
base.lisp: The reversi/base․lisp file
board: Private types

C
Class, reversi-game: Private classes
clock: Private types

D
dir: Private types

E
edge-table: Private types
edge-table-storage.lisp: The reversi/edge-table-storage․lisp file
edge-table.lisp: The reversi/edge-table․lisp file

F
File, base.lisp: The reversi/base․lisp file
File, edge-table-storage.lisp: The reversi/edge-table-storage․lisp file
File, edge-table.lisp: The reversi/edge-table․lisp file
File, io.lisp: The reversi/io․lisp file
File, package.lisp: The reversi/package․lisp file
File, reversi.asd: The reversi/reversi․asd file
File, strategies.lisp: The reversi/strategies․lisp file
File, utils.lisp: The reversi/utils․lisp file

I
io.lisp: The reversi/io․lisp file

M
move: Private types
moves: Private types

N
node: Private structures

P
Package, reversi: The reversi package
Package, reversi-system: The reversi-system package
package.lisp: The reversi/package․lisp file
piece: Private types
player: Private types

R
reversi: The reversi system
reversi: The reversi package
reversi-game: Private classes
reversi-system: The reversi-system package
reversi.asd: The reversi/reversi․asd file

S
square: Private types
state: Private structures
strategies.lisp: The reversi/strategies․lisp file
Structure, node: Private structures
Structure, state: Private structures
System, reversi: The reversi system

T
Type, board: Private types
Type, clock: Private types
Type, dir: Private types
Type, edge-table: Private types
Type, move: Private types
Type, moves: Private types
Type, piece: Private types
Type, player: Private types
Type, square: Private types

U
utils.lisp: The reversi/utils․lisp file

Jump to:   B   C   D   E   F   I   M   N   P   R   S   T   U