Claw  1.7.3
Public Types | Public Member Functions | List of all members
claw::ai::game::select_random_action< Method > Class Template Reference

Select a random action among the best ones. More...

#include <game_ai.hpp>

Public Types

typedef Method::state state
 The type of a state in the game.
typedef Method::action action
 The type of the actions that change the state of the game.
typedef Method::score score
 The type used to represent the score.

Public Member Functions

void operator() (int depth, const state &current_state, action &new_action, bool computer_turn) const
 Select a random action among the best ones.

Detailed Description

template<typename Method>
class claw::ai::game::select_random_action< Method >

Select a random action among the best ones.

Template parameters:

Author
Julien Jorge, Sébastien Angibaud

Definition at line 227 of file game_ai.hpp.

Member Function Documentation

template<typename Method >
void claw::ai::game::select_random_action< Method >::operator() ( int  depth,
const state current_state,
action new_action,
bool  computer_turn 
) const

Select a random action among the best ones.

Parameters
depthMaximum depth of the search tree.
current_stateThe state of the game.
new_action(in/out) Best known action.
computer_turnTell if the action is done by the computer.

Definition at line 372 of file game_ai.tpp.

References claw::max_vector< E, Comp, Container >::add(), and claw::max_vector< E, Comp, Container >::get_v().


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