Exemplo n.º 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[] { 2, y * 100, 0.5f });
                var action = decisionMaker.DecideAction(tmpState);
                Assert.AreEqual(
                    LocomotionAction.GoRight().Name,
                    action.Name
                    );
            }
        }
Exemplo n.º 2
0
        public void 右にエネルギーがあるときはちゃんとそちらに向かう()
        {
            var decisionMaker = createDummy();
            var tmpState      = TempState();

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