Active profile: Balanced

Tavla AI

Selected AI style: Balanced
Your browser does not support the canvas tag.

How the Three AI Styles Work

The AI does not use minimax. For every legal move it calculates a heuristic score and chooses the highest-scoring move. The selected style changes only these heuristic weights. Therefore students can observe how the same legal-move generator produces different behavior when the evaluation function changes.

ParameterWhat it rewards / penalizesAggressiveBalancedDefensive
BEAR_OFFRemoving a checker from the board180020001900
HIT_OPPONENTHitting an opponent blot19001200700
MAKE_POINTTurning one own checker into a made point300400850
COVER_BLOTMoving a lone checker away / improving safety180300700
LEAVE_BLOTPenalty for exposing a single checker-180-400-900
HOME_BOARDMoving a checker into the home board4060120
STACKING_PENALTYPenalty for over-stacking a point-20-40-70
RANDOMNESSSmall noise added to break near-ties30104

Aggressive

Strongly prefers hitting exposed opponent checkers and accepts more blot risk. It uses a larger random tie-breaker, so its play is less predictable.

Balanced

Closely matches the original AI. It balances hitting, making points, protecting blots, and bearing off without strongly favoring attack or safety.

Defensive

Strongly rewards making safe points and protecting exposed checkers. It heavily penalizes leaving blots and is less interested in hitting unless the tactical gain is clear.

Important: changing the selector does not alter a game already in progress. Press Restart with Selected Style to start a new game with the new parameter set. In Human vs AI mode the computer is Black. In AI vs AI mode both sides use the selected profile.