SansForSSBU / balatro-round-calculator

Calculate optimal moves in a Balatro round
0 stars 0 forks source link

Design an algorithm to efficiently search for a win from a game state #2

Open SansForSSBU opened 1 month ago

SansForSSBU commented 1 month ago

Comments under this issue will be used for taking notes

SansForSSBU commented 1 month ago

One idea is to take possible hand types and search in the draw pile for cards which could take us closer to these. Then for each card in the draw pile, we can consider what hands it would take us closer to playing. If it doesn't take us closer to playing any hand type, stop the search there and consider how it affects the current best move.

SansForSSBU commented 1 month ago

Another approach is simply to simulate several possible outcomes. Draw random cards and see what the best move for each resulting hand is. Then an expected value can be calculated by averaging these outcomes together. This would be easy to implement and fast, but not optimal.