Claw  1.7.0
Public Types | Public Member Functions | List of all members
claw::ai::game::alpha_beta< State > Class Template Reference

Find an action with the alpha-beta algorithm. More...

#include <game_ai.hpp>

Public Types

typedef State state
typedef State::action action
typedef State::score score

Public Member Functions

score operator() (int depth, const state &current_state, bool computer_turn) const
 Apply the alpha-beta algorithm to find the best action.

Detailed Description

template<typename State>
class claw::ai::game::alpha_beta< State >

Find an action with the alpha-beta algorithm.

Template parameters:

Author
Julien Jorge, Sébastien Angibaud

Definition at line 162 of file game_ai.hpp.

Member Function Documentation

template<typename State >
State::score claw::ai::game::alpha_beta< State >::operator() ( int  depth,
const state &  current_state,
bool  computer_turn 
) const

Apply the alpha-beta algorithm to find the best action.

Parameters
depthDepth of the search subtree we are allowed to explore.
current_stateThe state of the game.
computer_turnTell if the next action is done by the computer.

Definition at line 221 of file game_ai.tpp.


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