public LICSTreeAgent(LicsDataWindow dataW,Pose initial, Vec2 target)
            : base(initial, target)
        {
            /* Pose initial - начальное положение машины в системе Box2d с перевёрнутым углом (0 - слева, + против часовой),
             * Vec2 target - положение цели в системе Box2d,
             * int xtiles = 80, int ytiles = 50 - ширина и высота массива тайлов для поиска пути. Глубина определяется количеством ориентаций(8).
             */

            //initialising data window
            dataWnd = dataW;
        }
Beispiel #2
0
        public Agent agentByType(string type,Car robot = null, Vec2 targ = new Vec2(),string group = "")
        {
            //there must have been a better way to do this
            LicsDataWindow wnd;//for simplicity of naming wnd variables
            switch (type)
            {
                case "reflex agent":
                    return new reflexAgent();
                case "dreamer agent":
                    return new dreamerAgent(robot.pos,targ);
                case "HTM agent":
                    return new NeuroAgent(robot.pos,targ);
                case "LICS tree agent":
                    wnd = new LicsDataWindow();
                    dataWnds.Add(wnd);
                    return new LICSTreeAgent(wnd, robot.pos, targ);
                case "planning agent":
                    wnd = new LicsDataWindow();
                    dataWnds.Add(wnd);
                    return new NotLearningAgent( wnd,robot.pos,targ);

                case "LICS forest car agent":
                    wnd = new LicsDataWindow();
                    dataWnds.Add(wnd);
                    return new LICSForestAgent(wnd,robot.pos,targ);

                case "LICS forest car agent with transfer":
                    wnd = new LicsDataWindow();
                    dataWnds.Add(wnd);
                    return new EvoForestUnitAgent(wnd,robot.pos,targ,group);

                case "LICS forest coordinator":
                    return new EvoForestTransferAgent(new List<EvoForestUnitAgent>());
            }
                    return null;
        }