quoridor.explore#

Exploration related objects.

Those objects are used to explore different path while remembering the score and updating a global score.

Classes

BestMoves([length])

Store best moves.

Exploration()

Allows for clever space exploration.

Path([init_path])

List of moves which forms a part of a play.

PossibleMove(player_id, move[, parent, score])

Stores the known future score for this move.

TreeOperations()

Static methods to go through a tree.

class quoridor.explore.BestMoves(length=4)#

Store best moves.

__init__(length=4)#

Initialise the list of best moves.

store_if_needed(move: PossibleMove)#

If score is higher than min score replace it.

class quoridor.explore.Exploration#

Allows for clever space exploration.

Stores tested moves and associated scores.

__init__()#

Init an exploration.

class quoridor.explore.Path(init_path=None)#

List of moves which forms a part of a play.

__init__(init_path=None)#

Path initialization with the start of a path.

score()#

Path score, based on last move.

class quoridor.explore.PossibleMove(player_id, move, parent=None, score=nan)#

Stores the known future score for this move.

Be careful, the adv moves are stored but not acounted for scoring.

__init__(player_id, move, parent=None, score=nan)#

PossibleMove initialization.

add_children(child)#

Add a new children.

And ensure this children parent is set.

property score: float64#

Returns score computed from childrens.

Does not look at adversary scores.

class quoridor.explore.TreeOperations#

Static methods to go through a tree.

static get_path_from_state1_to_state2(state1, state2)#

As the name implies.

Renvoie:

(int, Path) – remaining path to state2.

Type renvoyé:

The number of move to unplay and the