Ejemplo n.º 1
0
        // Coroutine based search
        public void Search(RlSearchParams searchParams, MonoBehaviour context)
        {
            m_searchParams = searchParams;
            m_searchThread = null;

            int actorsCount = m_model.rlModelGetActorsCount();

            m_searchTrees = new RlTree <StateId_t, Action_t> [actorsCount];
            for (int index = 0; index < m_searchTrees.Length; ++index)
            {
                m_searchTrees[index] = new RlTree <StateId_t, Action_t>();
            }

            // Start the search thread
            m_running = true;
            context.StartCoroutine(StartCo());
        }
Ejemplo n.º 2
0
        // Thread based search
        public void Search(RlSearchParams searchParams)
        {
            m_searchParams = searchParams;
            m_searchThread = new Thread(Start);

            int actorsCount = m_model.rlModelGetActorsCount();

            m_searchTrees = new RlTree <StateId_t, Action_t> [actorsCount];
            for (int index = 0; index < m_searchTrees.Length; ++index)
            {
                m_searchTrees[index] = new RlTree <StateId_t, Action_t>();
            }

            // Start the search thread
            m_running = true;
            m_searchThread.Start();
        }
Ejemplo n.º 3
0
 public RlNode(RlTree <StateId_t, Action_t> tree)
 {
     m_actions = new RlAction <StateId_t, Action_t> [0];
 }