#include <ChessMemory.h>
Public Member Functions | |
void | Store (const CChessBoard *nodo, int iDepth) |
Bug: the second entry of a board should overlap the first (not done). | |
CMemoryChessBoard * | FindChessboard (const CChessBoard *cbNodo, int iDepth) |
This function is not so trivial as it would seem It searches a board in the memory, but the node found must at least have been analysed until a depth given by iDepth. | |
void | Clear () |
Erases the full memory. | |
int | getMemorySize () const |
Returns the size of the memory. |
No hash has been done, pending to do in the future. It is a singleton class. No pointers are stored because they are dangerous: only full objects. Therefore there are no pointer to the best board: only indication of the move. The best continuation may exist but *MUST* be ignored.
|
Erases the full memory. Useful for debug operations. |
|
This function is not so trivial as it would seem It searches a board in the memory, but the node found must at least have been analysed until a depth given by iDepth. If the node is found and this is satisfied, then: the best move is applied, so that cbNodo->m_cbBest is not null, and then it is returned. Timing: 30 microseconds for a memory of 20 elements. 50 microseconds for a memory of 100 elements 90 microseconds for a memory of 200 element
|
|
Returns the size of the memory.
|
|
Bug: the second entry of a board should overlap the first (not done). A mayor Depth, mayor fiabilidad en el analisis Posiciones de libro, deberian ser introducidas con iDepth = M. |