libkombilo  0.8
Public Member Functions | Data Fields
Algo_hash_corner Class Reference

Hashing for corner patterns. More...

#include <algos.h>

Inheritance diagram for Algo_hash_corner:
Algo_hash Algorithm

Public Member Functions

 Algo_hash_corner (int bsize, SnapshotVector DATA, string OS_DATA_NAME, int SIZE=7, int MAXNUMSTONES=20)
 
std::pair< hashtype, std::vector< int > > compute_hashkey (PatternList &pl, int CS)
 
- Public Member Functions inherited from Algo_hash
 Algo_hash (int bsize, SnapshotVector DATA, string OS_DATA_NAME, int MAXNUMSTONES)
 
virtual void initialize_process ()
 Called by GameList::start_processing.
 
virtual void newgame_process (int game_id)
 Called when a new game is about to be GameList::process'ed.
 
virtual void AB_process (int x, int y)
 Called during processing, for each AB SGF tag.
 
virtual void AW_process (int x, int y)
 Called during processing, for each AW SGF tag.
 
virtual void AE_process (int x, int y, char removed)
 Called during processing, for each AE SGF tag.
 
virtual void endOfNode_process ()
 Called during processing, after fully processing a node (which might contain several AB, AW tags)
 
virtual void move_process (Move m)
 Called during processing, for each move (B, W tags)
 
virtual void pass_process ()
 Called during processing, for each pass.
 
virtual void branchpoint_process ()
 Called during processing, for each node where a variation starts.
 
virtual void endOfVariation_process ()
 Called during processing, when reaching the end of variation ("jump back to most recent branchpoint")
 
virtual void endgame_process (bool commit=true)
 Called during processing, when the end of the game is reached.
 
virtual void finalize_process ()
 Called by GameList::finalize_processing.
 
virtual int search (PatternList &patternList, GameList &gl, SearchOptions &options)
 
- Public Member Functions inherited from Algorithm
 Algorithm (int bsize)
 

Data Fields

int size
 size of the region used for hashing (the region is a square with side-length size, located at a corner of the board)
 
- Data Fields inherited from Algorithm
int gid
 store the game id during processing
 
int boardsize
 board size
 

Additional Inherited Members

- Protected Member Functions inherited from Algo_hash
SnapshotVector get_data ()
 Extract the relevant data from file at Kombilo startup.
 
virtual void get_HHCS (int ptr, vector< HashhitCS * > *results, bool cs)
 
- Protected Attributes inherited from Algo_hash
int maxNumStones
 
std::vector< HashInstance > * hi
 
std::vector< std::pair< hashtype, int > > hash_vector
 
vector< pair< hashtype, int > > data
 
boost::unordered_multimap< hashtype, pair< int, int > > data_p
 
fstream os_data
 
- Static Protected Attributes inherited from Algo_hash
static const hashtype hashCodes []
 

Detailed Description

Hashing for corner patterns.

Member Function Documentation

pair< hashtype, vector< int > > Algo_hash_corner::compute_hashkey ( PatternList pl,
int  CS 
)
virtual

Given a PatternList and a choice of colorSwitch (true/false), compute the hashCodes that we have to look for in the db.

The method returns a vector of pairs, consisting of a hashCode (for one of the corners covered by the pattern) and a vector of possible flips which should be used to produce a Candidate.

Reimplemented from Algo_hash.


The documentation for this class was generated from the following files: