You are given a simplified card game engine with unit tests. The game is played using a table of face-up cards; each card has an integer value.
On each turn, a player draws exactly 3 cards from the table (removing them from the table). A turn scores 1 point if the three drawn card values sum to 15; otherwise it scores 0. The game ends when fewer than 3 cards remain.
A unit test fails because the current draw_three_cards() (or equivalent) method sometimes returns cards that were not present on the table at the moment of drawing.
Task: Fix the draw method so that all three cards are always selected from the current table state, and the selected cards are removed from the table.
Implement a simple baseline strategy for selecting three cards each turn.
Example of an acceptable baseline:
Define a way to evaluate a strategy by simulation:
Task: Implement the evaluation harness and report the metric(s).
Improve the strategy to maximize total score.
Task: Implement an optimized strategy (e.g., search/backtracking over possible sequences of draws) that attempts to maximize total points over the whole game.
If not already specified in the provided code/tests, state reasonable assumptions for: