uct.h File Reference

Uct algorithm and playouts management. More...

#include <cmath>
#include <queue>
#include <set>
#include "hash.h"

Go to the source code of this file.

Classes

class  SimplePlayout
 Simple playout. More...
class  AdvisorPlayout
 Playouting class using Move Advisor. More...
class  TWstep
 Tree wide step. More...
class  TWsteps
 Structure to hold TWsteps. More...
class  TTitem
 One item of tt tables. More...
class  Node
 Node in the Uct tree. More...
class  Tree
 Uct tree. More...
class  Uct
 Uct search. More...

Defines

#define MAX_PLAYOUT_LENGTH   100
#define UCT_MAX_DEPTH   30
#define CHILDREN_CACHE_SIZE   5
#define CCACHE_START_THRESHOLD   50
#define EVAL_AFTER_LENGTH   (cfg.playoutLen())
#define FPU   0.9
#define NODE_VICTORY(node_type)   (node_type == NODE_MAX ? 2 : -1 )
#define WINNER_TO_VALUE(winner)   (winner == GOLD ? 1 : -1 )
#define PLAYER_TO_NODE_TYPE(player)   (player == GOLD ? NODE_MAX : NODE_MIN)

Typedefs

typedef map< Step, TWstepTWstepsMap
typedef set< Node * > NodeSet

Enumerations

enum  playoutStatus_e { PLAYOUT_OK, PLAYOUT_TOO_LONG, PLAYOUT_EVAL }
enum  nodeType_e { NODE_MAX, NODE_MIN }
 GOLD is always MAX, Silver Min, no matter who is in the root. More...


Detailed Description

Uct algorithm and playouts management.

Implementation of UCT nodes, UCT tree, the core UCT algorithm and playouts mechanisms.


Enumeration Type Documentation

enum nodeType_e

GOLD is always MAX, Silver Min, no matter who is in the root.

values in the node express: -1 sure win for Silver ... 0 equal ... 1 sure win for gold nodes are either NODE_MAX ( ~ gold node ) where we maximize value + uncertainty_term and NODE_MIN ( ~ siler node ) where we maximize -value + uncertainty_term


Generated on Thu Aug 6 23:29:07 2009 for akimot by  doxygen 1.5.7.1