|
Claw
1.7.3
|
Find an action with the MinMax algorithm. More...
#include <game_ai.hpp>
Public Types | |
| typedef State | state |
| The type of a state in the game. | |
| typedef State::action | action |
| The type of the actions that change the state of the game. | |
| typedef State::score | score |
| The type used to represent the score. | |
Public Member Functions | |
| score | operator() (int depth, const state ¤t_state, bool computer_turn) const |
| Apply the min-max algorithm to find the best action. | |
Find an action with the MinMax algorithm.
Template parameters:
Definition at line 139 of file game_ai.hpp.
| claw::ai::game::min_max< State >::score claw::ai::game::min_max< State >::operator() | ( | int | depth, |
| const state & | current_state, | ||
| bool | computer_turn | ||
| ) | const |
Apply the min-max algorithm to find the best action.
| depth | Depth of the search subtree we are allowed to explore. |
| current_state | The state of the game. |
| computer_turn | Tell if the next action is done by the computer. |
Definition at line 146 of file game_ai.tpp.
1.8.1.2