Exemplo n.º 1
0
        public AttentionMode CreateNewAttentionMode()
        {
            var mode = new AttentionMode();

            _attentionModes.Add(mode);
            return(mode);
        }
Exemplo n.º 2
0
        AttentionMode GetBestMode()
        {
            float bestUtility = currentModeBias;

            if (currentMode != null)
            {
                bestUtility += currentMode.GetUtility();
            }
            AttentionMode bestSource = currentMode;

            int n = _attentionModes.Count;

            for (int i = 0; i < n; ++i)
            {
                var   source  = _attentionModes[i];
                float utility = source.GetUtility();
                if (utility > bestUtility)
                {
                    bestSource = _attentionModes[i];
                }
            }
            return(bestSource);
        }