Inheritance: ForagingAgent
示例#1
0
        public void MyTestInitialize()
        {
            int height = 500;
            int width  = 500;
            List <PlantSpecies> species = new List <PlantSpecies>()
            {
                new PlantSpecies(0)
                {
                    Radius = 5, Reward = 100, Count = 1
                }
            };
            List <Predator> predators = new List <Predator>();

            _agent = new ActionListAgent(0, new List <float[]>())
            {
                X = 250, Y = 250
            };
            List <ForagingAgent> agents = new List <ForagingAgent>()
            {
                _agent
            };

            _world = new World(agents, height, width, species, predators, PlantLayoutStrategies.Uniform);
            _world.SensorLookup = new SensorDictionary((int)_world.AgentHorizon, _world.Width, _world.Height);
            _world.AgentHorizon = 50;
        }
示例#2
0
        public void MyTestInitialize()
        {
            int height = 500;
            int width = 500;
            List<PlantSpecies> species = new List<PlantSpecies>() { new PlantSpecies(0) { Radius = 5, Reward = 100, Count = 1 } };
            List<Predator> predators = new List<Predator>();

            _agent = new ActionListAgent(0, new List<float[]>()) { X = 250, Y = 250 };
            List<ForagingAgent> agents = new List<ForagingAgent>() { _agent };

            _world = new World(agents, height, width, species, predators, PlantLayoutStrategies.Uniform);
            _world.SensorLookup = new SensorDictionary((int)_world.AgentHorizon, _world.Width, _world.Height);
            _world.AgentHorizon = 50;
        }