text_plain_output_1.png
child_happiness = np.full((n_gift_type, n_children), -1 * multiplier, dtype=np.int16)
gift_happiness = np.full((n_gift_type, n_children), -1, dtype=np.int16)
to_add = (np.arange(n_gift_pref, 0, -1) * ratio_child_happiness + 1) * int(multiplier)
for child, wishlist in tqdm(enumerate(child_wishlists)):
    child_happiness[wishlist, child] += to_add
to_add = np.arange(n_child_pref, 0, -1) * ratio_gift_happiness + 1
for gift, goodkids in tqdm(enumerate(gift_goodkids)):
    gift_happiness[gift, goodkids] += to_add