public void CopyFrom(LearningProbability other)
 {
     for (int i = 0; i < Mathf.Min(probabilityMap.GetLength(0), other.probabilityMap.GetLength(0)); ++i)
     {
         for (int j = 0; j < Mathf.Min(probabilityMap.GetLength(1), other.probabilityMap.GetLength(1)); ++j)
         {
             probabilityMap[i, j].Set(other.probabilityMap[i, j].Get());
         }
     }
 }
Esempio n. 2
0
        public TurnProbability(int remainingTurns)
        {
            winProbability  = new LearningProbability[CardGameLogic.MAX_BID_SCALAR + 1];
            foldProbability = new LearningProbability[CardGameLogic.MAX_BID_SCALAR + 1, remainingTurns];
            cardsPlayed     = 3 - remainingTurns;

            for (int bid = 0; bid <= CardGameLogic.MAX_BID_SCALAR; ++bid)
            {
                winProbability[bid] = new LearningProbability(CardProbability.MaxScore, cardsPlayed * Card.MAX_CARD_SCORE);
                for (int turn = 0; turn < remainingTurns; ++turn)
                {
                    foldProbability[bid, turn] = new LearningProbability((turn + cardsPlayed) * Card.MAX_CARD_SCORE, cardsPlayed * Card.MAX_CARD_SCORE);
                }
            }
        }