コード例 #1
0
ファイル: WalkerAI.cs プロジェクト: ViktorMakki/-nlab1
        public double TakeActionInState(State state, AIAction action)
        {
            WalkerState  walkerState  = state as WalkerState;
            WalkerAction walkerAction = action as WalkerAction;

            if (walkerAction == null || walkerState == null)
            {
                return(0);
            }
            return(WalkerAIRules.GetStateActionReward(walkerState, walkerAction));
        }
コード例 #2
0
ファイル: WalkerAIRules.cs プロジェクト: ViktorMakki/-nlab1
        public static double GetStateActionReward(WalkerState walkerState, WalkerAction walkerAction)
        {
            float speed = 10;

            return(Game.GetActionReward(speed * GetVectorOfDirection(walkerAction.direction)));
        }