public override void CreateTransducer()
        {
            // this automaton provides rewards if the agent correctly identifies binary strings representing numbers divisible by two
            m_ft = new FiniteTransducer(2, 2, 2);

            m_ft.SetInitialState(0);

            m_ft.AddFinalState(0);

            m_ft.AddTransition(0, 0, 0, 1);
            m_ft.AddTransition(0, 1, 1, 0);
            m_ft.AddTransition(1, 0, 0, 1);
            m_ft.AddTransition(1, 1, 1, 0);

            m_importantActions.Add(1);
        }
Example #2
0
        public override void CreateTransducer()
        {
            // this automaton provides rewards if the agent correctly identifies sequences of white symbols that are not preceded by a gray symbol
            m_ft = new FiniteTransducer(3, 3, 2);

            m_ft.SetInitialState(0);

            m_ft.AddFinalState(0);

            m_ft.AddTransition(0, 0, 0, 1);
            m_ft.AddTransition(0, 1, 1, 0);
            m_ft.AddTransition(0, 2, 2, 0);
            m_ft.AddTransition(1, 0, 0, 1);
            m_ft.AddTransition(1, 1, 1, 0);
            m_ft.AddTransition(2, 2, 0, 0);
            m_ft.AddTransition(2, 1, 1, 0);
            m_ft.AddTransition(2, 2, 2, 0);

            m_importantActions.Add(1);
        }
Example #3
0
        public override void CreateTransducer()
        {
            // this automaton provides rewards if the agent correctly identifies strings of black or white symbols;
            // if there's a gray symbol, there have to be 1-2 black symbols afterwards, depending on occurence of white symbols.
            m_ft = new FiniteTransducer(3, 3, 2);

            m_ft.SetInitialState(0);

            m_ft.AddFinalState(0);

            m_ft.AddTransition(0, 0, 0, 1);
            m_ft.AddTransition(0, 0, 1, 1);
            m_ft.AddTransition(0, 1, 2, 0);
            m_ft.AddTransition(1, 2, 0, 0);
            m_ft.AddTransition(1, 0, 1, 0);
            m_ft.AddTransition(1, 1, 2, 0);
            m_ft.AddTransition(2, 2, 0, 0);
            m_ft.AddTransition(2, 1, 1, 0);
            m_ft.AddTransition(2, 1, 2, 0);

            m_importantActions.Add(1);
        }
Example #4
0
        public override void CreateTransducer()
        {
            // this automaton provides rewards if the agent correctly identifies binary strings representing numbers divisible by 5 (or with remainder 3)
            m_ft = new FiniteTransducer(5, 2, 2);

            m_ft.SetInitialState(0);

            m_ft.AddFinalState(0);
            m_ft.AddFinalState(3); // this means this is no longer division by 5, but also division by 5 with remainder 3

            m_ft.AddTransition(0, 0, 0, 1);
            m_ft.AddTransition(0, 1, 1, 0);
            m_ft.AddTransition(1, 2, 0, 0);
            m_ft.AddTransition(1, 3, 1, 1); // 3 is now a final state
            m_ft.AddTransition(2, 4, 0, 0);
            m_ft.AddTransition(2, 0, 1, 1);
            m_ft.AddTransition(3, 1, 0, 0);
            m_ft.AddTransition(3, 2, 1, 0);
            m_ft.AddTransition(4, 3, 0, 1); // 3 is now a final state
            m_ft.AddTransition(4, 4, 1, 0);

            m_importantActions.Add(1);
        }