MCPcopy Create free account

hub / github.com/PascalPons/connect4 / functions

Functions57 in github.com/PascalPons/connect4

↓ 11 callersMethodnbMoves
* @return number of moves played from the beginning of the game. */
Position.hpp:144
↓ 5 callersMethodgetSize
TranspositionTable.hpp:102
↓ 3 callersMethodkey3
* Build a symetric base 3 key. Two symetric positions will have the same key. * * This key is a base 3 representation of the sequence of played mo
Position.hpp:169
↓ 3 callersMethodplay
* Plays a possible move given by its bitmap representation * * @param move: a possible move given by its bitmap representation * only
Position.hpp:107
↓ 3 callersMethodput
* Store a value for a given key * @param key: must be less than key_size bits. * @param value: must be less than value_size bits. null (0) value
TranspositionTable.hpp:135
↓ 2 callersMethodcanPlay
* Indicates whether a column is playable. * @param col: 0-based index of column to play * @return true if the column is playable, false if the c
Position.hpp:222
↓ 2 callersMethodcanWinNext
* return true if current player can win next move */
Position.hpp:136
↓ 2 callersMethodget
OpeningBook.hpp:171
↓ 2 callersMethodgetKeySize
TranspositionTable.hpp:103
↓ 2 callersMethodgetKeys
TranspositionTable.hpp:100
↓ 2 callersMethodgetValueSize
TranspositionTable.hpp:104
↓ 2 callersMethodgetValues
TranspositionTable.hpp:101
↓ 2 callersMethodisWinningMove
* Indicates whether the current player wins by playing a given column. * This function should never be called on a non-playable column. * @param
Position.hpp:242
↓ 2 callersFunctionmed
* util functions to compute next prime at compile time */
TranspositionTable.hpp:30
↓ 2 callersMethodplayCol
* Plays a playable column. * This function should not be called on a non-playable column or a column making an alignment. * * @param col: 0-b
Position.hpp:232
↓ 1 callersMethodadd
* Add a move in the container with its score. * You cannot add more than Position::WIDTH moves */
MoveSorter.hpp:45
↓ 1 callersMethodanalyze
Solver.cpp:128
↓ 1 callersFunctionexplore
* Explore and print all possible position under a given depth. * symetric positions are printed only once. */
generator.cpp:17
↓ 1 callersFunctiongenerate_opening_book
* Read scored positions from stdin and store them in an opening book * * Input lines must be a valid position (possibly empty string), a space and a
generator.cpp:43
↓ 1 callersMethodgetNext
* Get next move * @return next remaining move with max score and remove it from the container. * If no more move is available return 0 */
MoveSorter.hpp:57
↓ 1 callersFunctionhas_factor
* tells if an integer n has a a divisor between min (inclusive) and max (exclusive) */
TranspositionTable.hpp:36
↓ 1 callersMethodkey
* @return a compact representation of a position on WIDTH*(HEIGHT+1) bits. */
Position.hpp:151
↓ 1 callersMethodload
Empty opening book * Opening book file format: * - 1 byte: board width * - 1 byte: board height * - 1 byte: max stored position depth
OpeningBook.hpp:88
↓ 1 callersMethodloadBook
Solver.hpp:71
↓ 1 callersFunctionlog2
log2(1) = 0; log2(2) = 1; log2(3) = 1; log2(4) = 2; log2(8) = 3
TranspositionTable.hpp:49
↓ 1 callersMethodmoveScore
* Score a possible move. * * @param move, a possible move given in a bitmap format. * * The score we are using is the number of winning sp
Position.hpp:208
↓ 1 callersFunctionnext_prime
return next prime number greater or equal to n. n must be >= 2
TranspositionTable.hpp:44
↓ 1 callersMethodpossibleNonLosingMoves
* Return a bitmap of all the possible next moves the do not lose in one turn. * A losing move is a move leaving the possibility for the opponent to
Position.hpp:187
↓ 1 callersMethodsave
OpeningBook.hpp:150
↓ 1 callersMethodsolve
Solver.cpp:107
MethodMoveSorter
* Build an empty container */
MoveSorter.hpp:74
MethodOpeningBook
OpeningBook.hpp:74
MethodPosition
* Default constructor, build an empty position. */
Position.hpp:215
MethodSolver
Constructor
Solver.cpp:143
MethodTranspositionTable
TranspositionTable.hpp:111
Methodbottom_mask_col
return a bitmask containg a single 1 corresponding to the bottom cell of a given column
Position.hpp:344
Methodcolumn_mask
return a bitmask 1 on all the cells of a given column
Position.hpp:350
Methodcompute_winning_position
* @parmam position, a bitmap of the player to evaluate the winning pos * @param mask, a mask of the already played spots * * @return a bitmap
Position.hpp:300
Methodget
* Get the value of a key * @param key: must be less than key_size bits. * @return value_size bits value associated with the key if present, 0 ot
TranspositionTable.hpp:146
MethodgetNodeCount
Solver.hpp:62
Methodindex
TranspositionTable.hpp:106
MethodinitTranspositionTable
OpeningBook.hpp:37
Functionmain
* If used with a max depth parameter: generate all uniquepsoition upto max depth * If no parameter: read scoredposition from standard input to store
generator.cpp:81
Functionmain
* Main function. * Reads Connect 4 positions, line by line, from standard input * and writes one line per position to standard output containing: *
main.cpp:35
Methodnegamax
* Reccursively score connect 4 position using negamax variant of alpha-beta algorithm. * @param: position to evaluate, this function assumes nobody a
Solver.cpp:39
Methodopponent_winning_position
* Return a bitmask of the possible winning positions for the opponent */
Position.hpp:273
MethodpartialKey3
* Compute a partial base 3 key for a given column */
Position.hpp:254
Methodpopcount
* counts number of bit set to one in a 64bits integer */
Position.hpp:288
Methodpossible
* Bitmap of the next possible valid moves for the current player * Including losing moves. */
Position.hpp:281
Methodreset
* reset (empty) the container */
MoveSorter.hpp:67
Methodreset
* Empty the Transition Table. */
TranspositionTable.hpp:125
Methodreset
Solver.hpp:66
Methodtop_mask_col
return a bitmask containg a single 1 corresponding to the top cel of a given column
Position.hpp:339
Methodwinning_position
* Return a bitmask of the possible winning positions for the current player */
Position.hpp:266
Method~OpeningBook
OpeningBook.hpp:176
Method~TableGetter
TranspositionTable.hpp:67
Method~TranspositionTable
TranspositionTable.hpp:117