Пример #1
0
        public void 右前に餌があるときはちゃんとそちらに向かう()
        {
            var decisionMaker = createDummy();
            var tmpState      = new State();

            for (var y = -1; y <= 1; y++)
            {
                tmpState[State.BasicKeys.RelativeFoodPosition] = new DenseVector(new double[] { 1, y * 100, 1 });
                var action = decisionMaker.DecideAction(tmpState);
                Assert.AreEqual(
                    LocomotionAction.GoForwardRight().Name,
                    action.Name
                    );
            }
        }
Пример #2
0
        public void 右前にエネルギーがあるときはちゃんとそちらに向かう()
        {
            var decisionMaker = createDummy();
            var tmpState      = TempState();

            for (var y = -1; y <= 1; y++)
            {
                tmpState[State.BasicKeys.TotalFoodEnergyEachDirection][1] = 1f;
                var action = decisionMaker.DecideAction(tmpState);
                Assert.AreEqual(
                    LocomotionAction.GoForwardRight().Name,
                    action.Name
                    );
            }
        }