private Event _sig; // This signal object will be used for observations

        public Environment(int nStates, int nActions, int nAgents, WorldDynamics WD)
        {
            ConstructActions(nActions);
            ConstructStates(nStates);
            ConstructAgents(nAgents);
            _WD  = WD;
            _sig = new Event(_states[0], _states[0], -100, _actions[0], _agents[0]);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            int           nActions = 15;
            int           nStates  = 12;
            int           nAgents  = 10;
            int           nSteps   = 10000;
            WorldDynamics WD       = new WorldDynamics(nStates, nActions);
            Environment   env      = new Environment(nStates, nActions, nAgents, WD);


            Random rnd = new Random();

            for (int i = 0; i < nSteps; i++)
            {
                env.Simulate();
            }

            env.Print();
            Console.ReadLine();
        }