public AttentionMode CreateNewAttentionMode() { var mode = new AttentionMode(); _attentionModes.Add(mode); return(mode); }
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); }