[][src]Crate rubot

An easily reusable game bot for deterministic games.

It is required to implement the trait Game to use this crate. For more details, look at the trait documentation or visit the examples directory.

While this crate will probably have many different kind of bots in the future, there is currently only one: alpha_beta, which uses an optimized version of alpha beta pruning with iterative deepening.

Re-exports

pub use alpha_beta::Bot;

Modules

alpha_beta

A deterministic game bot using alpha beta pruning.

tree

A tree implementation used in examples and tests.

Structs

Depth

A struct implementing RunCondition returning false once the current depth is bigger than self.0.

Logger

A struct implementing IntoRunCondition which logs how many steps were taken, the deepest completed depth and the total time of the last call to fn select.

Steps

Can be converted into RunCondition which returns true for the first self.0 steps. This should only be used for debugging and testing as unlike Duration, ToCompletion or Depth as the total amount of steps needed is not directly indicative of search depth and can change between minor versions.

ToCompletion

A struct implementing RunCondition which always returns true.

Traits

Game

An interface required to interact with GameBots.

IntoRunCondition

Converts a type into a RunCondition. It is recommended to mostly use Duration .

RunCondition

A condition which indicates if a Bot should keep on running. It is recommended to use Duration for nearly all use cases.