Class MinimaxOpts

Change the behaviour of the minimax search.

The following options are not yet supported:

Hierarchy

Constructors

Properties

method: SearchMethod = SearchMethod.DEPTH

Method used to search for best move. See SearchMethod for details

timeout: number = 0

Timeout used when method is TIME. Timeout disabled when set to 0.

depth: number = 0

Default search depth for depth and deepening searches.

pruning: PruningType = PruningType.NONE

Node pruning type, default none

See

Alpha-beta pruning in blog post.

initialDepth: number = 1

Depth to start from for deepening and time based. Bypassing early depths may improve performance.

genBased: boolean = false

Use the child generator instead of creating all children for each node. Should be faster and use less memory.

See

Generators in blog post.

presort: boolean = false

Sort children of node before searching deeper.

See

Presort in blog post

sortMethod: SortMethod = SortMethod.DEFAULT

Method used to sort nodes if presort is enabled

nodeLimit: number = 0

Maximum number of nodes allowed in the tree. Search will finish if exceeded, returning NODE_LIMIT.

Actual nodes in tree will be between nodeLimit and nodeLimit + x where x, is the number of moves/children being checked when the nodeLimit is exceeded.

Disabled by setting to 0

Only works with Negamax (optimal = false)

pruneByPathLength: boolean = false

Set to true to shorten winning paths and lengthen losing paths. Only works when combined with PruningType.ALPHA_BETA. Is disabled for Negamax when optimal is true.

Check Negamax, Minimax or Maxn (and corresponing Opts) for specific support.

randomBest: boolean = false

Select randomly from all of the children with the best value.

Check Negamax, Minimax or Maxn (and corresponing Opts) for specific support.

randomWeight: number = 0

Select randomly, weighted in favour of better values Weighting is determined by config value.

  • randomWeight = 0, disabled
  • randomWeight = 1, equal probabilty
  • randomWeight = 5, 5 times more likely for every +1 valuation

Check Negamax, Minimax or Maxn (and corresponing Opts) for specific support.

removalMethod: RemovalMethod = RemovalMethod.NONE

For removing nodes in between iterative searches. Allows for deeper searches that would otherwise be memory limited.

Good for reduced memory usage but takes extra time.

removalDepth: number = 0

Controls the way removal behaves for DEPTH

removalCount: number = 0

Controls the way removal behaves for COUNT

Generated using TypeDoc