Editorial illustration: What should I play when my partner is winning?

What should I play when my partner is winning?

The problem I needed to solve

The lowest card is not always the best support for a partner. If an opponent has yet to act and can trump, the current lead should not make the bot certain.

Implementation in this snapshot

HokmAdvancedBotTacticalStrategy.ChooseCard separates leading, supporting a winning partner and beating an opponent. ScoreSupportDiscardCard and ScoreWinningCard consider memory, endgame and close scores.

The design decision and its cost

CountUnknownHigherCardsInSuit excludes observed cards and the bot’s own hand. OpponentYetToActCanTrump uses void-suit evidence and remaining trump to assess a trumping threat.

Current boundaries

These are heuristics, not a full probability model or machine learning. The advanced class also needs checking in the active scene path; its existence alone does not prove every branch is used.

Evaluating a winning card’s vulnerability

A card may win now while remaining vulnerable to the next player. ScoreWinningCard starts with LowestWinningCardBonus minus GetPowerCost, then adjusts for acting last, winning with low trump and protected winners. VulnerableWinnerPenalty and conserving an early high trump can reduce its score. These weights express configurable preferences, not calculated win probabilities. Comparing heuristic scores does not establish a real-world bot win rate.

CountUnknownHigherCardsInSuit scans RankOrderHighToLow until the candidate rank, excluding observed ranks and cards in the bot’s own hand. OpponentYetToActCanTrump considers opponents who have not played and combines void-suit evidence with a positive remaining-trump estimate. That estimate does not locate trump among seats. Trump may be elsewhere, so the method represents a threat signal rather than certain knowledge of hidden hands.

IsCloseScore checks whether either team reaches HandTargetTricks minus one, while IsEndgame compares hand size with EndgameHandSizeThreshold. ScoreSupportDiscardCard penalizes overtaking a partner and wasting trump while the partner leads. These policies are explainable but introduce tuning and verification costs. The Advanced class demonstrates an implemented capability; proving its use in any particular scene requires inspecting that scene’s strategy construction and selection path.

What this stage taught me

For me, defensible intelligence starts by distinguishing situations. Preserving valuable cards, supporting a partner and taking a trick are related goals, but their importance changes with context.

Explore Dalo

Latest devlogs

Editorial illustration: Pasur launch and telemetry in the shared structure

Pasur launch and telemetry in the shared structure

Adding Pasur needs both a correct mode handoff and valid public telemetry.

Read article
Editorial illustration: Presenting selection and captures in Pasur

Presenting selection and captures in Pasur

Pasur motion should explain which hand card was played and which table cards were captured.

Read article
Editorial illustration: Pasur bot decisions from capture options

Pasur bot decisions from capture options

My teammate’s Pasur bot chooses among legal options without inspecting hidden opposing cards.

Read article
Dalo