This is the reversi Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:36:23 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
reversi
package.lisp
(file).
utils.lisp
(file).
base.lisp
(file).
io.lisp
(file).
edge-table.lisp
(file).
edge-table-storage.lisp
(file).
strategies.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
reversi/reversi.asd
reversi/package.lisp
reversi/utils.lisp
reversi/base.lisp
reversi/io.lisp
reversi/edge-table.lisp
reversi/edge-table-storage.lisp
reversi/strategies.lisp
reversi/utils.lisp
package.lisp
(file).
reversi
(system).
aif
(macro).
awhen
(macro).
awhile
(macro).
concat-symbol
(function).
cross-product
(function).
list-to-delimited-string
(function).
mappend
(function).
missing-argument
(macro).
random-nth
(function).
until
(macro).
while
(macro).
reversi/base.lisp
utils.lisp
(file).
reversi
(system).
count-difference
(function).
random-reversi-series
(function).
reversi
(function).
reversi-series
(function).
round-robin
(function).
*board*
(special variable).
*clock*
(special variable).
*move-number*
(special variable).
*ply-boards*
(special variable).
+all-directions+
(special variable).
+default-max-minutes+
(constant).
all-squares
(special variable).
any-legal-move?
(function).
bl-strategy
(reader method).
black
(constant).
board
(reader method).
board
(type).
bref
(macro).
clock
(reader method).
(setf clock)
(writer method).
clock
(type).
copy-board
(function).
copy-state
(function).
dir
(type).
empty
(constant).
final-result
(reader method).
(setf final-result)
(writer method).
find-bracketing-piece
(function).
get-move
(function).
initial-board
(function).
legal-moves
(function).
legal-p
(function).
make-clock
(generic function).
make-flips
(function).
make-game
(function).
make-game-move
(function).
make-move
(function).
make-moves
(function).
make-state
(function).
make-state-struct
(function).
max-minutes
(reader method).
move
(type).
move-number
(reader method).
(setf move-number)
(writer method).
moves
(reader method).
(setf moves)
(writer method).
moves
(type).
name-of
(function).
next-to-play
(function).
opponent
(macro).
outer
(constant).
piece
(type).
play-game
(function).
player
(reader method).
(setf player)
(writer method).
player
(type).
print?
(reader method).
record-game?
(reader method).
replace-board
(function).
reset-game
(function).
reversi-game
(class).
square
(type).
state
(structure).
state-board
(reader).
(setf state-board)
(writer).
state-clock
(reader).
(setf state-clock)
(writer).
state-move
(reader).
(setf state-move)
(writer).
state-p
(function).
state-player
(reader).
(setf state-player)
(writer).
switch-strategies
(function).
title-of
(function).
valid-p
(function).
wh-strategy
(reader method).
white
(constant).
would-flip?
(function).
reversi/io.lisp
base.lisp
(file).
reversi
(system).
human
(function).
88->h8
(function).
h8->88
(function).
moves-to-string
(function).
print-board
(function).
time-string
(function).
reversi/edge-table.lisp
io.lisp
(file).
reversi
(system).
*edge-and-x-lists*
(special variable).
*edge-table*
(special variable).
*static-edge-table*
(special variable).
*top-edge*
(special variable).
combine-edge-moves
(function).
corner-for
(function).
corner-p
(function).
count-edge-neighbors
(function).
edge-index
(function).
edge-move-probability
(function).
edge-table
(type).
init-edge-table
(function).
make-edge-table
(function).
map-edge-n-pieces
(function).
piece-stability
(function).
possible-edge-move
(function).
possible-edge-moves-value
(function).
static-edge-stability
(function).
x-square-for
(function).
x-square-p
(function).
reversi/edge-table-storage.lisp
edge-table.lisp
(file).
reversi
(system).
*et-path*
(special variable).
load-edge-table
(function).
store-edge-table
(function).
reversi/strategies.lisp
edge-table-storage.lisp
(file).
reversi
(system).
alpha-beta-searcher
(function).
alpha-beta-searcher2
(function).
alpha-beta-searcher3
(function).
iago
(function).
modified-weighted-squares
(function).
text-reversi
(function).
weighted-squares
(function).
*weights*
(special variable).
ab3-df
(function).
ab3-md-wt
(function).
ab3-wt
(function).
ab3w-df
(function).
ab3w-md-wt
(function).
ab3w-wt
(function).
alpha-beta
(function).
alpha-beta-searcher3w
(function).
alpha-beta2
(function).
alpha-beta3
(function).
alpha-beta3w
(function).
copy-node
(function).
edge-stability
(function).
final-value
(function).
final-value-weighted
(function).
iago-eval
(function).
legal-nodes
(function).
losing-value
(constant).
make-node
(function).
maximize-difference
(function).
maximizer
(function).
minimax
(function).
minimax-searcher
(function).
mm-df
(function).
mm-md-wt
(function).
mm-wt
(function).
mobility
(function).
mobility-simple
(function).
mx-df
(function).
mx-md-wt
(function).
mx-wt
(function).
negate-value
(function).
neighbors
(function).
node
(structure).
node-board
(reader).
(setf node-board)
(writer).
node-p
(function).
node-square
(reader).
(setf node-square)
(writer).
node-value
(reader).
(setf node-value)
(writer).
put-first
(function).
random-strategy
(function).
rr
(function).
some-neighbors
(function).
winning-value
(constant).
Packages are listed by definition order.
reversi
common-lisp
.
alpha-beta-searcher
(function).
alpha-beta-searcher2
(function).
alpha-beta-searcher3
(function).
count-difference
(function).
human
(function).
iago
(function).
modified-weighted-squares
(function).
random-reversi-series
(function).
reversi
(function).
reversi-series
(function).
round-robin
(function).
text-reversi
(function).
weighted-squares
(function).
*board*
(special variable).
*clock*
(special variable).
*edge-and-x-lists*
(special variable).
*edge-table*
(special variable).
*et-path*
(special variable).
*move-number*
(special variable).
*ply-boards*
(special variable).
*static-edge-table*
(special variable).
*top-edge*
(special variable).
*weights*
(special variable).
+all-directions+
(special variable).
+default-max-minutes+
(constant).
88->h8
(function).
ab3-df
(function).
ab3-md-wt
(function).
ab3-wt
(function).
ab3w-df
(function).
ab3w-md-wt
(function).
ab3w-wt
(function).
aif
(macro).
all-squares
(special variable).
alpha-beta
(function).
alpha-beta-searcher3w
(function).
alpha-beta2
(function).
alpha-beta3
(function).
alpha-beta3w
(function).
any-legal-move?
(function).
awhen
(macro).
awhile
(macro).
bl-strategy
(generic reader).
black
(constant).
board
(generic reader).
board
(type).
bref
(macro).
clock
(generic reader).
(setf clock)
(generic writer).
clock
(type).
combine-edge-moves
(function).
concat-symbol
(function).
copy-board
(function).
copy-node
(function).
copy-state
(function).
corner-for
(function).
corner-p
(function).
count-edge-neighbors
(function).
cross-product
(function).
dir
(type).
edge-index
(function).
edge-move-probability
(function).
edge-stability
(function).
edge-table
(type).
empty
(constant).
final-result
(generic reader).
(setf final-result)
(generic writer).
final-value
(function).
final-value-weighted
(function).
find-bracketing-piece
(function).
get-move
(function).
h8->88
(function).
iago-eval
(function).
init-edge-table
(function).
initial-board
(function).
legal-moves
(function).
legal-nodes
(function).
legal-p
(function).
list-to-delimited-string
(function).
load-edge-table
(function).
losing-value
(constant).
make-clock
(generic function).
make-edge-table
(function).
make-flips
(function).
make-game
(function).
make-game-move
(function).
make-move
(function).
make-moves
(function).
make-node
(function).
make-state
(function).
make-state-struct
(function).
map-edge-n-pieces
(function).
mappend
(function).
max-minutes
(generic reader).
maximize-difference
(function).
maximizer
(function).
minimax
(function).
minimax-searcher
(function).
missing-argument
(macro).
mm-df
(function).
mm-md-wt
(function).
mm-wt
(function).
mobility
(function).
mobility-simple
(function).
move
(type).
move-number
(generic reader).
(setf move-number)
(generic writer).
moves
(generic reader).
(setf moves)
(generic writer).
moves
(type).
moves-to-string
(function).
mx-df
(function).
mx-md-wt
(function).
mx-wt
(function).
name-of
(function).
negate-value
(function).
neighbors
(function).
next-to-play
(function).
node
(structure).
node-board
(reader).
(setf node-board)
(writer).
node-p
(function).
node-square
(reader).
(setf node-square)
(writer).
node-value
(reader).
(setf node-value)
(writer).
opponent
(macro).
outer
(constant).
piece
(type).
piece-stability
(function).
play-game
(function).
player
(generic reader).
(setf player)
(generic writer).
player
(type).
possible-edge-move
(function).
possible-edge-moves-value
(function).
print-board
(function).
print?
(generic reader).
put-first
(function).
random-nth
(function).
random-strategy
(function).
record-game?
(generic reader).
replace-board
(function).
reset-game
(function).
reversi-game
(class).
rr
(function).
some-neighbors
(function).
square
(type).
state
(structure).
state-board
(reader).
(setf state-board)
(writer).
state-clock
(reader).
(setf state-clock)
(writer).
state-move
(reader).
(setf state-move)
(writer).
state-p
(function).
state-player
(reader).
(setf state-player)
(writer).
static-edge-stability
(function).
store-edge-table
(function).
switch-strategies
(function).
time-string
(function).
title-of
(function).
until
(macro).
valid-p
(function).
wh-strategy
(generic reader).
while
(macro).
white
(constant).
winning-value
(constant).
would-flip?
(function).
x-square-for
(function).
x-square-p
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
A strategy that searches to DEPTH and then uses EVAL-FN.
Return a strategy that does A-B search with sorted moves.
Return a strategy that does A-B search with killer moves.
Count player’s pieces minus opponent’s pieces.
A human player for the game of Reversi
Use an approximation of Iago’s evaluation function.
Like WEIGHTED-SQUARES, but don’t take off for moving near an occupied corner.
Play a series of 2*n games, starting from a random position.
Play a series of 2*n-pairs games, swapping sides.
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.
Sum of the weights of player’s squares minus opponent’s.
The four edges (with their X-squares).
Array of values to player-to-move for edge positions.
The number of the move to be played
Convert from numeric to alphanumeric square notation.
Find the best move, for PLAYER, according to EVAL-FN, searching PLY levels deep and backing up values, using cutoffs whenever possible.
Return a strategy that does A-B search with killer moves.
A-B search, sorting moves by eval-fn
A-B search, putting killer move first.
A-B search, putting killer move first.
Does player have any legal moves in this position?
Combine the best moves.
Concatenate symbols or strings to form an interned symbol
Count the neighbors of this square occupied by player.
Return a list of all (fn x y) values.
The index counts 1 for player; 2 for opponent, on each square—summed as a base 3 number.
What’s the probability that player can move to this square?
Total edge evaluation for player to move on board.
Is this a win, loss, or draw for player?
Is this a win, loss, or draw for player?
Return the square number of the bracketing piece.
Call the player’s strategy function to get a move. Keep calling until a legal move is made.
Convert from alphanumeric to numeric square notation.
Combine edge-stability, current mobility and potential mobility to arrive at an evaluation.
Initialize *edge-table*, starting from the empty board.
Return a board, empty except for four pieces in the middle.
Returns a list of legal moves for player
Return a list of legal moves, each one packed into a node.
A Legal move must be into an empty square, and it must flip at least one opponent piece.
Make any flips in the given direction.
Update board to reflect move by player
Call fn on all edges with n pieces.
Append the results of calling fn on each element of list. Like mapcon, but uses append instead of nconc.
A strategy that maximizes the difference in pieces.
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
Find the best move, for PLAYER, according to EVAL-FN, searching PLY levels deep and backing up values.
A strategy that searches PLY levels and then uses EVAL-FN.
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.
The number of moves a player has.
Set the value of a node to its negative.
Return a list of all squares adjacent to a square.
Compute the player to move next, or NIL if nobody can move.
Return a (prob val) pair for a possible edge move.
Consider all possible edge moves. Combine their values into a single number.
Print a board, along with some statistics.
Move the killer move to the front of moves, if the killer move is in fact a legal move.
Pick a random element out of a list.
Make any legal move.
Compute this edge’s static stability
Make a new strategy that plays strategy1 for m moves, then plays according to strategy2.
Return a string representing this internal time in min:secs.
Valid moves are numbers in the range 11-88 that end in 1-8.
Would this move result in any flips in this direction? If so, return the square number of the bracketing piece.
reversi-game
)) ¶Strategy function for black
reversi-game
)) ¶The board configuration
reversi-game
)) ¶reversi-game
)) ¶An array of time-units left
reversi-game
)) ¶reversi-game
)) ¶Final count, is NIL while game in play
reversi-game
)) ¶Maximum minites for each player
reversi-game
)) ¶reversi-game
)) ¶The number of the move to be played
reversi-game
)) ¶reversi-game
)) ¶An array of moves played in the game
reversi-game
)) ¶reversi-game
)) ¶ID of next player to move
reversi-game
)) ¶Whether to print progress of this game
reversi-game
)) ¶Whether to record moves and clcck of this game
reversi-game
)) ¶Strategy function for white
structure-object
.
reversi::square
(reversi::missing-argument)
reversi::board
(reversi::missing-argument)
integer
(reversi::missing-argument)
Initarg | Value |
---|---|
:bl-strategy | nil |
:wh-strategy | nil |
:board | (initial-board) |
:move-number | 1 |
:player | black |
:moves | (make-moves) |
:print? | nil |
:record-game? | nil |
:final-result | nil |
:max-minutes | +default-max-minutes+ |
:clock | (make-clock +default-max-minutes+) |
Strategy function for black
:bl-strategy
This slot is read-only.
Strategy function for white
:wh-strategy
This slot is read-only.
The board configuration
reversi::board
:board
This slot is read-only.
The number of the move to be played
fixnum
:move-number
ID of next player to move
reversi::player
:player
An array of moves played in the game
reversi::moves
:moves
Whether to print progress of this game
boolean
:print?
This slot is read-only.
Whether to record moves and clcck of this game
boolean
:record-game?
This slot is read-only.
Final count, is NIL while game in play
(or null fixnum)
:final-result
Maximum minites for each player
fixnum
:max-minutes
This slot is read-only.
An array of time-units left
reversi::clock
:clock
Jump to: | (
8
A B C E F G H I L M N O P R S T U V W X |
---|
Jump to: | (
8
A B C E F G H I L M N O P R S T U V W X |
---|
Jump to: | *
+
A B C E F L M O P R S V W |
---|
Jump to: | *
+
A B C E F L M O P R S V W |
---|
Jump to: | B C D E F I M N P R S T U |
---|
Jump to: | B C D E F I M N P R S T U |
---|