AggressiveSearch
Aggressive search algorithm for Dice Chess.
This bot represents a Difficulty 5 intellect ("Aggressive Bot" or "King Attack"). It aims to actively hunt the opponent's King, push pawns forward aggressively (pawn storms), and cluster its attacking forces (Knights, Bishops, Rooks, Queens) around the enemy King's ring, while maintaining its own King safety.
Attributes
- Source
- AggressiveSearch.scala
- Graph
-
- Supertypes
- Self type
-
AggressiveSearch.type
Members list
Value members
Concrete methods
Finds the best move using a fresh Random instance per call.
Finds the best move using a fresh Random instance per call.
Value parameters
- state
-
current dicechess.engine.domain.GameState;
state.activeColorindicates who is moving
Attributes
- Returns
-
the highest-scoring ScoredSequence, or
Noneif no legal move exists - Definition Classes
- Source
- AggressiveSearch.scala
Finds the best move with an explicit Random instance, enabling deterministic testing.
Finds the best move with an explicit Random instance, enabling deterministic testing.
Value parameters
- rand
-
random number generator used for tie-breaking among equally-scored paths
- state
Attributes
- Returns
-
the highest-scoring ScoredSequence, or
Noneif no legal move exists - Definition Classes
- Source
- AggressiveSearch.scala
Determines whether the bot should accept (Take) or decline (Drop) a double from the opponent, evaluated from the perspective of responder.
Determines whether the bot should accept (Take) or decline (Drop) a double from the opponent, evaluated from the perspective of responder.
This is the single policy point for the take/drop decision: strategies that want their own threshold or estimator override this overload. The two-argument form below only delegates here, so a policy written against it is bypassed whenever a caller names the responder explicitly (which every caller holding a doubleDecision state must, see the hazard note there).
Value parameters
- currentStake
-
the proposed double stake (e.g. 2, 4...)
- responder
-
the colour of the player responding to the double offer
- state
-
current game state (dice pool is empty); its active colour is the side to move, which in a double decision is the offerer, not the responder
Attributes
- Returns
-
true to accept the double (Take), false to resign the current stake (Drop)
- Definition Classes
- Source
- AggressiveSearch.scala
Determines whether the bot should offer a double before its dice roll.
Determines whether the bot should offer a double before its dice roll.
Value parameters
- currentStake
-
the current stake of the game
- state
-
current game state (dice pool is empty)
Attributes
- Returns
-
true to offer a double, false otherwise
- Definition Classes
- Source
- AggressiveSearch.scala
Inherited methods
Estimates the winning probability in [0.0, 1.0] for the side to move. Convenience over winProbability for offer decisions, where the deciding side is the active colour; do not override it, override winProbability.
Estimates the winning probability in [0.0, 1.0] for the side to move. Convenience over winProbability for offer decisions, where the deciding side is the active colour; do not override it, override winProbability.
Attributes
- Inherited from:
- SearchAlgorithm
- Source
- SearchAlgorithm.scala
Determines whether the bot should accept (Take) or decline (Drop) a double from the opponent, taking the side to move as the responder. Kept for source and binary compatibility; it delegates to the three-argument overload.
Determines whether the bot should accept (Take) or decline (Drop) a double from the opponent, taking the side to move as the responder. Kept for source and binary compatibility; it delegates to the three-argument overload.
Value parameters
- currentStake
-
the proposed double stake (e.g. 2, 4...)
- state
-
current game state (dice pool is empty)
Attributes
- Returns
-
true to accept the double (Take), false to resign the current stake (Drop)
- Note
-
Perspective hazard: this overload evaluates the win probability of
state.activeColor. In a double decision state,state.activeColoris the player who offered the double, NOT the responder, so a caller that feeds the delivered position here asks whether the offerer should take. Callers must prefershouldAcceptDouble(state, currentStake, responder); strategies must override that overload, not this one. - Inherited from:
- SearchAlgorithm
- Source
- SearchAlgorithm.scala
Determines whether the bot should accept a draw offered by the opponent.
Determines whether the bot should accept a draw offered by the opponent.
Value parameters
- state
-
current game state
Attributes
- Returns
-
true to accept the draw
- Inherited from:
- SearchAlgorithm
- Source
- SearchAlgorithm.scala
Determines whether the bot should offer a draw in the current position.
Determines whether the bot should offer a draw in the current position.
Value parameters
- state
-
current game state
Attributes
- Returns
-
true to offer a draw
- Inherited from:
- SearchAlgorithm
- Source
- SearchAlgorithm.scala
Estimates the winning probability in [0.0, 1.0] of color, whichever side is to move.
Estimates the winning probability in [0.0, 1.0] of color, whichever side is to move.
This is the estimator hook: a strategy with its own equity model (for example a Monte-Carlo rollout) overrides this method, so that both the offer decision (active colour) and the take/drop decision (responder colour) see the same estimate. The default maps the centipawn evaluation to a probability with a logistic sigmoid.
Attributes
- Inherited from:
- SearchAlgorithm
- Source
- SearchAlgorithm.scala