def sds_multiprocess(self, layout, deal): d = Deal(hands=layout, current_turn_index=deal.current_turn_index, current_trick=deal.current_trick.copy(), trumps=deal.trumps) dds = DDS(d) # displayer.print_hands(d.original_hands) # displayer.print_deal_info(d) utility_dict = dds.get_utilities() return utility_dict
def sds(self, layouts, deal): """ This runs a dds for every possible layout as viewed from the current player. And then aggregates the results by taking the mean number of tricks for each card """ results_list = [] for layout in layouts: d = Deal(hands=layout, current_turn_index=deal.current_turn_index, current_trick=deal.current_trick.copy(), trumps=deal.trumps) dds = DDS(d) # displayer.print_hands(d.original_hands) # displayer.print_deal_info(d) utility_dict = dds.get_utilities() # print(utility_dict) results_list.append(utility_dict.copy()) df = pd.DataFrame(results_list) return df