Strategic Decision-Making in a Sequential Two-Target Collection Game
Statistics & ExperimentsModel answerLast 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:
-
DEPOSIT: You trigger a randomized coin allocation mechanism. The coin lands in Container A with probability
pand in Container B with probability1 - p, where0 < p < 1. If the selected container is already occupied, the coin is discarded. -
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.
-
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
-
Problem Formulation: Define the system state and articulate the key assumptions about independence, observability, and your utility function.
-
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. -
Boundary Behavior: Discuss how the optimal approach changes near round 100. Analyze the special cases when
p = 0.5and whenpapproaches 1. -
Modified Scenarios: Explain how the strategy would evolve if:
- Containers have unlimited capacity instead of capacity 1.
- The probability
pis unknown initially and must be learned through observation. - Each container has an independent per-round probability
qof 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
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
1. Problem Formulation and Assumptions
State Representation: The natural state is the pair (m_A, m_B) where m_A is the number of DEPOSIT actions since Container A was last emptied, and m_B is the corresponding count for Container B. Note that both counters increment together with each DEPOSIT since every deposit attempt affects the system state.
Key Assumptions:
- Each DEPOSIT independently routes to Container A with probability
p(Bernoulli trials) - You're risk-neutral, maximizing expected value
- No information is revealed between collection actions (the game is opaque)
- Linearity of expectation means we can analyze each container's contribution independently
Occupancy Probabilities: Let q = 1 - p. After m deposits since last collection:
- P(Container A occupied) =
1 - q^m(at least one of m coins went to A) - P(Container B occupied) =
1 - p^m(at least one went to B)
2. Optimal Steady-State Policy for p ≥ 0.5
We use renewal theory: find repeating action cycles and compute expected reward per round.
Strategy 1: Collect Both Containers
Cycle: perform k DEPOSIT actions, then COLLECT_A and COLLECT_B (total length k + 2).
Expected reward per cycle: (1 - q^k) + (1 - p^k) = 2 - q^k - p^k
Rate: R_both(k) = (2 - q^k - p^k) / (k + 2)
For small k:
R_both(1) = (2 - q - p) / 3 = 1/3R_both(2) = (2 - q² - p²) / 4 = (1 + 2pq) / 4
Since pq ≤ 1/4 (maximized at p = 0.5), we have R_both(2) ≤ 5/8 / 4 = 0.3125 < 1/3. For k ≥ 3, the denominator grows faster than numerator improvements, so k = 1 is optimal in this family, yielding rate 1/3 ≈ 0.333.
Strategy 2: Collect Only Container A
Cycle: perform k DEPOSIT actions, then COLLECT_A (total length k + 1).
Expected reward: 1 - q^k
Rate: R_A(k) = (1 - q^k) / (k + 1)
For small k:
R_A(1) = p / 2R_A(2) = (1 - q²) / 3 = (2p - p²) / 3
Comparing: p/2 > (2p - p²)/3 simplifies to 3p > 4p - 2p², so p² > p/2, giving p > 1/2.
Therefore: when p > 1/2, alternate DEPOSIT and COLLECT_A for rate p/2.
Comparison: p/2 > 1/3 when p > 2/3.
Optimal Policy:
- When
p > 2/3: cycle (DEPOSIT, COLLECT_A) repeatedly, achieving ratep/2 - When
0.5 ≤ p ≤ 2/3: cycle (DEPOSIT, COLLECT_A, COLLECT_B), achieving rate1/3
Critical Observation: At p = 2/3, Container B is collected much less frequently but still contributes to long-run average. Even when p is high, occasionally collecting B can improve total yield if done at the right frequency.
3. Finite Horizon and Edge Cases
Terminal Boundary Effects: As round 100 approaches, the optimal strategy shifts:
- In the final rounds (say, last 3), you should collect all available value
- Round 100: collect whichever container is more likely full
- Rounds 98-99: adjust deposit frequency to avoid wasting deposits that cannot be collected
Working backward from round 100, if you deposited in round 99, you should collect both containers in rounds 100 and 101 (treating round 101 as a terminal action beyond the game). This creates a finite-horizon adjustment zone of roughly 5-10 rounds.
Edge Case p = 0.5: Both containers are symmetric. The optimal cycle is (DEPOSIT, COLLECT_A, COLLECT_B) with rate 1/3, but you could equivalently collect B first. With k = 2, rate would be (2 - 2(1/4))/4 = 3/8, which exceeds 1/3, so correction: at p = 0.5, optimal is k = 2 with rate 0.375.
Edge Case p → 1: Container B is almost never filled. The optimal strategy approaches pure alternation (DEPOSIT, COLLECT_A) with rate approaching 1/2. Container B becomes negligible and should only be collected opportunistically at the very end.
4. Relaxed Assumptions
Unlimited Capacity: With unbounded capacity, you should deposit continuously and collect rarely. The optimal strategy becomes: perform k deposits then collect everything, where k scales with the time horizon. Expected value in each container grows linearly with deposits (approximately pk in A, qk in B), so rate is approximately k/(k+2) → 1 as k → ∞. In practice, collect once at the very end.
Unknown p (Learning): You must balance exploration and exploitation. Start with several collection actions early to estimate p from the empirical success rates. Use Thompson sampling or UCB: maintain a beta distribution for p, sample from the posterior, and follow the optimal strategy for that sample. As uncertainty decreases, converge to the optimal fixed-p strategy. Expect roughly 10-20 rounds for adequate learning with proper priors.
External Hazard Rate q: Each uncollected coin has probability q of disappearing each round. This creates urgency to collect frequently. The analysis becomes: expected value in Container A after k deposits and surviving k rounds is (1-q_A^k)(1-q)^k, which decays exponentially. This dramatically reduces optimal k, likely to k = 1 for any appreciable hazard rate (e.g., q > 0.1). The problem shifts from patient accumulation to urgent harvesting.
Common Mistakes:
- Ignoring that both counters increment together during DEPOSIT
- Assuming you should never collect Container B when
p > 0.5 - Not recognizing this is a renewal process amenable to rate analysis
- Forgetting the capacity constraint causes overflow loss
- Incorrectly computing occupancy probability as
mpinstead of1 - (1-p)^m