carlofazioli / cardiathena

A project to study strategies in the game of hearts, using distributed computing, AI, and data analytics.
GNU General Public License v3.0
6 stars 1 forks source link

LowLayer passing_smart_sequence (method1 passing) #80

Closed davidjha closed 4 years ago

davidjha commented 4 years ago

Describe the bug The passing_smart_sequence() and pick_trouble_card() in LowLayer.py is incorrectly selecting the right cards to pass. On line 244, the statement if len(suit) > num_cards is selecting cards suits with the most amount of cards, when it should be selecting the suit with the least amount of cards.

Also going off Mark's strategy for method 1 passing, trouble suits are the suits where its lowest card is higher than the lowest cards of all the other suits.

To Reproduce Steps to reproduce the behavior:

  1. Un-comment line 53 in get_action(). three_cards = self.passing_smart_sequence(partial_state)
  2. Comment out line 54 in get_action(). three_cards = self.passing_smart_facevalues(partial_state)

Expected behavior The 3 cards selected for passing should be the highest card in the trouble suit, if we define trouble suit as the suit with the least amount of cards. or The 3 cards are the highest cards in the trouble suit. Trouble suit is the suit where the lowest card is greater than all other lowest cards in other suits.