![]() |
BitBully 0.0.39
|
#include <MoveSorter.hpp>
Public Member Functions | |
void | add (const Position::position_t move, const int score) |
Position::position_t | getNext () |
void | reset () |
MoveSorter () | |
This class helps sorting the next moves
You have to add moves first with their score then you can get them back in decreasing score
This class implement an insertion sort that is in practice very efficient for small number of move to sort (max is Position::WIDTH) and also efficient if the move are pushed in approximatively increasing order which can be acheived by using a simpler column ordering heuristic.
Definition at line 38 of file MoveSorter.hpp.
|
inline |
Build an empty container
Definition at line 74 of file MoveSorter.hpp.
|
inline |
Add a move in the container with its score. You cannot add more than Position::WIDTH moves
Definition at line 45 of file MoveSorter.hpp.
|
inline |
Get next move
Definition at line 57 of file MoveSorter.hpp.
|
inline |
reset (empty) the container
Definition at line 67 of file MoveSorter.hpp.
Position::position_t GameSolver::Connect4::MoveSorter::move |
Definition at line 83 of file MoveSorter.hpp.
int GameSolver::Connect4::MoveSorter::score |
Definition at line 84 of file MoveSorter.hpp.