Besides expectiminimax, you can handle randomness by turning chance into either sampling (Monte Carlo-style) or by modeling randomness inside the evaluation function—depending on how accurate you need to be and what budget you have. Expectiminimax is the principled approach when you can enumerate outcomes and probabilities, but it can be expensive when chance branching is large (many dice combinations, many possible draws). Sampling is often the pragmatic compromise: at chance nodes, sample a subset of outcomes according to their probabilities and estimate expected value from those samples. This gives you a controllable cost and can work well if variance is manageable.
Implementation-wise, one approach is “stochastic leaf evaluation”: keep a deterministic game tree over decisions, but at cutoffs estimate the expected value by rolling out a few random outcomes. Another is “chance sampling” within the tree: at each chance node, randomly select one or a few outcomes and continue search. You can reduce variance by using stratified sampling (ensure each major outcome class appears) or by caching sampled results for repeated states. Be careful with alpha-beta: pruning assumptions rely on monotonic bounds, which don’t hold cleanly under sampled estimates. If you use sampling, treat pruning as heuristic and validate that your decisions remain stable across runs, or run multiple seeds and pick a robust move.
A concrete example: if you’re building an AI for a game with dice, full expectiminimax might be too slow at depth 6. Instead, at each chance node, sample 2–4 dice outcomes and average. If you have a tight time budget, this often beats shallow deterministic search because it captures the direction of expected value. Outside games, randomness can represent uncertain data quality or stochastic user behavior. If your decision tree relies on retrieved context, randomness might come from variable relevance among candidates. With Milvus or Zilliz Cloud, you can sometimes model that uncertainty as a distribution over topK results. Sampling candidates (with weights derived from similarity plus metadata confidence) can approximate expected utility without enumerating every possible “true relevance” assignment—useful when you want a probabilistic, not worst-case, decision policy.