// 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()); }
// 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(); }
public RlNode(RlTree <StateId_t, Action_t> tree) { m_actions = new RlAction <StateId_t, Action_t> [0]; }