KatInterview

Strategic Decision-Making in a Sequential Two-Target Collection Game

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsprobabilityoptimizationmarkov-decision-process

Last updated

Determine the optimal action sequence to maximize expected coin collection in a 100-round game with two hidden single-capacity boxes and probabilistic placement.

Problem Setup

You're participating in a 100-round sequential decision game with two concealed containers, Container A and Container B. Initially, both containers are empty. Each container can hold at most one coin, and you cannot see whether a container currently holds a coin.

During each of the 100 rounds, you must select exactly one action:

  1. DEPOSIT: You trigger a randomized coin allocation mechanism. The coin lands in Container A with probability p and in Container B with probability 1 - p, where 0 < p < 1. If the selected container is already occupied, the coin is discarded.

  2. COLLECT_A: You open Container A and retrieve any coin inside (receiving 1 if occupied, 0 if empty). Container A becomes empty, while Container B remains unchanged.

  3. COLLECT_B: You open Container B and retrieve any coin inside (receiving 1 if occupied, 0 if empty). Container B becomes empty, while Container A remains unchanged.

Your objective is to maximize the expected total coins collected over all 100 rounds.

Questions to Address

  1. Problem Formulation: Define the system state and articulate the key assumptions about independence, observability, and your utility function.

  2. Optimal Strategy Derivation: Assume without loss of generality that p ≥ 0.5. Determine the optimal long-run strategy. Specifically, identify when you should collect from both containers versus focusing on Container A alone, and compute the optimal frequency of DEPOSIT actions between collections.

  3. Boundary Behavior: Discuss how the optimal approach changes near round 100. Analyze the special cases when p = 0.5 and when p approaches 1.

  4. Modified Scenarios: Explain how the strategy would evolve if:

    • Containers have unlimited capacity instead of capacity 1.
    • The probability p is unknown initially and must be learned through observation.
    • Each container has an independent per-round probability q of being emptied externally if left uncollected.

Hints

Hint 1

Consider tracking how many DEPOSIT actions have occurred since each container was last emptied

Hint 2

Think about the problem as choosing repeating cycles of actions and computing the reward rate per round

Hint 3

The probability that a container is full depends on how many deposits occurred while it was empty and the routing probability