[][src]Module play_2048::evaluators

Structs

AlignmentEvaluator

BoardEvaluator implementation which computes the number of tiles alignments

CombinedBoardEvaluator

BoardEvaluator implementation which combines multiple board evaluators by summing their evaluations

EmptyTileEvaluator

A simple implementation of BoardEvaluator which evaluates a board by simply computing the number of empty tiles.

MonotonicityEvaluator

BoardEvaluator implementation which computes inversions on rows and columns, add them, and then takes the negative value of it. Inversions are computed by summing the differences between exponents which appear in the wrong order in each row / column

PrecomputedBoardEvaluator

BoardEvaluator implementation which encapsulates a RowColumnEvaluator and pre-computes values for any possible row / column. These values are stored in a simple vector which is indexed by the u16 representation of each row.

Traits

BoardEvaluator

Evaluate a Board by mapping it to a number. The higher the number, the better the board state.

RowColumnEvaluator

Evaluate a Board by evaluating independently each row and column and summing the results