Stochastic Minimax partition problem card game

Click For Summary

Discussion Overview

The discussion revolves around a game theory problem involving a card game with two players, A and B, who use random numbers to create "piles" with specific goal values. The players aim to minimize the number of piles while maximizing points from special numbers. The conversation explores the mechanics of the game, strategies for play, and algorithmic approaches to solving the problem.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes the basic mechanics of the game, including how players can create piles and the goal of minimizing them while maximizing points.
  • Another participant seeks clarification on the rules, particularly regarding turn order and the conditions for placing cards on existing piles.
  • There is confusion about whether players can start new piles while existing ones are still open, with some participants asserting that a player must complete a pile before starting another.
  • One participant proposes that there may be better strategies than a pure turn-based minimax approach and asks for suggestions.
  • Another participant outlines a potential sequence of moves and questions whether the rules allow for continuous turns as long as a player can add to a pile.
  • A participant shares a method for calculating possible moves and probabilities based on the cards in hand and those not being played, indicating a need for further refinement of their approach.

Areas of Agreement / Disagreement

Participants express differing views on the rules governing turn-taking and pile management, indicating that there is no consensus on certain aspects of gameplay. Additionally, there is ongoing exploration of algorithmic strategies, with no agreement on the best approach yet established.

Contextual Notes

The discussion includes various assumptions about the game mechanics and the players' strategies, which may not be fully defined or agreed upon. There are also unresolved questions regarding the optimal algorithm for solving the problem.

NotASmurf
Messages
150
Reaction score
2
Hey all, ran into a game theory problem I can't solve.
A and B have a set of 10 random numbers from 1-10, players can make so called "piles", a pile has a goal number from 1 to 10, if 6,3 are on the table, a pile of nine may be started, the pile is added to by adding sets of numbers that sum to the piles defining value.

Simple case:
During each turn, player places a number on the table,
goal is to get rid of all your numbers, numbers can be removed by making piles, minimize number of piles.

in a one player scenario, player would find all combinations of their hand in the form ([a+b+c+d+e],[a+,b+c+d+e],[a+b,c+d+e],[a+b+c,d+e],[a+b+c+d,e], [a,b,c+d+e],[a,b+c,d+e]) etc. Pick the combination for which the most subsets satisfy the constraints and for which the most subsets sum to the same value.

Real case:
A and B have a set of 10 random numbers from 1-10, the elements are picked from 4 sets of the numbers 1-10
During each turn, player places a number on the table,
Objective is to obtain as many of n special "point" numbers. Point numbers may be accrued by terminating a pile containing them, numbers can be removed by making piles, Once a player places a number/card whose single value is the piles value, they may terminate that pile.
The game ends when all 20 of A+B's numbers are used. but you may want to wait for multiple point numbers before terminating.

I can see that this is a stochastic minimax problem, probability inferences are made via card counting.
that requires nested bruteforcing and recursion, but can't come up with a fullproof, non tautological algorithm, Having trouble figuring out how to span all the search space without missing anything. Any help appreciated. :D
 
Physics news on Phys.org
Let's see if I understand what you've said with this example:
A starts with: 1,3,4,4,6,7,7,8,9,10
B starts with: 2,2,2,4,6,7,8,8,9,9
A puts down 7, B puts down 2, so we have piles of 9. Or are the 2 starter cards drawn from the deck of 40?
Then A puts down a 10. Does A go first? What happens when he goes over the goal of 9? Do they alternate putting down cards?
After A puts down 10, is it B's turn?
If B wants to throw away a 2, can he put it on the 10?
 
.Scott said:
What happens when he goes over the goal of 9?
If B wants to throw away a 2, can he put it on the 10?
They may not, The sum may not exceed ten,
.Scott said:
Do they alternate putting down cards?
After A puts down 10, is it B's turn?
yes
.Scott said:
A puts down 7, B puts down 2, so we have piles of 9. Or are the 2 starter cards drawn from the deck of 40?
A starts
.Scott said:
Then A puts down a 10. Does A go first?
A must complete a pile before starting another, only one may be active. if he cannot contribute, the card either stays on the table or the other player uses it.

[/QUOTE]
 
Assuming we know A and B's sets. I'm still confused. I know there has to be a better solution than pure turn based minimax, any suggestions?
 
If I understand the rules correctly, we could have:
1st: A puts down a 3, then B puts down 1, so piles must total 4.
then:
A puts down 3.
B does not have a 1, so it cannot play onto the 3. So it puts down a 2 - starting a new pile.
A puts down a 2 and scores 1 point.
B puts down a 2.
A does not have any card less than 4, so it passes.
B does not have a 1 or 2, so it starts a new pile. It puts down a 4 and scores a point.
A passes again.
B passes because it also has no more cards that are 4 or less.

Would that be correct play?
Or does it remain your turn for as long as you can add cards to your pile?
 
.Scott said:
If I understand the rules correctly, we could have:

B does not have a 1, so it cannot play onto the 3. So it puts down a 2 - starting a new pile.

Or does it remain your turn for as long as you can add cards to your pile?

Not this part, if it puts down a 2, that remains on the "usable to both" table stack, He cannot start a new pile til one of them closes current one.

So far my logic is, Get possible moves for player X:


for i in range(0,len(hand)):
for r in range(0,len(piles)): // this was for the 2 pile variant, much more complicated
moves.append([i,r,-2]) //add potential move from hand to pile
for i in range(0,len(hand)):
for r in range(0,len(table)):
for k in range(0,len(pile)):
moves.append([i,r,k]) //add potential move from hand to table, to pile (since you may use as many table cards as there are during your move

taking the move tree, i then apply minimax algorithm.

The above assumes you know B's hand, I'm using this formula for extrapolating card probability:

def ProbablityOfKcardsWithB(Bhand_length, cards_not_being_played, how_many_B_has_in_hand):

return 1.0 - (Choose(cards_not_being_played, how_many_B_has_in_hand)/(1.0*Choose(cards_not_being_played+ Bhand_length,how_many_B_has_in_hand)))I then mix the the two with:


if deadly:
defend against deadly
iv both deadly:
defend against maxALTHOUGH I think the above needs a more rigorous definition. Any help appreciated?
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • Poll Poll
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 29 ·
Replies
29
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K