常用方法
常用方法
常用方法
常用方法
private double GetPriority(State currentState, State nextState, AIAction action, double reward) { DiscreteActionValueFunction actionValueFunction = ai.ActionValueFunction; double discount = ai.Discount; double bestActionValue = ListUtils.GetHighest( actionValueFunction.GetActionValues(nextState), (x, y) => x.Value > y.Value).Value; return(Math.Abs(reward + discount * bestActionValue - actionValueFunction.GetValue(currentState, action))); }