app/models/PlayerAgent.js
//check the collection of this agent, add more probability mass for owned cards to reduce its rate of getting unique card
check the collection of this agent, add more probability mass for owned cards to reduce its rate of getting unique card
check the collection of this agent add more probability mass for owned cards to reduce its rate of getting unique card
collectionCheck(cards, avg_wtp) {
    const base_factor = this.collectionCheck_baseFactor(this.WTP, avg_wtp)
    let card_factor = {}
    let sum = 0
    let count = 0
    for (const card of Object.keys(cards)) {
      if (cards[card].rarity > 5) {
        card_factor[card] = Math.pow(base_factor, Math.min(5, this.card_counter[card]))
        sum += card_factor[card]
        count++
      }
    }
    const standard_ratio = 1 / count
    for (const card of Object.keys(card_factor)) {
      card_factor[card] = (card_factor[card] / sum) / standard_ratio
    }
    return card_factor
  }
collectionCheck ( cards , avg_wtp ) { const base_factor = this . collectionCheck_baseFactor ( this . WTP , avg_wtp ) let card_factor = { } let sum = 0 let count = 0 for ( const card of Object . keys ( cards ) ) { if ( cards [ card ] . rarity > 5 ) { card_factor [ card ] = Math . pow ( base_factor , Math . min ( 5 , this . card_counter [ card ] ) ) sum += card_factor [ card ] count ++ } } const standard_ratio = 1 / count for ( const card of Object . keys ( card_factor ) ) { card_factor [ card ] = ( card_factor [ card ] / sum ) / standard_ratio } return card_factor }
check the collection of this agent, add more probability mass for owned cards to reduce its rate of getting unique card
check the collection of this agent add more probability mass for owned cards to reduce its rate of getting unique card
//for the unowned cards, decrease rate based on deviation //calculate the amplification ratio such that the probability sum is still 1